summaryrefslogtreecommitdiffstats
path: root/src/quick3d/imports/scene2d
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-08-31 14:23:08 +0200
committerKai Koehne <kai.koehne@qt.io>2018-09-06 12:21:09 +0000
commited7e50c8518f8d385b22a8f587d860f7d49d1ecc (patch)
treebfa1888e496d6cf003e847f421656dff28231d83 /src/quick3d/imports/scene2d
parent4828923558a12737a7ca8b31d64b665897f2405c (diff)
Automatically register the latest import version
This follows what was done in d28c9f6a for Qt Quick Controls 2. The latest import version (e.g. 2.11 in Qt 5.11) will automatically be registered whenever the Qt version is bumped. This avoids needing to wait until a new type is added (or a new revision is added to an existing type) before being able to use the newest Qt Quick version. Task-number: QTBUG-70290 Change-Id: Id221b5879f8c50a20fe5e26f9e141b82e4a196cb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick3d/imports/scene2d')
-rw-r--r--src/quick3d/imports/scene2d/importsscene2d.pro2
-rw-r--r--src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/quick3d/imports/scene2d/importsscene2d.pro b/src/quick3d/imports/scene2d/importsscene2d.pro
index 32fbc5b1b..1582d4ee4 100644
--- a/src/quick3d/imports/scene2d/importsscene2d.pro
+++ b/src/quick3d/imports/scene2d/importsscene2d.pro
@@ -1,7 +1,7 @@
CXX_MODULE = qml
TARGET = qtquickscene2dplugin
TARGETPATH = QtQuick/Scene2D
-IMPORT_VERSION = 2.0
+IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick 3dcore 3drender 3drender-private 3dinput 3dlogic 3dquickscene2d 3dquickscene2d-private
diff --git a/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp b/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp
index 4e6245d2d..0c410e84b 100644
--- a/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp
+++ b/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp
@@ -53,6 +53,9 @@ Q_COREAPP_STARTUP_FUNCTION(initScene2dPlugin)
void QtQuickScene2DPlugin::registerTypes(const char *uri)
{
qmlRegisterExtendedType<Qt3DRender::Quick::QScene2D, Qt3DRender::Render::Quick::QQuick3DScene2D>(uri, 2, 9, "Scene2D");
+
+ // Auto-increment the import to stay in sync with ALL future Qt minor versions
+ qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
}
QT_END_NAMESPACE