aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrols2plugin.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-04-21 14:19:23 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-21 15:48:05 +0000
commit1ef2c051ec88c5579634f05f5983694a868b8efa (patch)
tree9a4f232072834a869ba0fb833871da357dd347b0 /src/imports/controls/qtquickcontrols2plugin.cpp
parent6a73a4cbbfcd26c4d3a5706105782f3fcb5ebd60 (diff)
import Qt.labs.controls 1.0 => QtQuick.Controls 2.0
Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/qtquickcontrols2plugin.cpp')
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
index c6982062..b819765c 100644
--- a/src/imports/controls/qtquickcontrols2plugin.cpp
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -58,7 +58,7 @@ static inline void initResources()
{
Q_INIT_RESOURCE(qtquickcontrols2plugin);
#ifdef QT_STATIC
- Q_INIT_RESOURCE(qmake_Qt_labs_controls);
+ Q_INIT_RESOURCE(qmake_QtQuick_Controls_2);
#endif
}
@@ -82,11 +82,11 @@ QtQuickControls2Plugin::QtQuickControls2Plugin(QObject *parent) : QQuickStylePlu
void QtQuickControls2Plugin::registerTypes(const char *uri)
{
- qmlRegisterType<QQuickAbstractButton>(uri, 1, 0, "AbstractButton");
- qmlRegisterType<QQuickButtonGroup>(uri, 1, 0, "ButtonGroup");
+ qmlRegisterType<QQuickAbstractButton>(uri, 2, 0, "AbstractButton");
+ qmlRegisterType<QQuickButtonGroup>(uri, 2, 0, "ButtonGroup");
qmlRegisterType<QQuickButtonGroupAttached>();
- qmlRegisterType<QQuickContainer>(uri, 1, 0, "Container");
- qmlRegisterType<QQuickControl>(uri, 1, 0, "Control");
+ qmlRegisterType<QQuickContainer>(uri, 2, 0, "Container");
+ qmlRegisterType<QQuickControl>(uri, 2, 0, "Control");
QQuickStyleSelector selector;
selector.setBaseUrl(typeUrl());
@@ -95,45 +95,45 @@ void QtQuickControls2Plugin::registerTypes(const char *uri)
if (!style.isEmpty())
QFileSelectorPrivate::addStatics(QStringList() << style);
- qmlRegisterType(selector.select(QStringLiteral("ApplicationWindow.qml")), uri, 1, 0, "ApplicationWindow");
- qmlRegisterType(selector.select(QStringLiteral("BusyIndicator.qml")), uri, 1, 0, "BusyIndicator");
- qmlRegisterType(selector.select(QStringLiteral("Button.qml")), uri, 1, 0, "Button");
- qmlRegisterType(selector.select(QStringLiteral("CheckBox.qml")), uri, 1, 0, "CheckBox");
- qmlRegisterType(selector.select(QStringLiteral("CheckDelegate.qml")), uri, 1, 0, "CheckDelegate");
- qmlRegisterType(selector.select(QStringLiteral("ComboBox.qml")), uri, 1, 0, "ComboBox");
- qmlRegisterType(selector.select(QStringLiteral("Dial.qml")), uri, 1, 0, "Dial");
- qmlRegisterType(selector.select(QStringLiteral("Drawer.qml")), uri, 1, 0, "Drawer");
- qmlRegisterType(selector.select(QStringLiteral("Frame.qml")), uri, 1, 0, "Frame");
- qmlRegisterType(selector.select(QStringLiteral("GroupBox.qml")), uri, 1, 0, "GroupBox");
- qmlRegisterType(selector.select(QStringLiteral("ItemDelegate.qml")), uri, 1, 0, "ItemDelegate");
- qmlRegisterType(selector.select(QStringLiteral("Label.qml")), uri, 1, 0, "Label");
- qmlRegisterType(selector.select(QStringLiteral("Menu.qml")), uri, 1, 0, "Menu");
- qmlRegisterType(selector.select(QStringLiteral("MenuItem.qml")), uri, 1, 0, "MenuItem");
- qmlRegisterType(selector.select(QStringLiteral("Page.qml")), uri, 1, 0, "Page");
- qmlRegisterType(selector.select(QStringLiteral("PageIndicator.qml")), uri, 1, 0, "PageIndicator");
- qmlRegisterType(selector.select(QStringLiteral("Pane.qml")), uri, 1, 0, "Pane");
- qmlRegisterType(selector.select(QStringLiteral("Popup.qml")), uri, 1, 0, "Popup");
- qmlRegisterType(selector.select(QStringLiteral("ProgressBar.qml")), uri, 1, 0, "ProgressBar");
- qmlRegisterType(selector.select(QStringLiteral("RadioButton.qml")), uri, 1, 0, "RadioButton");
- qmlRegisterType(selector.select(QStringLiteral("RadioDelegate.qml")), uri, 1, 0, "RadioDelegate");
- qmlRegisterType(selector.select(QStringLiteral("RangeSlider.qml")), uri, 1, 0, "RangeSlider");
- qmlRegisterType(selector.select(QStringLiteral("ScrollBar.qml")), uri, 1, 0, "ScrollBar");
- qmlRegisterType(selector.select(QStringLiteral("ScrollIndicator.qml")), uri, 1, 0, "ScrollIndicator");
- qmlRegisterType(selector.select(QStringLiteral("Slider.qml")), uri, 1, 0, "Slider");
- qmlRegisterType(selector.select(QStringLiteral("SpinBox.qml")), uri, 1, 0, "SpinBox");
- qmlRegisterType(selector.select(QStringLiteral("StackView.qml")), uri, 1, 0, "StackView");
- qmlRegisterType(selector.select(QStringLiteral("SwipeDelegate.qml")), uri, 1, 0, "SwipeDelegate");
- qmlRegisterType(selector.select(QStringLiteral("SwipeView.qml")), uri, 1, 0, "SwipeView");
- qmlRegisterType(selector.select(QStringLiteral("Switch.qml")), uri, 1, 0, "Switch");
- qmlRegisterType(selector.select(QStringLiteral("SwitchDelegate.qml")), uri, 1, 0, "SwitchDelegate");
- qmlRegisterType(selector.select(QStringLiteral("TabBar.qml")), uri, 1, 0, "TabBar");
- qmlRegisterType(selector.select(QStringLiteral("TabButton.qml")), uri, 1, 0, "TabButton");
- qmlRegisterType(selector.select(QStringLiteral("TextArea.qml")), uri, 1, 0, "TextArea");
- qmlRegisterType(selector.select(QStringLiteral("TextField.qml")), uri, 1, 0, "TextField");
- qmlRegisterType(selector.select(QStringLiteral("ToolBar.qml")), uri, 1, 0, "ToolBar");
- qmlRegisterType(selector.select(QStringLiteral("ToolButton.qml")), uri, 1, 0, "ToolButton");
- qmlRegisterType(selector.select(QStringLiteral("ToolTip.qml")), uri, 1, 0, "ToolTip");
- qmlRegisterType(selector.select(QStringLiteral("Tumbler.qml")), uri, 1, 0, "Tumbler");
+ qmlRegisterType(selector.select(QStringLiteral("ApplicationWindow.qml")), uri, 2, 0, "ApplicationWindow");
+ qmlRegisterType(selector.select(QStringLiteral("BusyIndicator.qml")), uri, 2, 0, "BusyIndicator");
+ qmlRegisterType(selector.select(QStringLiteral("Button.qml")), uri, 2, 0, "Button");
+ qmlRegisterType(selector.select(QStringLiteral("CheckBox.qml")), uri, 2, 0, "CheckBox");
+ qmlRegisterType(selector.select(QStringLiteral("CheckDelegate.qml")), uri, 2, 0, "CheckDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("ComboBox.qml")), uri, 2, 0, "ComboBox");
+ qmlRegisterType(selector.select(QStringLiteral("Dial.qml")), uri, 2, 0, "Dial");
+ qmlRegisterType(selector.select(QStringLiteral("Drawer.qml")), uri, 2, 0, "Drawer");
+ qmlRegisterType(selector.select(QStringLiteral("Frame.qml")), uri, 2, 0, "Frame");
+ qmlRegisterType(selector.select(QStringLiteral("GroupBox.qml")), uri, 2, 0, "GroupBox");
+ qmlRegisterType(selector.select(QStringLiteral("ItemDelegate.qml")), uri, 2, 0, "ItemDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("Label.qml")), uri, 2, 0, "Label");
+ qmlRegisterType(selector.select(QStringLiteral("Menu.qml")), uri, 2, 0, "Menu");
+ qmlRegisterType(selector.select(QStringLiteral("MenuItem.qml")), uri, 2, 0, "MenuItem");
+ qmlRegisterType(selector.select(QStringLiteral("Page.qml")), uri, 2, 0, "Page");
+ qmlRegisterType(selector.select(QStringLiteral("PageIndicator.qml")), uri, 2, 0, "PageIndicator");
+ qmlRegisterType(selector.select(QStringLiteral("Pane.qml")), uri, 2, 0, "Pane");
+ qmlRegisterType(selector.select(QStringLiteral("Popup.qml")), uri, 2, 0, "Popup");
+ qmlRegisterType(selector.select(QStringLiteral("ProgressBar.qml")), uri, 2, 0, "ProgressBar");
+ qmlRegisterType(selector.select(QStringLiteral("RadioButton.qml")), uri, 2, 0, "RadioButton");
+ qmlRegisterType(selector.select(QStringLiteral("RadioDelegate.qml")), uri, 2, 0, "RadioDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("RangeSlider.qml")), uri, 2, 0, "RangeSlider");
+ qmlRegisterType(selector.select(QStringLiteral("ScrollBar.qml")), uri, 2, 0, "ScrollBar");
+ qmlRegisterType(selector.select(QStringLiteral("ScrollIndicator.qml")), uri, 2, 0, "ScrollIndicator");
+ qmlRegisterType(selector.select(QStringLiteral("Slider.qml")), uri, 2, 0, "Slider");
+ qmlRegisterType(selector.select(QStringLiteral("SpinBox.qml")), uri, 2, 0, "SpinBox");
+ qmlRegisterType(selector.select(QStringLiteral("StackView.qml")), uri, 2, 0, "StackView");
+ qmlRegisterType(selector.select(QStringLiteral("SwipeDelegate.qml")), uri, 2, 0, "SwipeDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("SwipeView.qml")), uri, 2, 0, "SwipeView");
+ qmlRegisterType(selector.select(QStringLiteral("Switch.qml")), uri, 2, 0, "Switch");
+ qmlRegisterType(selector.select(QStringLiteral("SwitchDelegate.qml")), uri, 2, 0, "SwitchDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("TabBar.qml")), uri, 2, 0, "TabBar");
+ qmlRegisterType(selector.select(QStringLiteral("TabButton.qml")), uri, 2, 0, "TabButton");
+ qmlRegisterType(selector.select(QStringLiteral("TextArea.qml")), uri, 2, 0, "TextArea");
+ qmlRegisterType(selector.select(QStringLiteral("TextField.qml")), uri, 2, 0, "TextField");
+ qmlRegisterType(selector.select(QStringLiteral("ToolBar.qml")), uri, 2, 0, "ToolBar");
+ qmlRegisterType(selector.select(QStringLiteral("ToolButton.qml")), uri, 2, 0, "ToolButton");
+ qmlRegisterType(selector.select(QStringLiteral("ToolTip.qml")), uri, 2, 0, "ToolTip");
+ qmlRegisterType(selector.select(QStringLiteral("Tumbler.qml")), uri, 2, 0, "Tumbler");
}
void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
@@ -143,15 +143,15 @@ void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *ur
engine->addImageProvider(QStringLiteral("default"), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/Qt/labs/controls/images")));
const QByteArray import = QByteArray(uri) + ".impl";
- qmlRegisterType<QQuickBusyIndicatorRing>(import, 1, 0, "BusyRing");
- qmlRegisterType<QQuickBusyIndicatorAnimator>(import, 1, 0, "BusyRingAnimator");
- qmlRegisterType<QQuickProgressStrip>(import, 1, 0, "ProgressStrip");
- qmlRegisterType<QQuickProgressAnimator>(import, 1, 0, "ProgressStripAnimator");
- qmlRegisterType<QQuickDialRing>(import, 1, 0, "DialRing");
-
- qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 1, 0, "CheckIndicator");
- qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 1, 0, "RadioIndicator");
- qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 1, 0, "SwitchIndicator");
+ qmlRegisterType<QQuickBusyIndicatorRing>(import, 2, 0, "BusyRing");
+ qmlRegisterType<QQuickBusyIndicatorAnimator>(import, 2, 0, "BusyRingAnimator");
+ qmlRegisterType<QQuickProgressStrip>(import, 2, 0, "ProgressStrip");
+ qmlRegisterType<QQuickProgressAnimator>(import, 2, 0, "ProgressStripAnimator");
+ qmlRegisterType<QQuickDialRing>(import, 2, 0, "DialRing");
+
+ qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator");
}
QT_END_NAMESPACE