diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-01-31 11:22:06 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-02-02 12:51:41 +0000 |
commit | 9f5e700f50ba4e7b4566775ac63224023fcbe13c (patch) | |
tree | 38abf6bbc0a919c7203fe160fcc05ae0bfb0b388 /src/imports/templates | |
parent | 855633758577750e44482843b0836cc0437ef1b2 (diff) |
Tumbler requires ListView and PathView
Change-Id: Ieb40f536cc5d68fdf13075df2c9b3e09d5077de3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/templates')
-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) |