diff options
Diffstat (limited to 'src/imports/templates/qtquicktemplates2plugin.cpp')
-rw-r--r-- | src/imports/templates/qtquicktemplates2plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index b17b916b..2486012b 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -88,7 +88,9 @@ #include <QtQuickTemplates2/private/qquicktoolbutton_p.h> #include <QtQuickTemplates2/private/qquicktoolseparator_p.h> #include <QtQuickTemplates2/private/qquicktooltip_p.h> +#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview) #include <QtQuickTemplates2/private/qquicktumbler_p.h> +#endif static inline void initResources() { @@ -191,8 +193,10 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) qmlRegisterType<QQuickToolButton>(uri, 2, 0, "ToolButton"); qmlRegisterType<QQuickToolTipAttached>(); qmlRegisterType<QQuickToolTip>(uri, 2, 0, "ToolTip"); +#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview) qmlRegisterType<QQuickTumblerAttached>(); qmlRegisterType<QQuickTumbler>(uri, 2, 0, "Tumbler"); +#endif // NOTE: register the latest revisions of all template/control base classes to // make revisioned properties available to their subclasses (synced with Qt 5.7) @@ -222,7 +226,9 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) qmlRegisterType<QQuickTextArea, 1>(uri, 2, 1, "TextArea"); qmlRegisterType<QQuickTextField, 1>(uri, 2, 1, "TextField"); qmlRegisterType<QQuickToolSeparator>(uri, 2, 1, "ToolSeparator"); +#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview) qmlRegisterType<QQuickTumbler, 1>(uri, 2, 1, "Tumbler"); +#endif // QtQuick.Templates 2.2 (new types and revisions in Qt 5.9) qmlRegisterRevision<QQuickAbstractButton, 2>(uri, 2, 2); @@ -238,7 +244,9 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) qmlRegisterType<QQuickSwipeDelegate, 2>(uri, 2, 2, "SwipeDelegate"); qmlRegisterType<QQuickSwipeView, 2>(uri, 2, 2, "SwipeView"); qmlRegisterType<QQuickTabBar, 2>(uri, 2, 2, "TabBar"); +#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview) qmlRegisterType<QQuickTumbler, 2>(uri, 2, 2, "Tumbler"); +#endif // NOTE: register the latest revisions of all template/control base classes to // make revisioned properties available to their subclasses (synced with Qt 5.9) |