aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@digia.com>2012-11-22 11:28:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-22 12:34:41 +0100
commit8fc95e65e77328c995ef4a3a633a95c86f5e0bdf (patch)
treec36f38de6625c04b1ab51e08f8f9e7e78dc1fa1f /src/quick
parentc2a6e7276dfce6142202ee9db4aaaf15a53cb530 (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/quick')
-rw-r--r--src/quick/designer/designersupport.cpp7
-rw-r--r--src/quick/designer/designersupport.h1
-rw-r--r--src/quick/util/qquickbehavior.cpp2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/designer/designersupport.cpp b/src/quick/designer/designersupport.cpp
index 1b0fea9190..1e67303abf 100644
--- a/src/quick/designer/designersupport.cpp
+++ b/src/quick/designer/designersupport.cpp
@@ -44,11 +44,13 @@
#include <QtQuick/private/qquickshadereffectsource_p.h>
#include <QtQuick/private/qquickrectangle_p.h>
+#include <QtQml/private/qabstractanimationjob_p.h>
#include <private/qqmlengine_p.h>
#include <private/qquickview_p.h>
#include <private/qquickwindowmanager_p.h>
#include <QtQuick/private/qquickstategroup_p.h>
#include <QtGui/QImage>
+#include <private/qqmlvme_p.h>
#include "designerwindowmanager_p.h"
@@ -429,6 +431,11 @@ void DesignerSupport::activateDesignerWindowManager()
QQuickWindowManager::setInstance(new DesignerWindowManager);
}
+void DesignerSupport::activateDesignerMode()
+{
+ QQmlEnginePrivate::activateDesignerMode();
+}
+
void DesignerSupport::createOpenGLContext(QQuickWindow *window)
{
DesignerWindowManager::createOpenGLContext(window);
diff --git a/src/quick/designer/designersupport.h b/src/quick/designer/designersupport.h
index 723e1067d8..b0dbe18ab1 100644
--- a/src/quick/designer/designersupport.h
+++ b/src/quick/designer/designersupport.h
@@ -145,6 +145,7 @@ public:
static void updateDirtyNode(QQuickItem *item);
static void activateDesignerWindowManager();
+ static void activateDesignerMode();
static void createOpenGLContext(QQuickWindow *window);
diff --git a/src/quick/util/qquickbehavior.cpp b/src/quick/util/qquickbehavior.cpp
index 4ea11c46b4..9f9ea67992 100644
--- a/src/quick/util/qquickbehavior.cpp
+++ b/src/quick/util/qquickbehavior.cpp
@@ -175,7 +175,7 @@ void QQuickBehavior::setEnabled(bool enabled)
void QQuickBehavior::write(const QVariant &value)
{
Q_D(QQuickBehavior);
- bool bypass = !d->enabled || !d->finalized;
+ bool bypass = !d->enabled || !d->finalized || QQmlEnginePrivate::designerMode();
if (!bypass)
qmlExecuteDeferred(this);
if (!d->animation || bypass) {