aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/particles
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-02-26 09:16:06 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-03-21 14:50:01 +0000
commit214fbaa57b73296a0a191b5ff2b1fbc8bf0aaa7a (patch)
tree26a739959b23c5aba5d48dad641bea3c10518413 /src/imports/particles
parent8629682663adb0de5f91d2bd545b5d68e6afb7cd (diff)
add qmlRegisterModule to all QML plugins (QUIP 99)
Now it should always be possible to do import QtQuick.Module x.m where x is the module's major version and m is Qt's minor version. [ChangeLog][QtQuick][Important Behavior Changes] In Qt 5.11 and newer versions, QML plugin modules are available with the same minor version as the Qt release minor version number. For example it's possible to import QtQuick.Window 2.11 or import QtQuick.Layouts 1.11 even though there haven't been any API changes in these modules for Qt 5.11, and the maximum possible import version will automatically increment in future Qt versions. This is intended to reduce confusion. Change-Id: I0d28ed04d186bcdd5acde95b8ed0b66c1c4697e3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/particles')
-rw-r--r--src/imports/particles/plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/particles/plugin.cpp b/src/imports/particles/plugin.cpp
index a04e115976..d548f26599 100644
--- a/src/imports/particles/plugin.cpp
+++ b/src/imports/particles/plugin.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include <QtQml/qqmlextensionplugin.h>
+#include <QtQml/qqml.h>
#include <private/qquickparticlesmodule_p.h>
@@ -62,6 +63,9 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Particles"));
Q_UNUSED(uri);
QQuickParticlesModule::defineModule();
+
+ // Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
+ qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
}
};
//![class decl]