diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-26 09:16:06 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-03-21 14:50:01 +0000 |
commit | 214fbaa57b73296a0a191b5ff2b1fbc8bf0aaa7a (patch) | |
tree | 26a739959b23c5aba5d48dad641bea3c10518413 /src/imports/xmllistmodel | |
parent | 8629682663adb0de5f91d2bd545b5d68e6afb7cd (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/xmllistmodel')
-rw-r--r-- | src/imports/xmllistmodel/plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/xmllistmodel/plugin.cpp b/src/imports/xmllistmodel/plugin.cpp index dc6a02918b..82e11eeeb3 100644 --- a/src/imports/xmllistmodel/plugin.cpp +++ b/src/imports/xmllistmodel/plugin.cpp @@ -63,6 +63,9 @@ public: Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.XmlListModel")); qmlRegisterType<QQuickXmlListModel>(uri,2,0,"XmlListModel"); qmlRegisterType<QQuickXmlListModelRole>(uri,2,0,"XmlRole"); + + // Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward + qmlRegisterModule(uri, 2, QT_VERSION_MINOR); } }; |