diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-04-21 13:51:20 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-04-21 14:09:05 +0000 |
commit | 6b61cc32deaa202e7f46f4be426329db6a40ac3f (patch) | |
tree | 88056961b1ecc947e7b89f8ea5e7287f35848753 /src/imports/templates | |
parent | b44194ecc62e7c2d51a90bad17a41451319f7c1f (diff) |
import Qt.labs.templates 1.0 => QtQuick.Templates 2.0
Even though there never was such thing is QtQuick.Templates 1.0,
we'll use version 2.0 to keep it in sync with QtQuick.Controls 2.0
(next step). The templates define (and in the future, revision) the
API of the controls, so the two must have the same version or it
will get messy.
Docs and plugins.qmltypes will be updated in follow up commits.
Change-Id: Idc2e76f32f348ba35eb4b1fa167c6868300aa910
Task-number: QTBUG-52549
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/templates')
-rw-r--r-- | src/imports/templates/qmldir | 2 | ||||
-rw-r--r-- | src/imports/templates/qtquicktemplates2plugin.cpp | 96 | ||||
-rw-r--r-- | src/imports/templates/templates.pro | 4 |
3 files changed, 51 insertions, 51 deletions
diff --git a/src/imports/templates/qmldir b/src/imports/templates/qmldir index f0f834c3..afb94818 100644 --- a/src/imports/templates/qmldir +++ b/src/imports/templates/qmldir @@ -1,4 +1,4 @@ -module Qt.labs.templates +module QtQuick.Templates plugin qtquicktemplates2plugin classname QtQuickTemplates2Plugin depends QtQuick.Window 2.2 diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index 7ce42ac2..db3eadab 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -83,7 +83,7 @@ static inline void initResources() { #ifdef QT_STATIC - Q_INIT_RESOURCE(qmake_Qt_labs_templates); + Q_INIT_RESOURCE(qmake_QtQuick_Templates_2); #endif } @@ -106,62 +106,62 @@ QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent) : QQmlExtensio void QtQuickTemplates2Plugin::registerTypes(const char *uri) { - qmlRegisterType<QQuickAbstractButton>(uri, 1, 0, "AbstractButton"); - qmlRegisterType<QQuickApplicationWindow>(uri, 1, 0, "ApplicationWindow"); + qmlRegisterType<QQuickAbstractButton>(uri, 2, 0, "AbstractButton"); + qmlRegisterType<QQuickApplicationWindow>(uri, 2, 0, "ApplicationWindow"); qmlRegisterType<QQuickApplicationWindowAttached>(); - qmlRegisterType<QQuickBusyIndicator>(uri, 1, 0, "BusyIndicator"); - qmlRegisterType<QQuickButton>(uri, 1, 0, "Button"); - qmlRegisterType<QQuickCheckBox>(uri, 1, 0, "CheckBox"); - qmlRegisterType<QQuickCheckDelegate>(uri, 1, 0, "CheckDelegate"); - qmlRegisterType<QQuickComboBox>(uri, 1, 0, "ComboBox"); - qmlRegisterType<QQuickContainer>(uri, 1, 0, "Container"); - qmlRegisterType<QQuickControl>(uri, 1, 0, "Control"); - qmlRegisterType<QQuickDial>(uri, 1, 0, "Dial"); - qmlRegisterType<QQuickDrawer>(uri, 1, 0, "Drawer"); - qmlRegisterType<QQuickFrame>(uri, 1, 0, "Frame"); - qmlRegisterType<QQuickGroupBox>(uri, 1, 0, "GroupBox"); - qmlRegisterType<QQuickItemDelegate>(uri, 1, 0, "ItemDelegate"); - qmlRegisterType<QQuickLabel>(uri, 1, 0, "Label"); - qmlRegisterType<QQuickMenu>(uri, 1, 0, "Menu"); - qmlRegisterType<QQuickMenuItem>(uri, 1, 0, "MenuItem"); + qmlRegisterType<QQuickBusyIndicator>(uri, 2, 0, "BusyIndicator"); + qmlRegisterType<QQuickButton>(uri, 2, 0, "Button"); + qmlRegisterType<QQuickCheckBox>(uri, 2, 0, "CheckBox"); + qmlRegisterType<QQuickCheckDelegate>(uri, 2, 0, "CheckDelegate"); + qmlRegisterType<QQuickComboBox>(uri, 2, 0, "ComboBox"); + qmlRegisterType<QQuickContainer>(uri, 2, 0, "Container"); + qmlRegisterType<QQuickControl>(uri, 2, 0, "Control"); + qmlRegisterType<QQuickDial>(uri, 2, 0, "Dial"); + qmlRegisterType<QQuickDrawer>(uri, 2, 0, "Drawer"); + qmlRegisterType<QQuickFrame>(uri, 2, 0, "Frame"); + qmlRegisterType<QQuickGroupBox>(uri, 2, 0, "GroupBox"); + qmlRegisterType<QQuickItemDelegate>(uri, 2, 0, "ItemDelegate"); + qmlRegisterType<QQuickLabel>(uri, 2, 0, "Label"); + qmlRegisterType<QQuickMenu>(uri, 2, 0, "Menu"); + qmlRegisterType<QQuickMenuItem>(uri, 2, 0, "MenuItem"); qmlRegisterType<QQuickOverlay>(); - qmlRegisterType<QQuickPage>(uri, 1, 0, "Page"); - qmlRegisterType<QQuickPageIndicator>(uri, 1, 0, "PageIndicator"); - qmlRegisterType<QQuickPane>(uri, 1, 0, "Pane"); - qmlRegisterType<QQuickPopup>(uri, 1, 0, "Popup"); - qmlRegisterType<QQuickProgressBar>(uri, 1, 0, "ProgressBar"); - qmlRegisterType<QQuickRadioButton>(uri, 1, 0, "RadioButton"); - qmlRegisterType<QQuickRadioDelegate>(uri, 1, 0, "RadioDelegate"); - qmlRegisterType<QQuickRangeSlider>(uri, 1, 0, "RangeSlider"); + qmlRegisterType<QQuickPage>(uri, 2, 0, "Page"); + qmlRegisterType<QQuickPageIndicator>(uri, 2, 0, "PageIndicator"); + qmlRegisterType<QQuickPane>(uri, 2, 0, "Pane"); + qmlRegisterType<QQuickPopup>(uri, 2, 0, "Popup"); + qmlRegisterType<QQuickProgressBar>(uri, 2, 0, "ProgressBar"); + qmlRegisterType<QQuickRadioButton>(uri, 2, 0, "RadioButton"); + qmlRegisterType<QQuickRadioDelegate>(uri, 2, 0, "RadioDelegate"); + qmlRegisterType<QQuickRangeSlider>(uri, 2, 0, "RangeSlider"); qmlRegisterType<QQuickRangeSliderNode>(); - qmlRegisterType<QQuickScrollBar>(uri, 1, 0, "ScrollBar"); - qmlRegisterType<QQuickScrollIndicator>(uri, 1, 0, "ScrollIndicator"); - qmlRegisterType<QQuickSlider>(uri, 1, 0, "Slider"); - qmlRegisterType<QQuickSpinBox>(uri, 1, 0, "SpinBox"); + qmlRegisterType<QQuickScrollBar>(uri, 2, 0, "ScrollBar"); + qmlRegisterType<QQuickScrollIndicator>(uri, 2, 0, "ScrollIndicator"); + qmlRegisterType<QQuickSlider>(uri, 2, 0, "Slider"); + qmlRegisterType<QQuickSpinBox>(uri, 2, 0, "SpinBox"); qmlRegisterType<QQuickSpinButton>(); - qmlRegisterType<QQuickStackView>(uri, 1, 0, "StackView"); - qmlRegisterType<QQuickSwipeDelegate>(uri, 1, 0, "SwipeDelegate"); + qmlRegisterType<QQuickStackView>(uri, 2, 0, "StackView"); + qmlRegisterType<QQuickSwipeDelegate>(uri, 2, 0, "SwipeDelegate"); qmlRegisterType<QQuickSwipeExposure>(); qmlRegisterType<QQuickSwipeViewAttached>(); - qmlRegisterType<QQuickSwipeView>(uri, 1, 0, "SwipeView"); - qmlRegisterType<QQuickSwitch>(uri, 1, 0, "Switch"); - qmlRegisterType<QQuickSwitchDelegate>(uri, 1, 0, "SwitchDelegate"); - qmlRegisterType<QQuickTabBar>(uri, 1, 0, "TabBar"); - qmlRegisterType<QQuickTabButton>(uri, 1, 0, "TabButton"); - qmlRegisterType<QQuickTextArea>(uri, 1, 0, "TextArea"); - qmlRegisterType<QQuickTextField>(uri, 1, 0, "TextField"); - qmlRegisterType<QQuickToolBar>(uri, 1, 0, "ToolBar"); - qmlRegisterType<QQuickToolButton>(uri, 1, 0, "ToolButton"); + qmlRegisterType<QQuickSwipeView>(uri, 2, 0, "SwipeView"); + qmlRegisterType<QQuickSwitch>(uri, 2, 0, "Switch"); + qmlRegisterType<QQuickSwitchDelegate>(uri, 2, 0, "SwitchDelegate"); + qmlRegisterType<QQuickTabBar>(uri, 2, 0, "TabBar"); + qmlRegisterType<QQuickTabButton>(uri, 2, 0, "TabButton"); + qmlRegisterType<QQuickTextArea>(uri, 2, 0, "TextArea"); + qmlRegisterType<QQuickTextField>(uri, 2, 0, "TextField"); + qmlRegisterType<QQuickToolBar>(uri, 2, 0, "ToolBar"); + qmlRegisterType<QQuickToolButton>(uri, 2, 0, "ToolButton"); qmlRegisterType<QQuickToolTipAttached>(); - qmlRegisterType<QQuickToolTip>(uri, 1, 0, "ToolTip"); + qmlRegisterType<QQuickToolTip>(uri, 2, 0, "ToolTip"); qmlRegisterType<QQuickTumblerAttached>(); - qmlRegisterType<QQuickTumbler>(uri, 1, 0, "Tumbler"); + qmlRegisterType<QQuickTumbler>(uri, 2, 0, "Tumbler"); - qmlRegisterRevision<QQuickItem, 2>(uri, 1, 0); - qmlRegisterRevision<QQuickWindow, 2>(uri, 1, 0); - qmlRegisterRevision<QQuickText, 6>(uri, 1, 0); - qmlRegisterRevision<QQuickTextInput, 6>(uri, 1, 0); - qmlRegisterRevision<QQuickTextEdit, 6>(uri, 1, 0); + qmlRegisterRevision<QQuickItem, 2>(uri, 2, 0); + qmlRegisterRevision<QQuickWindow, 2>(uri, 2, 0); + qmlRegisterRevision<QQuickText, 6>(uri, 2, 0); + qmlRegisterRevision<QQuickTextInput, 6>(uri, 2, 0); + qmlRegisterRevision<QQuickTextEdit, 6>(uri, 2, 0); } QT_END_NAMESPACE diff --git a/src/imports/templates/templates.pro b/src/imports/templates/templates.pro index 1edac4c3..8785734a 100644 --- a/src/imports/templates/templates.pro +++ b/src/imports/templates/templates.pro @@ -1,6 +1,6 @@ TARGET = qtquicktemplates2plugin -TARGETPATH = Qt/labs/templates -IMPORT_VERSION = 1.0 +TARGETPATH = QtQuick/Templates.2 +IMPORT_VERSION = 2.0 QT += qml quick QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private |