diff options
Diffstat (limited to 'src/imports/templates/qtquicktemplates2plugin.cpp')
-rw-r--r-- | src/imports/templates/qtquicktemplates2plugin.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index ef7a646b..c4ff68fc 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -161,7 +161,13 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) registered = true; initProviders(); - qmlRegisterModule(uri, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2... + // Register the latest version, even if there are no new types or new revisions for existing types yet. + // Before Qt 5.12, we would do the following: + // + // qmlRegisterModule(uri, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2... + // + // However, we want to align with the rest of Qt Quick which uses Qt's minor version. + qmlRegisterModule(uri, 2, QT_VERSION_MINOR); // QtQuick.Templates 2.0 (originally introduced in Qt 5.7) qmlRegisterType<QQuickAbstractButton>(uri, 2, 0, "AbstractButton"); |