Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
start it with the right arguments or call QQmlDebuggingEnabler::startTcpServer() it will open a debug port and accept connections from anywhere. With a dynamically linked Qt you have the option to delete the plugin in order to prevent this. regards, -- Ulf Hermann, Software Engineer | The Qt

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
On 06/01/2015 06:10 PM, Thiago Macieira wrote: On Monday 01 June 2015 15:01:14 Ulf Hermann wrote: You probably have to add the following somewhere: LIBS += /path/to/libqmldbg_tcp.a but like I said, he shouldn't have to. That's a bug in QtQml that it uses qmldbg_tcp without linking

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
/nsantos/Qt/5.4/clang_32_static/qml/QtQuick/Controls/libqtquickcontrolsplugin.a Apparently you've put some important plugins here. You could try adding the qmldbg_tcp one here, too. -- Ulf Hermann, Software Engineer | The Qt Company The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
of QTcpServerConnection. Unless, of course, you don't want to do any QML debugging and profiling. In that case you should stick to -DQT_QML_NO_DEBUGGER. -- Ulf Hermann, Software Engineer | The Qt Company The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula

Re: [Interest] "Proper" Date Locale support?

2016-06-07 Thread Ulf Hermann
I'm working with localization of dates. There is a standard JS API: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString#Using_options But QML defines it's own Date: http://doc.qt.io/qt-5/qml-qtqml-date.html The difference being the MDN refers

Re: [Interest] QT plugins memory footprint and the debugger

2016-11-10 Thread Ulf Hermann
Looking at the source of qt, the problem is identical(though it is protected against runaway exceptions). The MinGw debug plugins of qtquick are quite large and use the same mechanism to load plugins. If, as in my case, the initialization of the program allocates considerable memory ( but

Re: [Interest] SCXML Statemachine donedata event

2016-11-28 Thread Ulf Hermann
Connections|{| ||target|: stateMachine| |onEventOccurred: {| |console.|log|(event.name)| |}| |}| From QML you should use the EventConnection QML type. About like this: EventConnection { stateMachine: stateMachine events: ["done.state.*"] // or

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
QJSEngine does not cache the compilation results if you just pass in plain strings. I also don't think QScriptEngine can do this here (but I haven't checked). QScriptEngine might be clever enough to automatically use the interpreter rather than JIT-compiling such small expressions. You can

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
The usage scenario fits my needs, that is the reason to evaluate exactly this way. I mean - should the QScriptEngine be deprecated, the QQmlEngine/QJSEngine should also have ways to utilize some form of JIT/preparse. Even in the first pass where JIT cannot be effective (or when I parse just

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
QJSValue result = qmlEngine.evaluate(item.m_expression.sourceCode()); I guess you are mostly profiling the JIT compiling, not the actual evaluation. In order to get realistic results you should keep the compiled representation of the expression around, e.g. as a JS function. From the docs:

Re: [Interest] SCXML editor in QtCreator

2016-11-29 Thread Ulf Hermann
Hello Wolf, Thanks for trying the SCXML editor. Your feedback is appreciated. I have tried out the SCXML editor plugin for the QtCreator. My first impression is very positive. The editor creates nicely looking state chart diagrams. There are only two downsides I have found so far: 1. Events

Re: [Interest] [QGV] Asynchronous painting of millions QGPathItem

2016-12-06 Thread Ulf Hermann
Hello, I had a somewhat similar, but not quite the same problem when building the timeline view for the QML profiler in Qt Creator. It's currently usable with up to about 1 million events in the timeline and you can zoom and scroll it. There might be potential for further optimization. I used

Re: [Interest] Again trouble with SCXML donedata

2017-01-03 Thread Ulf Hermann
Hello, [...] EventConnection { stateMachine: p.stateMachine events: ["done.state.Leave"] onOccurred: { console.log("done: " + event.name + " [" + event.data + "]") } } [...] done.state.* events are internal. You can

Re: [Interest] 2017

2017-01-03 Thread Ulf Hermann
Another alternative of course is to use some other client-server protocol such that only the “model” of MVC is on the server, and UI rendering instructions are sent across the network instead of actual rendered graphics. For example load QML over the network and run it locally. For some

Re: [Interest] Crash with Qt application that use OpenGL

2017-04-21 Thread Ulf Hermann
ps: i had a chat with a mozilla developer some time ago: they never use desktop opengl on windows, but only use ANGLE with a fallback to software rendering, if the application crashes on customer's machines. You can force Qt to use Angle by setting the QT_OPENGL environment variable to

Re: [Interest] QML debugger doesn't work for big cmake-based project

2017-08-11 Thread Ulf Hermann
On 08/11/2017 04:48 PM, Alexander Ivash wrote: > On launching debugger I see 'QML debugging is enabled. Only use this in a > safe environment.' but don't see 'Waiting for connnection...', so it > looks line debugger is not completely initialized. Does your application do anything complicated

Re: [Interest] QML debugger doesn't work for big cmake-based project

2017-08-11 Thread Ulf Hermann
On 08/11/2017 05:01 PM, Alexander Ivash wrote: > But then way don't I see 'waiting for connection... ' ? Because it only starts waiting for connections once a QML engine exists. Before that there is nothing to debug anyway. > Also, If what you say is true, then is it possible to increase this

Re: [Interest] ASSERT: "m_engines.contains(engine)" in file qqmlenginedebugservice.cpp, line 802 qqmlenginedebugservice.cpp: 802

2017-12-08 Thread Ulf Hermann
What needs to be done to get rid of this assertion (is it possible at all or QmlDebugger is always expect single QQmlEngine? ) You can have multiple QML engines attached to the debugger, but the current assumption is indeed that they all live in the GUI thread. This can probably be fixed, but

Re: [Interest] SCXML and datamodel sharing in Qt Quick and C++

2017-12-01 Thread Ulf Hermann
> 1. I use scxml compiler and expose compiled machine to Qt Quick. > 2. I use ecmascript as datamodel type. I create data entries in *.scxml file. > 3. I need to repeat those values on Qt Quick side and assign to > StateMachine.initialValues so that they will be reset everytime machine > starts

Re: [Interest] Interest Digest, Vol 79, Issue 19

2018-04-26 Thread Ulf Hermann
> When I said "most machines are little-endian", I was referring to machines Qt > runs on and, therefore, would use QDataStream. The fact that the default is > big endian is short-sighted. It should default to little-endian. We could change the default. All it takes is a new

Re: [Interest] qmlscene install problems

2018-07-24 Thread Ulf Hermann
On 07/23/2018 07:55 PM, Lisandro Damián Nicanor Pérez Meyer wrote: > El lunes, 16 de julio de 2018 08:12:25 -03 Ulf Hermann escribió: >> This thread has gone so far south, we need to add some corrections ... > [snip] >> So, it turns out I have another qmake (and qmlscene) in

Re: [Interest] qmlscene install problems (was: Interest Digest, Vol 82, Issue 5)

2018-07-16 Thread Ulf Hermann
it. So, all of this rant is as misplaced as it is unnecessary. The only thing that may be remotely relevant is the comment about Ubuntu's testing practices, but the information we have here is far from being conclusive on this being an actual problem. The author should be sorry for wasting everybody

Re: [Interest] QT SCXML: How to access Event parameter from State?

2018-03-16 Thread Ulf Hermann
> In the example above, how would we get access to Event parameter for "state1" > and "state5"? You can access the event currently being processed via the data model. The EcmaScript data model has a readonly property "_event" and the C++ data model has a method scxmlEvent(). The null data

Re: [Interest] QML Debug API

2018-11-09 Thread Ulf Hermann
Hi Nils, > I have read that QML offers a binary debug protocol that is used by > several tools to to gain insights into QML applications. I read about > this interface here: http://doc.qt.io/qt-5/qtquick-debugging.html > It is stated that: "The Qt QML module provides services for debugging, >

Re: [Interest] Changes to Javascript runtime in 5.12

2019-01-03 Thread Ulf Hermann
Hi René, > In JS libs before 5.12, I've always used a closure approach to not > leak a bunch of private variables onto the global module object. This > results in a layout much like so: > > (function(lib) { > ... closed vars can be declared here ... > > lib.bar = function() { > return

Re: [Interest] Overriding list properties in QML at initialisation

2019-08-14 Thread Ulf Hermann
Hello, > If I create a class with a QQmlListProperty and then initialise it with > an array in some QML file, then subclass the QML type in a second QML > file and try to override the array there, when creating an instance of > the child class, the list contains the arrays concatenated instead

Re: [Interest] QML and sensitive data

2019-09-05 Thread Ulf Hermann
> Cheap hack #1: assign both fields new values once validated, say "*" > and force screen update before navigating away. No. Strings are immutable in QML (and JavaScript). The old string will still be in memory at that point. And no, it's not a QString. const-casting and overwriting from

Re: [Interest] QML and sensitive data

2019-09-10 Thread Ulf Hermann
Hi, > Just in case if someone will be looking for solution - I've managed to > eliminate all the sensitive data from memory on closing particular QML > screen without sacrificing existing architecture. The secret is pretty > simple: just avoid situations when QString-s gets copied into JS >