#include "private/qabstractanimationjob_p.h"
#include "private/qanimationgroupjob_p.h"
#include "private/qanimationjobutil_p.h"
+#include "private/qqmlengine_p.h"
#define DEFAULT_TIMER_INTERVAL 16
{
if (m_state == Running)
return;
- setState(Running);
+
+ if (QQmlEnginePrivate::designerMode()) {
+ if (state() != Stopped) {
+ m_currentTime = duration();
+ m_totalCurrentTime = totalDuration();
+ setState(Running);
+ setState(Stopped);
+ }
+ } else {
+ setState(Running);
+ }
}
void QAbstractAnimationJob::stop()
*/
bool QQmlEnginePrivate::qml_debugging_enabled = false;
+bool QQmlEnginePrivate::s_designerMode = false;
// these types are part of the QML language
void QQmlEnginePrivate::registerBaseTypes(const char *uri, int versionMajor, int versionMinor)
qmlRegisterUncreatableType<QQmlLocale>("QtQuick", 2, 0, "Locale", QQmlEngine::tr("Locale cannot be instantiated. Use Qt.locale()"));
}
+bool QQmlEnginePrivate::designerMode()
+{
+ return s_designerMode;
+}
+
+void QQmlEnginePrivate::activateDesignerMode()
+{
+ s_designerMode = true;
+}
+
/*!
\class QQmlImageProviderBase
static void registerQtQuick2Types(const char *uri, int versionMajor, int versionMinor);
static void defineQtQuick2Module();
+ static bool designerMode();
+ static void activateDesignerMode();
+
static bool qml_debugging_enabled;
mutable QMutex mutex;
QHash<int, int> m_qmlLists;
QHash<int, QQmlCompiledData *> m_compositeTypes;
QHash<QUrl, QByteArray> debugChangesHash;
+ static bool s_designerMode;
// These members is protected by the full QQmlEnginePrivate::mutex mutex
struct Deletable { Deletable():next(0) {} virtual ~Deletable() {} Deletable *next; };
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();
}
{
#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"
QQuickWindowManager::setInstance(new DesignerWindowManager);
}
+void DesignerSupport::activateDesignerMode()
+{
+ QQmlEnginePrivate::activateDesignerMode();
+}
+
void DesignerSupport::createOpenGLContext(QQuickWindow *window)
{
DesignerWindowManager::createOpenGLContext(window);
static void updateDirtyNode(QQuickItem *item);
static void activateDesignerWindowManager();
+ static void activateDesignerMode();
static void createOpenGLContext(QQuickWindow *window);
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) {