diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-12-19 16:37:24 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-02-15 08:04:48 +0000 |
commit | 70f35501da4d1bbb36703dcc7b121c454f8d57a9 (patch) | |
tree | 5f925444054cccb467ad0a5acdb09b8c31c837e7 /src/qml | |
parent | f254b0aa67a4656d25c7ea240efcd00084772f00 (diff) |
Add a feature for qml-animation
It should be possible to switch it off without globally switching
animations off in Qt.
Change-Id: I3cae6b72b2c6b5c420f21625208de5e273839438
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/animations/qabstractanimationjob_p.h | 2 | ||||
-rw-r--r-- | src/qml/animations/qanimationgroupjob_p.h | 2 | ||||
-rw-r--r-- | src/qml/animations/qanimationjobutil_p.h | 2 | ||||
-rw-r--r-- | src/qml/animations/qcontinuinganimationgroupjob_p.h | 2 | ||||
-rw-r--r-- | src/qml/animations/qparallelanimationgroupjob_p.h | 2 | ||||
-rw-r--r-- | src/qml/animations/qpauseanimationjob_p.h | 2 | ||||
-rw-r--r-- | src/qml/animations/qsequentialanimationgroupjob_p.h | 2 | ||||
-rw-r--r-- | src/qml/configure.json | 7 | ||||
-rw-r--r-- | src/qml/qml.pro | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 4 | ||||
-rw-r--r-- | src/qml/types/qqmltimer_p.h | 2 | ||||
-rw-r--r-- | src/qml/types/types.pri | 2 |
12 files changed, 27 insertions, 4 deletions
diff --git a/src/qml/animations/qabstractanimationjob_p.h b/src/qml/animations/qabstractanimationjob_p.h index 63fd4b0dac..0be6ca96ea 100644 --- a/src/qml/animations/qabstractanimationjob_p.h +++ b/src/qml/animations/qabstractanimationjob_p.h @@ -56,6 +56,8 @@ #include <QtCore/private/qabstractanimation_p.h> #include <vector> +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class QAnimationGroupJob; diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h index 26965c0264..148cb0c098 100644 --- a/src/qml/animations/qanimationgroupjob_p.h +++ b/src/qml/animations/qanimationgroupjob_p.h @@ -54,6 +54,8 @@ #include "private/qabstractanimationjob_p.h" #include <QtCore/qdebug.h> +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class Q_QML_PRIVATE_EXPORT QAnimationGroupJob : public QAbstractAnimationJob diff --git a/src/qml/animations/qanimationjobutil_p.h b/src/qml/animations/qanimationjobutil_p.h index 0bb9e83b2d..e3d6fe9178 100644 --- a/src/qml/animations/qanimationjobutil_p.h +++ b/src/qml/animations/qanimationjobutil_p.h @@ -51,6 +51,8 @@ // We mean it. // +QT_REQUIRE_CONFIG(qml_animation); + #define RETURN_IF_DELETED(func) \ { \ bool *prevWasDeleted = m_wasDeleted; \ diff --git a/src/qml/animations/qcontinuinganimationgroupjob_p.h b/src/qml/animations/qcontinuinganimationgroupjob_p.h index baf4ff1ae5..c67b8d39ad 100644 --- a/src/qml/animations/qcontinuinganimationgroupjob_p.h +++ b/src/qml/animations/qcontinuinganimationgroupjob_p.h @@ -53,6 +53,8 @@ #include "private/qanimationgroupjob_p.h" +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class Q_QML_PRIVATE_EXPORT QContinuingAnimationGroupJob : public QAnimationGroupJob diff --git a/src/qml/animations/qparallelanimationgroupjob_p.h b/src/qml/animations/qparallelanimationgroupjob_p.h index 358b95ce53..2d48686335 100644 --- a/src/qml/animations/qparallelanimationgroupjob_p.h +++ b/src/qml/animations/qparallelanimationgroupjob_p.h @@ -53,6 +53,8 @@ #include "private/qanimationgroupjob_p.h" +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class Q_QML_PRIVATE_EXPORT QParallelAnimationGroupJob : public QAnimationGroupJob diff --git a/src/qml/animations/qpauseanimationjob_p.h b/src/qml/animations/qpauseanimationjob_p.h index e228f46daa..53bf8a88b5 100644 --- a/src/qml/animations/qpauseanimationjob_p.h +++ b/src/qml/animations/qpauseanimationjob_p.h @@ -53,6 +53,8 @@ #include <private/qanimationgroupjob_p.h> +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class Q_QML_PRIVATE_EXPORT QPauseAnimationJob : public QAbstractAnimationJob diff --git a/src/qml/animations/qsequentialanimationgroupjob_p.h b/src/qml/animations/qsequentialanimationgroupjob_p.h index 5fbafcb9ac..760445c8c6 100644 --- a/src/qml/animations/qsequentialanimationgroupjob_p.h +++ b/src/qml/animations/qsequentialanimationgroupjob_p.h @@ -53,6 +53,8 @@ #include <private/qanimationgroupjob_p.h> +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class QPauseAnimationJob; diff --git a/src/qml/configure.json b/src/qml/configure.json index 95a4dd5240..47b897ce27 100644 --- a/src/qml/configure.json +++ b/src/qml/configure.json @@ -73,6 +73,13 @@ "purpose": "Provides support for locales in QML.", "section": "QML", "output": [ "privateFeature" ] + }, + "qml-animation": { + "label": "QML Animations", + "purpose": "Provides support for animations and timers in QML.", + "section": "QML", + "condition": "features.animation", + "output": [ "privateFeature" ] } }, diff --git a/src/qml/qml.pro b/src/qml/qml.pro index acaff08a29..adfaf38e9f 100644 --- a/src/qml/qml.pro +++ b/src/qml/qml.pro @@ -61,7 +61,7 @@ include(jsruntime/jsruntime.pri) include(jit/jit.pri) include(qml/qml.pri) include(debugger/debugger.pri) -qtConfig(animation) { +qtConfig(qml-animation) { include(animations/animations.pri) } include(types/types.pri) diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 6d289b3c9e..99e55a4300 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -83,7 +83,7 @@ #endif #include <private/qqmlbind_p.h> #include <private/qqmlconnections_p.h> -#if QT_CONFIG(animation) +#if QT_CONFIG(qml_animation) #include <private/qqmltimer_p.h> #endif #if QT_CONFIG(qml_list_model) @@ -226,7 +226,7 @@ void QQmlEnginePrivate::registerBaseTypes(const char *uri, int versionMajor, int qmlRegisterType<QQmlBind,8>(uri, versionMajor, (versionMinor < 8 ? 8 : versionMinor), "Binding"); //Only available in >=2.8 qmlRegisterType<QQmlConnections,1>(uri, versionMajor, (versionMinor < 3 ? 3 : versionMinor), "Connections"); //Only available in >=2.3 qmlRegisterType<QQmlConnections>(uri, versionMajor, versionMinor,"Connections"); -#if QT_CONFIG(animation) +#if QT_CONFIG(qml_animation) qmlRegisterType<QQmlTimer>(uri, versionMajor, versionMinor,"Timer"); #endif qmlRegisterType<QQmlInstantiator>(uri, versionMajor, (versionMinor < 1 ? 1 : versionMinor), "Instantiator"); //Only available in >=2.1 diff --git a/src/qml/types/qqmltimer_p.h b/src/qml/types/qqmltimer_p.h index 7739dad2a6..c97230501e 100644 --- a/src/qml/types/qqmltimer_p.h +++ b/src/qml/types/qqmltimer_p.h @@ -57,6 +57,8 @@ #include <private/qtqmlglobal_p.h> +QT_REQUIRE_CONFIG(qml_animation); + QT_BEGIN_NAMESPACE class QQmlTimerPrivate; diff --git a/src/qml/types/types.pri b/src/qml/types/types.pri index 574e7c214d..25b231f954 100644 --- a/src/qml/types/types.pri +++ b/src/qml/types/types.pri @@ -33,7 +33,7 @@ qtConfig(qml-list-model) { $$PWD/qqmllistmodelworkeragent_p.h } -qtConfig(animation) { +qtConfig(qml-animation) { SOURCES += \ $$PWD/qqmltimer.cpp |