diff options
author | Marco Bubke <marco.bubke@digia.com> | 2012-11-22 11:28:57 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-22 12:34:41 +0100 |
commit | 8fc95e65e77328c995ef4a3a633a95c86f5e0bdf (patch) | |
tree | c36f38de6625c04b1ab51e08f8f9e7e78dc1fa1f /src/qml/qml/qqmlvme.cpp | |
parent | c2a6e7276dfce6142202ee9db4aaaf15a53cb530 (diff) |
Add designer support for animations and componentComplete
In the designer animations confuse users, if you change a state or move a
item around. Also component complete is called later by the designer.
The call in the VME is to early.
Change-Id: I49aa04edbc49fb44ddb7b52062307982865efd7e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvme.cpp')
-rw-r--r-- | src/qml/qml/qqmlvme.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index 12de9ffebd..3ad442fb36 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -1322,28 +1322,28 @@ QQmlContextData *QQmlVME::complete(const Interrupt &interrupt) bindValues.deallocate(); } - { - QQmlTrace trace("VME Component Complete"); - while (!parserStatus.isEmpty()) { - QQmlParserStatus *status = parserStatus.pop(); + if (!QQmlEnginePrivate::designerMode()) { // the qml designer does the component complete later + QQmlTrace trace("VME Component Complete"); + while (!parserStatus.isEmpty()) { + QQmlParserStatus *status = parserStatus.pop(); #ifdef QML_ENABLE_TRACE - QQmlData *data = parserStatusData.pop(); + QQmlData *data = parserStatusData.pop(); #endif - if (status && status->d) { - status->d = 0; + if (status && status->d) { + status->d = 0; #ifdef QML_ENABLE_TRACE - QQmlTrace trace("Component complete"); - trace.addDetail("URL", data->outerContext->url); - trace.addDetail("Line", data->lineNumber); + QQmlTrace trace("Component complete"); + trace.addDetail("URL", data->outerContext->url); + trace.addDetail("Line", data->lineNumber); #endif - status->componentComplete(); + status->componentComplete(); + } + + if (watcher.hasRecursed() || interrupt.shouldInterrupt()) + return 0; } - - if (watcher.hasRecursed() || interrupt.shouldInterrupt()) - return 0; - } - parserStatus.deallocate(); + parserStatus.deallocate(); } { |