From 214fbaa57b73296a0a191b5ff2b1fbc8bf0aaa7a Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 26 Feb 2018 09:16:06 +0100 Subject: 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 --- src/imports/testlib/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/imports/testlib') diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 45e9bd2cf6..443229bee9 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -160,6 +160,9 @@ public: qmlRegisterType(uri,1,2,"TestEvent"); qmlRegisterType(uri,1,0,"TestUtil"); qmlRegisterType(); + + // Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward + qmlRegisterModule(uri, 1, QT_VERSION_MINOR); } }; -- cgit v1.2.3