aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-03-27 11:17:35 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-08-26 11:45:57 +0200
commit5246dd2de211ffb81313a5c29ae7894545a28c43 (patch)
treeeedd1652642e519ccd8603612378eb5c0bfdca83 /src/imports/controls
parent9aafea810b8867fb31f9ec27a238628467e7ab56 (diff)
Register C++ types declaratively
Adapt to the new way of registering C++ types. The types need to be seen at compile time so that code can be generated that invokes them. This patch: - Adds QML_* macros where applicable. - Adapts the build system files to the new way of registering modules. - Splits up the QtQuick.Controls[.*].impl files into their own plugins, as we can only register one QML module per .pro file. - Removes C++ type registration calls in every plugin. - Moves private types from src/quickcontrols2/quickcontrols2.pro to src/quickcontrols2/impl/quickcontrols2-impl.pro. Some of these types need to be exposed to QML, but quickcontrols2.pro is already in use to declare the QtQuick.Controls import (and also provides the public C++ QQuickStyle API), and the new QML_IMPORT_NAME/VERSION syntax only allows one module per project. As some of the types that need to be exposed to QML are also referenced by some C++ code (e.g. tests, etc.), we just move all of the private types to the new library. Follow-up patches will register the QML types declaratively. Task-number: QTBUG-82922 Change-Id: Iaf9ee106237d61701d57a8896f3822304c8151a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/imports/controls')
-rw-r--r--src/imports/controls/.prev_CMakeLists.txt6
-rw-r--r--src/imports/controls/CMakeLists.txt6
-rw-r--r--src/imports/controls/controls.pro2
-rw-r--r--src/imports/controls/default/BusyIndicator.qml2
-rw-r--r--src/imports/controls/default/Dial.qml1
-rw-r--r--src/imports/controls/default/ProgressBar.qml2
-rw-r--r--src/imports/controls/default/default.pri6
-rw-r--r--src/imports/controls/default/impl/default-impl.pro30
-rw-r--r--src/imports/controls/default/impl/qmldir5
-rw-r--r--src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp (renamed from src/imports/controls/default/qquickdefaultbusyindicator.cpp)2
-rw-r--r--src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h (renamed from src/imports/controls/default/qquickdefaultbusyindicator_p.h)2
-rw-r--r--src/imports/controls/default/impl/qquickdefaultdial.cpp (renamed from src/imports/controls/default/qquickdefaultdial.cpp)0
-rw-r--r--src/imports/controls/default/impl/qquickdefaultdial_p.h (renamed from src/imports/controls/default/qquickdefaultdial_p.h)2
-rw-r--r--src/imports/controls/default/impl/qquickdefaultprogressbar.cpp (renamed from src/imports/controls/default/qquickdefaultprogressbar.cpp)2
-rw-r--r--src/imports/controls/default/impl/qquickdefaultprogressbar_p.h (renamed from src/imports/controls/default/qquickdefaultprogressbar_p.h)2
-rw-r--r--src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp57
-rw-r--r--src/imports/controls/default/qquickdefaultstyle_p.h4
-rw-r--r--src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp33
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc2
-rw-r--r--src/imports/controls/fusion/.prev_CMakeLists.txt6
-rw-r--r--src/imports/controls/fusion/CMakeLists.txt6
-rw-r--r--src/imports/controls/fusion/ComboBox.qml2
-rw-r--r--src/imports/controls/fusion/MenuItem.qml2
-rw-r--r--src/imports/controls/fusion/ProgressBar.qml2
-rw-r--r--src/imports/controls/fusion/SpinBox.qml4
-rw-r--r--src/imports/controls/fusion/fusion.pri12
-rw-r--r--src/imports/controls/fusion/impl/ButtonPanel.qml (renamed from src/imports/controls/fusion/ButtonPanel.qml)0
-rw-r--r--src/imports/controls/fusion/impl/CheckIndicator.qml (renamed from src/imports/controls/fusion/CheckIndicator.qml)2
-rw-r--r--src/imports/controls/fusion/impl/RadioIndicator.qml (renamed from src/imports/controls/fusion/RadioIndicator.qml)0
-rw-r--r--src/imports/controls/fusion/impl/SliderGroove.qml (renamed from src/imports/controls/fusion/SliderGroove.qml)0
-rw-r--r--src/imports/controls/fusion/impl/SliderHandle.qml (renamed from src/imports/controls/fusion/SliderHandle.qml)0
-rw-r--r--src/imports/controls/fusion/impl/SwitchIndicator.qml (renamed from src/imports/controls/fusion/SwitchIndicator.qml)0
-rw-r--r--src/imports/controls/fusion/impl/fusion-impl.pro39
-rw-r--r--src/imports/controls/fusion/impl/qmldir3
-rw-r--r--src/imports/controls/fusion/impl/qquickfusionbusyindicator.cpp (renamed from src/imports/controls/fusion/qquickfusionbusyindicator.cpp)0
-rw-r--r--src/imports/controls/fusion/impl/qquickfusionbusyindicator_p.h (renamed from src/imports/controls/fusion/qquickfusionbusyindicator_p.h)2
-rw-r--r--src/imports/controls/fusion/impl/qquickfusiondial.cpp (renamed from src/imports/controls/fusion/qquickfusiondial.cpp)0
-rw-r--r--src/imports/controls/fusion/impl/qquickfusiondial_p.h (renamed from src/imports/controls/fusion/qquickfusiondial_p.h)2
-rw-r--r--src/imports/controls/fusion/impl/qquickfusionknob.cpp (renamed from src/imports/controls/fusion/qquickfusionknob.cpp)0
-rw-r--r--src/imports/controls/fusion/impl/qquickfusionknob_p.h (renamed from src/imports/controls/fusion/qquickfusionknob_p.h)2
-rw-r--r--src/imports/controls/fusion/impl/qtquickcontrols2fusionstyleimplplugin.cpp57
-rw-r--r--src/imports/controls/fusion/qquickfusionstyle_p.h4
-rw-r--r--src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc2
-rw-r--r--src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp21
-rw-r--r--src/imports/controls/imagine/.prev_CMakeLists.txt6
-rw-r--r--src/imports/controls/imagine/CMakeLists.txt6
-rw-r--r--src/imports/controls/imagine/imagine.pri21
-rw-r--r--src/imports/controls/imagine/imagine.pro9
-rw-r--r--src/imports/controls/imagine/impl/OpacityMask.qml (renamed from src/imports/controls/imagine/OpacityMask.qml)2
-rw-r--r--src/imports/controls/imagine/impl/imagine-impl.pro39
-rw-r--r--src/imports/controls/imagine/impl/qmldir6
-rw-r--r--src/imports/controls/imagine/impl/qquickimageselector.cpp (renamed from src/imports/controls/imagine/qquickimageselector.cpp)4
-rw-r--r--src/imports/controls/imagine/impl/qquickimageselector_p.h (renamed from src/imports/controls/imagine/qquickimageselector_p.h)6
-rw-r--r--src/imports/controls/imagine/impl/qquickninepatchimage.cpp (renamed from src/imports/controls/imagine/qquickninepatchimage.cpp)0
-rw-r--r--src/imports/controls/imagine/impl/qquickninepatchimage_p.h (renamed from src/imports/controls/imagine/qquickninepatchimage_p.h)2
-rw-r--r--src/imports/controls/imagine/impl/qtquickcontrols2imaginestyleimplplugin.cpp57
-rw-r--r--src/imports/controls/imagine/impl/shaders/+glslcore/OpacityMask.frag (renamed from src/imports/controls/imagine/shaders/+glslcore/OpacityMask.frag)0
-rw-r--r--src/imports/controls/imagine/impl/shaders/+qsb/OpacityMask.frag (renamed from src/imports/controls/imagine/shaders/+qsb/OpacityMask.frag)bin1409 -> 1409 bytes
-rw-r--r--src/imports/controls/imagine/impl/shaders/OpacityMask.frag (renamed from src/imports/controls/imagine/shaders/OpacityMask.frag)0
-rw-r--r--src/imports/controls/imagine/impl/shaders/OpacityMask_rhi.frag (renamed from src/imports/controls/imagine/shaders/OpacityMask_rhi.frag)0
-rw-r--r--src/imports/controls/imagine/impl/shaders/compile.bat (renamed from src/imports/controls/imagine/shaders/compile.bat)0
-rw-r--r--src/imports/controls/imagine/qquickimaginestyle.cpp4
-rw-r--r--src/imports/controls/imagine/qquickimaginestyle_p.h6
-rw-r--r--src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp25
-rw-r--r--src/imports/controls/material/.prev_CMakeLists.txt6
-rw-r--r--src/imports/controls/material/CMakeLists.txt6
-rw-r--r--src/imports/controls/material/ComboBox.qml2
-rw-r--r--src/imports/controls/material/MenuItem.qml2
-rw-r--r--src/imports/controls/material/impl/BoxShadow.qml (renamed from src/imports/controls/material/BoxShadow.qml)0
-rw-r--r--src/imports/controls/material/impl/CheckIndicator.qml (renamed from src/imports/controls/material/CheckIndicator.qml)2
-rw-r--r--src/imports/controls/material/impl/CursorDelegate.qml (renamed from src/imports/controls/material/CursorDelegate.qml)0
-rw-r--r--src/imports/controls/material/impl/ElevationEffect.qml (renamed from src/imports/controls/material/ElevationEffect.qml)0
-rw-r--r--src/imports/controls/material/impl/RadioIndicator.qml (renamed from src/imports/controls/material/RadioIndicator.qml)0
-rw-r--r--src/imports/controls/material/impl/RectangularGlow.qml (renamed from src/imports/controls/material/RectangularGlow.qml)2
-rw-r--r--src/imports/controls/material/impl/SliderHandle.qml (renamed from src/imports/controls/material/SliderHandle.qml)0
-rw-r--r--src/imports/controls/material/impl/SwitchIndicator.qml (renamed from src/imports/controls/material/SwitchIndicator.qml)0
-rw-r--r--src/imports/controls/material/impl/material-impl.pro41
-rw-r--r--src/imports/controls/material/impl/qmldir3
-rw-r--r--src/imports/controls/material/impl/qquickmaterialbusyindicator.cpp (renamed from src/imports/controls/material/qquickmaterialbusyindicator.cpp)2
-rw-r--r--src/imports/controls/material/impl/qquickmaterialbusyindicator_p.h (renamed from src/imports/controls/material/qquickmaterialbusyindicator_p.h)2
-rw-r--r--src/imports/controls/material/impl/qquickmaterialprogressbar.cpp (renamed from src/imports/controls/material/qquickmaterialprogressbar.cpp)2
-rw-r--r--src/imports/controls/material/impl/qquickmaterialprogressbar_p.h (renamed from src/imports/controls/material/qquickmaterialprogressbar_p.h)2
-rw-r--r--src/imports/controls/material/impl/qquickmaterialripple.cpp (renamed from src/imports/controls/material/qquickmaterialripple.cpp)2
-rw-r--r--src/imports/controls/material/impl/qquickmaterialripple_p.h (renamed from src/imports/controls/material/qquickmaterialripple_p.h)2
-rw-r--r--src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp57
-rw-r--r--src/imports/controls/material/material.pri14
-rw-r--r--src/imports/controls/material/material.pro2
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h7
-rw-r--r--src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp11
-rw-r--r--src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc2
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp22
-rw-r--r--src/imports/controls/universal/.prev_CMakeLists.txt6
-rw-r--r--src/imports/controls/universal/CMakeLists.txt6
-rw-r--r--src/imports/controls/universal/ComboBox.qml2
-rw-r--r--src/imports/controls/universal/MenuItem.qml4
-rw-r--r--src/imports/controls/universal/SpinBox.qml4
-rw-r--r--src/imports/controls/universal/impl/CheckIndicator.qml (renamed from src/imports/controls/universal/CheckIndicator.qml)2
-rw-r--r--src/imports/controls/universal/impl/RadioIndicator.qml (renamed from src/imports/controls/universal/RadioIndicator.qml)0
-rw-r--r--src/imports/controls/universal/impl/SwitchIndicator.qml (renamed from src/imports/controls/universal/SwitchIndicator.qml)0
-rw-r--r--src/imports/controls/universal/impl/qmldir3
-rw-r--r--src/imports/controls/universal/impl/qquickuniversalbusyindicator.cpp (renamed from src/imports/controls/universal/qquickuniversalbusyindicator.cpp)2
-rw-r--r--src/imports/controls/universal/impl/qquickuniversalbusyindicator_p.h (renamed from src/imports/controls/universal/qquickuniversalbusyindicator_p.h)2
-rw-r--r--src/imports/controls/universal/impl/qquickuniversalfocusrectangle.cpp (renamed from src/imports/controls/universal/qquickuniversalfocusrectangle.cpp)0
-rw-r--r--src/imports/controls/universal/impl/qquickuniversalfocusrectangle_p.h (renamed from src/imports/controls/universal/qquickuniversalfocusrectangle_p.h)2
-rw-r--r--src/imports/controls/universal/impl/qquickuniversalprogressbar.cpp (renamed from src/imports/controls/universal/qquickuniversalprogressbar.cpp)2
-rw-r--r--src/imports/controls/universal/impl/qquickuniversalprogressbar_p.h (renamed from src/imports/controls/universal/qquickuniversalprogressbar_p.h)2
-rw-r--r--src/imports/controls/universal/impl/qtquickcontrols2universalstyleimplplugin.cpp57
-rw-r--r--src/imports/controls/universal/impl/universal-impl.pro36
-rw-r--r--src/imports/controls/universal/qquickuniversalstyle_p.h7
-rw-r--r--src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp12
-rw-r--r--src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc2
-rw-r--r--src/imports/controls/universal/universal.pri25
-rw-r--r--src/imports/controls/universal/universal.pro2
113 files changed, 651 insertions, 245 deletions
diff --git a/src/imports/controls/.prev_CMakeLists.txt b/src/imports/controls/.prev_CMakeLists.txt
index e017f0fe..a8f8da6b 100644
--- a/src/imports/controls/.prev_CMakeLists.txt
+++ b/src/imports/controls/.prev_CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
add_qml_module(qtquickcontrols2plugin
- TARGET_PATH "QtQuick/Controls.2"
+ TARGET_PATH "QtQuick/Controls"
URI "QtQuick.Controls"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
DESIGNER_SUPPORTED
@@ -63,7 +63,7 @@ set(qtquickcontrols2plugin_resource_files
add_qt_resource(qtquickcontrols2plugin "qtquickcontrols2plugin"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2"
+ "/qt-project.org/imports/QtQuick/Controls"
FILES
${qtquickcontrols2plugin_resource_files}
)
@@ -72,7 +72,7 @@ add_qt_resource(qtquickcontrols2plugin "qtquickcontrols2plugin"
#### Keys ignored in scope 1:.:.:controls.pro:<TRUE>:
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES" "$$PWD/snippets/*.qml" "$$PWD/src/*.qdoc" "$$PWD/src/calendar/*.qdoc" "$$PWD/src/templates/*.qdoc"
-# TARGETPATH = "QtQuick/Controls.2"
+# TARGETPATH = "QtQuick/Controls"
# _REQUIREMENTS = "qtConfig(quickcontrols2-default)"
## Scopes:
diff --git a/src/imports/controls/CMakeLists.txt b/src/imports/controls/CMakeLists.txt
index 3cef4d26..567de0fd 100644
--- a/src/imports/controls/CMakeLists.txt
+++ b/src/imports/controls/CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquickcontrols2plugin
- TARGET_PATH "QtQuick/Controls.2"
+ TARGET_PATH "QtQuick/Controls"
URI "QtQuick.Controls"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
DESIGNER_SUPPORTED
@@ -63,7 +63,7 @@ set(qtquickcontrols2plugin_resource_files
qt_add_resource(qtquickcontrols2plugin "qtquickcontrols2plugin"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2"
+ "/qt-project.org/imports/QtQuick/Controls"
FILES
${qtquickcontrols2plugin_resource_files}
)
@@ -72,7 +72,7 @@ qt_add_resource(qtquickcontrols2plugin "qtquickcontrols2plugin"
#### Keys ignored in scope 1:.:.:controls.pro:<TRUE>:
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES" "$$PWD/snippets/*.qml" "$$PWD/src/*.qdoc" "$$PWD/src/templates/*.qdoc"
-# TARGETPATH = "QtQuick/Controls.2"
+# TARGETPATH = "QtQuick/Controls"
# _REQUIREMENTS = "qtConfig(quickcontrols2-default)"
## Scopes:
diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro
index 9440c36f..5a782f2d 100644
--- a/src/imports/controls/controls.pro
+++ b/src/imports/controls/controls.pro
@@ -3,7 +3,7 @@ TARGETPATH = QtQuick/Controls.2
IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private quickcontrols2impl-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
diff --git a/src/imports/controls/default/BusyIndicator.qml b/src/imports/controls/default/BusyIndicator.qml
index ff5c191c..c8b12732 100644
--- a/src/imports/controls/default/BusyIndicator.qml
+++ b/src/imports/controls/default/BusyIndicator.qml
@@ -36,7 +36,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
-import QtQuick.Controls.impl 2.12
+import QtQuick.Controls.Default.impl 2.12
import QtQuick.Templates 2.12 as T
T.BusyIndicator {
diff --git a/src/imports/controls/default/Dial.qml b/src/imports/controls/default/Dial.qml
index 457016d3..daae1e64 100644
--- a/src/imports/controls/default/Dial.qml
+++ b/src/imports/controls/default/Dial.qml
@@ -37,6 +37,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.impl 2.12
+import QtQuick.Controls.Default.impl 2.12
import QtQuick.Templates 2.12 as T
T.Dial {
diff --git a/src/imports/controls/default/ProgressBar.qml b/src/imports/controls/default/ProgressBar.qml
index 61cdea43..218cc442 100644
--- a/src/imports/controls/default/ProgressBar.qml
+++ b/src/imports/controls/default/ProgressBar.qml
@@ -37,7 +37,7 @@
import QtQuick 2.12
import QtQuick.Templates 2.12 as T
import QtQuick.Controls 2.12
-import QtQuick.Controls.impl 2.12
+import QtQuick.Controls.Default.impl 2.12
T.ProgressBar {
id: control
diff --git a/src/imports/controls/default/default.pri b/src/imports/controls/default/default.pri
index 03fc0f4b..e7147af4 100644
--- a/src/imports/controls/default/default.pri
+++ b/src/imports/controls/default/default.pri
@@ -1,14 +1,8 @@
HEADERS += \
- $$PWD/qquickdefaultbusyindicator_p.h \
- $$PWD/qquickdefaultdial_p.h \
- $$PWD/qquickdefaultprogressbar_p.h \
$$PWD/qquickdefaultstyle_p.h \
$$PWD/qquickdefaulttheme_p.h
SOURCES += \
- $$PWD/qquickdefaultbusyindicator.cpp \
- $$PWD/qquickdefaultdial.cpp \
- $$PWD/qquickdefaultprogressbar.cpp \
$$PWD/qquickdefaultstyle.cpp \
$$PWD/qquickdefaulttheme.cpp
diff --git a/src/imports/controls/default/impl/default-impl.pro b/src/imports/controls/default/impl/default-impl.pro
new file mode 100644
index 00000000..88ec2077
--- /dev/null
+++ b/src/imports/controls/default/impl/default-impl.pro
@@ -0,0 +1,30 @@
+TARGET = qtquickcontrols2defaultstyleimplplugin
+TARGETPATH = QtQuick/Controls.2/Default/impl
+
+QML_IMPORT_NAME = QtQuick.Controls.Default.impl
+QML_IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private
+QT_FOR_CONFIG = quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+OTHER_FILES += \
+ qmldir
+
+HEADERS += \
+ $$PWD/qquickdefaultbusyindicator_p.h \
+ $$PWD/qquickdefaultdial_p.h \
+ $$PWD/qquickdefaultprogressbar_p.h
+
+SOURCES += \
+ $$PWD/qquickdefaultbusyindicator.cpp \
+ $$PWD/qquickdefaultdial.cpp \
+ $$PWD/qquickdefaultprogressbar.cpp \
+ $$PWD/qtquickcontrols2defaultstyleimplplugin.cpp
+
+CONFIG += qmltypes install_qmltypes no_cxx_module
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-default))
diff --git a/src/imports/controls/default/impl/qmldir b/src/imports/controls/default/impl/qmldir
new file mode 100644
index 00000000..95deed07
--- /dev/null
+++ b/src/imports/controls/default/impl/qmldir
@@ -0,0 +1,5 @@
+module QtQuick.Controls.Default.impl
+plugin qtquickcontrols2defaultstyleimplplugin
+classname QtQuickControls2DefaultStyleImplPlugin
+depends QtQuick.Templates 6.0
+depends QtQuick.Controls 6.0
diff --git a/src/imports/controls/default/qquickdefaultbusyindicator.cpp b/src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp
index aca795d9..880d869b 100644
--- a/src/imports/controls/default/qquickdefaultbusyindicator.cpp
+++ b/src/imports/controls/default/impl/qquickdefaultbusyindicator.cpp
@@ -38,7 +38,7 @@
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qsgadaptationlayer_p.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/default/qquickdefaultbusyindicator_p.h b/src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h
index eedaf09a..5cd60ff5 100644
--- a/src/imports/controls/default/qquickdefaultbusyindicator_p.h
+++ b/src/imports/controls/default/impl/qquickdefaultbusyindicator_p.h
@@ -59,6 +59,8 @@ class QQuickDefaultBusyIndicator : public QQuickItem
Q_PROPERTY(QColor pen READ pen WRITE setPen FINAL)
Q_PROPERTY(QColor fill READ fill WRITE setFill FINAL)
Q_PROPERTY(bool running READ isRunning WRITE setRunning)
+ QML_NAMED_ELEMENT(BusyIndicatorImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDefaultBusyIndicator(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/default/qquickdefaultdial.cpp b/src/imports/controls/default/impl/qquickdefaultdial.cpp
index 1653def7..1653def7 100644
--- a/src/imports/controls/default/qquickdefaultdial.cpp
+++ b/src/imports/controls/default/impl/qquickdefaultdial.cpp
diff --git a/src/imports/controls/default/qquickdefaultdial_p.h b/src/imports/controls/default/impl/qquickdefaultdial_p.h
index 73e14321..7cdc5e9a 100644
--- a/src/imports/controls/default/qquickdefaultdial_p.h
+++ b/src/imports/controls/default/impl/qquickdefaultdial_p.h
@@ -58,6 +58,8 @@ class QQuickDefaultDial : public QQuickPaintedItem
Q_OBJECT
Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ QML_NAMED_ELEMENT(DialImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDefaultDial(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/default/qquickdefaultprogressbar.cpp b/src/imports/controls/default/impl/qquickdefaultprogressbar.cpp
index f44065e4..fcaada94 100644
--- a/src/imports/controls/default/qquickdefaultprogressbar.cpp
+++ b/src/imports/controls/default/impl/qquickdefaultprogressbar.cpp
@@ -39,7 +39,7 @@
#include <QtCore/qeasingcurve.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qsgadaptationlayer_p.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/default/qquickdefaultprogressbar_p.h b/src/imports/controls/default/impl/qquickdefaultprogressbar_p.h
index 241d0b3b..3e4955c4 100644
--- a/src/imports/controls/default/qquickdefaultprogressbar_p.h
+++ b/src/imports/controls/default/impl/qquickdefaultprogressbar_p.h
@@ -59,6 +59,8 @@ class QQuickDefaultProgressBar : public QQuickItem
Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ QML_NAMED_ELEMENT(ProgressBarImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDefaultProgressBar(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp b/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp
new file mode 100644
index 00000000..734d32de
--- /dev/null
+++ b/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2DefaultStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2DefaultStyleImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2DefaultStyleImplPlugin::QtQuickControls2DefaultStyleImplPlugin(QObject *parent)
+ : QQmlEngineExtensionPlugin(parent)
+{
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2defaultstyleimplplugin.moc"
diff --git a/src/imports/controls/default/qquickdefaultstyle_p.h b/src/imports/controls/default/qquickdefaultstyle_p.h
index fcd489a0..fa4e77a8 100644
--- a/src/imports/controls/default/qquickdefaultstyle_p.h
+++ b/src/imports/controls/default/qquickdefaultstyle_p.h
@@ -50,6 +50,7 @@
#include <QtCore/qobject.h>
#include <QtGui/qcolor.h>
+#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
@@ -96,6 +97,9 @@ class QQuickDefaultStyle : public QObject
Q_PROPERTY(QColor separatorColor READ separatorColor CONSTANT FINAL)
Q_PROPERTY(QColor disabledDarkColor READ disabledDarkColor CONSTANT FINAL)
Q_PROPERTY(QColor disabledLightColor READ disabledLightColor CONSTANT FINAL)
+ QML_NAMED_ELEMENT(Default)
+ QML_SINGLETON
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickDefaultStyle(QObject *parent = nullptr);
diff --git a/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp b/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp
index 6e396dcf..0ed33d12 100644
--- a/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp
+++ b/src/imports/controls/default/qtquickcontrols2defaultstyleplugin.cpp
@@ -34,14 +34,11 @@
**
****************************************************************************/
-#include <QtQuickControls2/private/qquickstyleplugin_p.h>
-
-#include "qquickdefaultbusyindicator_p.h"
-#include "qquickdefaultdial_p.h"
-#include "qquickdefaultprogressbar_p.h"
#include "qquickdefaultstyle_p.h"
#include "qquickdefaulttheme_p.h"
+#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+
QT_BEGIN_NAMESPACE
class QtQuickControls2DefaultStylePlugin: public QQuickStylePlugin
@@ -52,8 +49,6 @@ class QtQuickControls2DefaultStylePlugin: public QQuickStylePlugin
public:
QtQuickControls2DefaultStylePlugin(QObject *parent = nullptr);
- void registerTypes(const char *uri) override;
-
QString name() const override;
void initializeTheme(QQuickTheme *theme) override;
};
@@ -62,30 +57,6 @@ QtQuickControls2DefaultStylePlugin::QtQuickControls2DefaultStylePlugin(QObject *
{
}
-void QtQuickControls2DefaultStylePlugin::registerTypes(const char *uri)
-{
- // The minor version used to be the current Qt 5 minor. For compatibility it is the last
- // Qt 5 release.
- qmlRegisterModule(uri, 2, 15);
-
- // The minor version used to be the current Qt 5 minor. For compatibility it is the last
- // Qt 5 release.
- const QByteArray import = QByteArray(uri) + ".impl";
- qmlRegisterModule(import, 2, 15);
-
- // QtQuick.Controls.impl 2.0 (Qt 5.7)
- qmlRegisterType<QQuickDefaultBusyIndicator>(import, 2, 0, "BusyIndicatorImpl");
- qmlRegisterType<QQuickDefaultDial>(import, 2, 0, "DialImpl");
- qmlRegisterType<QQuickDefaultProgressBar>(import, 2, 0, "ProgressBarImpl");
-
- // QtQuick.Controls.impl 2.1 (Qt 5.8)
- qmlRegisterSingletonType<QQuickDefaultStyle>(import, 2, 1, "Default", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
- Q_UNUSED(engine);
- Q_UNUSED(scriptEngine);
- return new QQuickDefaultStyle;
- });
-}
-
QString QtQuickControls2DefaultStylePlugin::name() const
{
return QStringLiteral("Default");
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
index 37be7b4c..e1461ee4 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
@@ -51,7 +51,7 @@
\li Specifies a list of additional paths that are used to lookup \l {Styling Qt Quick Controls}
{Qt Quick Controls styles}. Multiple path entries must be \l {QDir::listSeparator}{separated}
by \c ':' under Unix and \c ';' under Windows. By default, styles are looked up from
- \c $QML2_IMPORT_PATH/QtQuick/Controls.2.
+ \c $QML2_IMPORT_PATH/QtQuick/Controls.
\row
\li \c QT_QUICK_CONTROLS_CONF
\li Specifies the location of the \l {Qt Quick Controls configuration file}.
diff --git a/src/imports/controls/fusion/.prev_CMakeLists.txt b/src/imports/controls/fusion/.prev_CMakeLists.txt
index 2fb5b2a1..4c59e4f6 100644
--- a/src/imports/controls/fusion/.prev_CMakeLists.txt
+++ b/src/imports/controls/fusion/.prev_CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
add_qml_module(qtquickcontrols2fusionstyleplugin
- TARGET_PATH "QtQuick/Controls.2/Fusion"
+ TARGET_PATH "QtQuick/Controls/Fusion"
URI "QtQuick.Controls.Fusion"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2FusionStylePlugin
@@ -54,7 +54,7 @@ set(qtquickcontrols2fusionstyle_resource_files
add_qt_resource(qtquickcontrols2fusionstyleplugin "qtquickcontrols2fusionstyle"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2/Fusion"
+ "/qt-project.org/imports/QtQuick/Controls/Fusion"
FILES
${qtquickcontrols2fusionstyle_resource_files}
)
@@ -64,7 +64,7 @@ add_qt_resource(qtquickcontrols2fusionstyleplugin "qtquickcontrols2fusionstyle"
# IMPORT_NAME = "QtQuick.Controls.Fusion"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Fusion"
+# TARGETPATH = "QtQuick/Controls/Fusion"
# _REQUIREMENTS = "qtConfig(quickcontrols2-fusion)"
set(qml_files
diff --git a/src/imports/controls/fusion/CMakeLists.txt b/src/imports/controls/fusion/CMakeLists.txt
index 59b06842..5eb28d21 100644
--- a/src/imports/controls/fusion/CMakeLists.txt
+++ b/src/imports/controls/fusion/CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquickcontrols2fusionstyleplugin
- TARGET_PATH "QtQuick/Controls.2/Fusion"
+ TARGET_PATH "QtQuick/Controls/Fusion"
URI "QtQuick.Controls.Fusion"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2FusionStylePlugin
@@ -54,7 +54,7 @@ set(qtquickcontrols2fusionstyle_resource_files
qt_add_resource(qtquickcontrols2fusionstyleplugin "qtquickcontrols2fusionstyle"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2/Fusion"
+ "/qt-project.org/imports/QtQuick/Controls/Fusion"
FILES
${qtquickcontrols2fusionstyle_resource_files}
)
@@ -64,7 +64,7 @@ qt_add_resource(qtquickcontrols2fusionstyleplugin "qtquickcontrols2fusionstyle"
# IMPORT_NAME = "QtQuick.Controls.Fusion"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Fusion"
+# TARGETPATH = "QtQuick/Controls/Fusion"
# _REQUIREMENTS = "qtConfig(quickcontrols2-fusion)"
set(qml_files
diff --git a/src/imports/controls/fusion/ComboBox.qml b/src/imports/controls/fusion/ComboBox.qml
index d0e4b564..64e9603f 100644
--- a/src/imports/controls/fusion/ComboBox.qml
+++ b/src/imports/controls/fusion/ComboBox.qml
@@ -66,7 +66,7 @@ T.ComboBox {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
color: control.editable ? control.palette.text : control.palette.buttonText
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/images/arrow.png"
width: 20
fillMode: Image.Pad
}
diff --git a/src/imports/controls/fusion/MenuItem.qml b/src/imports/controls/fusion/MenuItem.qml
index a428fbc8..ebd727e0 100644
--- a/src/imports/controls/fusion/MenuItem.qml
+++ b/src/imports/controls/fusion/MenuItem.qml
@@ -81,7 +81,7 @@ T.MenuItem {
visible: control.subMenu
rotation: control.mirrored ? 90 : -90
color: control.down || control.hovered || control.highlighted ? Fusion.highlightedText(control.palette) : control.palette.text
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/images/arrow.png"
fillMode: Image.Pad
}
diff --git a/src/imports/controls/fusion/ProgressBar.qml b/src/imports/controls/fusion/ProgressBar.qml
index 5deade58..a522563a 100644
--- a/src/imports/controls/fusion/ProgressBar.qml
+++ b/src/imports/controls/fusion/ProgressBar.qml
@@ -85,7 +85,7 @@ T.ProgressBar {
mirror: control.mirrored
fillMode: Image.TileHorizontally
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/progressmask.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/images/progressmask.png"
color: Color.transparent(Qt.lighter(Fusion.highlight(control.palette), 1.2), 160 / 255)
visible: control.indeterminate
diff --git a/src/imports/controls/fusion/SpinBox.qml b/src/imports/controls/fusion/SpinBox.qml
index 41754f63..44387e3c 100644
--- a/src/imports/controls/fusion/SpinBox.qml
+++ b/src/imports/controls/fusion/SpinBox.qml
@@ -98,7 +98,7 @@ T.SpinBox {
height: parent.height
opacity: enabled ? 1.0 : 0.5
color: control.palette.buttonText
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/images/arrow.png"
fillMode: Image.Pad
}
}
@@ -121,7 +121,7 @@ T.SpinBox {
height: parent.height
opacity: enabled ? 1.0 : 0.5
color: control.palette.buttonText
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/arrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/images/arrow.png"
fillMode: Image.Pad
}
}
diff --git a/src/imports/controls/fusion/fusion.pri b/src/imports/controls/fusion/fusion.pri
index bdc413fd..5bc3fbce 100644
--- a/src/imports/controls/fusion/fusion.pri
+++ b/src/imports/controls/fusion/fusion.pri
@@ -1,14 +1,8 @@
HEADERS += \
- $$PWD/qquickfusionbusyindicator_p.h \
- $$PWD/qquickfusiondial_p.h \
- $$PWD/qquickfusionknob_p.h \
$$PWD/qquickfusionstyle_p.h \
$$PWD/qquickfusiontheme_p.h
SOURCES += \
- $$PWD/qquickfusionbusyindicator.cpp \
- $$PWD/qquickfusiondial.cpp \
- $$PWD/qquickfusionknob.cpp \
$$PWD/qquickfusionstyle.cpp \
$$PWD/qquickfusiontheme.cpp
@@ -16,10 +10,8 @@ QML_FILES += \
$$PWD/ApplicationWindow.qml \
$$PWD/BusyIndicator.qml \
$$PWD/Button.qml \
- $$PWD/ButtonPanel.qml \
$$PWD/CheckBox.qml \
$$PWD/CheckDelegate.qml \
- $$PWD/CheckIndicator.qml \
$$PWD/ComboBox.qml \
$$PWD/DelayButton.qml \
$$PWD/Dial.qml \
@@ -43,19 +35,15 @@ QML_FILES += \
$$PWD/ProgressBar.qml \
$$PWD/RadioButton.qml \
$$PWD/RadioDelegate.qml \
- $$PWD/RadioIndicator.qml \
$$PWD/RangeSlider.qml \
$$PWD/RoundButton.qml \
$$PWD/ScrollBar.qml \
$$PWD/ScrollIndicator.qml \
$$PWD/Slider.qml \
- $$PWD/SliderGroove.qml \
- $$PWD/SliderHandle.qml \
$$PWD/SpinBox.qml \
$$PWD/SplitView.qml \
$$PWD/SwipeDelegate.qml \
$$PWD/SwitchDelegate.qml \
- $$PWD/SwitchIndicator.qml \
$$PWD/Switch.qml \
$$PWD/TabBar.qml \
$$PWD/TabButton.qml \
diff --git a/src/imports/controls/fusion/ButtonPanel.qml b/src/imports/controls/fusion/impl/ButtonPanel.qml
index 125aa2f3..125aa2f3 100644
--- a/src/imports/controls/fusion/ButtonPanel.qml
+++ b/src/imports/controls/fusion/impl/ButtonPanel.qml
diff --git a/src/imports/controls/fusion/CheckIndicator.qml b/src/imports/controls/fusion/impl/CheckIndicator.qml
index 7dcfee30..f8c127c4 100644
--- a/src/imports/controls/fusion/CheckIndicator.qml
+++ b/src/imports/controls/fusion/impl/CheckIndicator.qml
@@ -66,7 +66,7 @@ Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
color: Color.transparent(indicator.checkMarkColor, 210 / 255)
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Fusion/images/checkmark.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/images/checkmark.png"
visible: indicator.control.checkState === Qt.Checked || (indicator.control.checked && indicator.control.checkState === undefined)
}
diff --git a/src/imports/controls/fusion/RadioIndicator.qml b/src/imports/controls/fusion/impl/RadioIndicator.qml
index c73cd49f..c73cd49f 100644
--- a/src/imports/controls/fusion/RadioIndicator.qml
+++ b/src/imports/controls/fusion/impl/RadioIndicator.qml
diff --git a/src/imports/controls/fusion/SliderGroove.qml b/src/imports/controls/fusion/impl/SliderGroove.qml
index 381a02b5..381a02b5 100644
--- a/src/imports/controls/fusion/SliderGroove.qml
+++ b/src/imports/controls/fusion/impl/SliderGroove.qml
diff --git a/src/imports/controls/fusion/SliderHandle.qml b/src/imports/controls/fusion/impl/SliderHandle.qml
index c53af57e..c53af57e 100644
--- a/src/imports/controls/fusion/SliderHandle.qml
+++ b/src/imports/controls/fusion/impl/SliderHandle.qml
diff --git a/src/imports/controls/fusion/SwitchIndicator.qml b/src/imports/controls/fusion/impl/SwitchIndicator.qml
index ae7c89a0..ae7c89a0 100644
--- a/src/imports/controls/fusion/SwitchIndicator.qml
+++ b/src/imports/controls/fusion/impl/SwitchIndicator.qml
diff --git a/src/imports/controls/fusion/impl/fusion-impl.pro b/src/imports/controls/fusion/impl/fusion-impl.pro
new file mode 100644
index 00000000..e3333e18
--- /dev/null
+++ b/src/imports/controls/fusion/impl/fusion-impl.pro
@@ -0,0 +1,39 @@
+TARGET = qtquickcontrols2fusionstyleimplplugin
+TARGETPATH = QtQuick/Controls.2/Fusion/impl
+
+QML_IMPORT_NAME = QtQuick.Controls.Fusion.impl
+QML_IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private
+QT_FOR_CONFIG = quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+QML_FILES += \
+ $$PWD/ButtonPanel.qml \
+ $$PWD/CheckIndicator.qml \
+ $$PWD/RadioIndicator.qml \
+ $$PWD/SliderGroove.qml \
+ $$PWD/SliderHandle.qml \
+ $$PWD/SwitchIndicator.qml
+
+OTHER_FILES += \
+ qmldir \
+ $$QML_FILES
+
+HEADERS += \
+ $$PWD/qquickfusionbusyindicator_p.h \
+ $$PWD/qquickfusiondial_p.h \
+ $$PWD/qquickfusionknob_p.h
+
+SOURCES += \
+ $$PWD/qquickfusionbusyindicator.cpp \
+ $$PWD/qquickfusiondial.cpp \
+ $$PWD/qquickfusionknob.cpp \
+ $$PWD/qtquickcontrols2fusionstyleimplplugin.cpp
+
+CONFIG += qmltypes install_qmltypes no_cxx_module install_qml_files builtin_resources qtquickcompiler
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-fusion))
diff --git a/src/imports/controls/fusion/impl/qmldir b/src/imports/controls/fusion/impl/qmldir
new file mode 100644
index 00000000..16ed7fd8
--- /dev/null
+++ b/src/imports/controls/fusion/impl/qmldir
@@ -0,0 +1,3 @@
+module QtQuick.Controls.Fusion.impl
+plugin qtquickcontrols2fusionstyleimplplugin
+classname QtQuickControls2FusionStyleImpPlugin
diff --git a/src/imports/controls/fusion/qquickfusionbusyindicator.cpp b/src/imports/controls/fusion/impl/qquickfusionbusyindicator.cpp
index a9b75d27..a9b75d27 100644
--- a/src/imports/controls/fusion/qquickfusionbusyindicator.cpp
+++ b/src/imports/controls/fusion/impl/qquickfusionbusyindicator.cpp
diff --git a/src/imports/controls/fusion/qquickfusionbusyindicator_p.h b/src/imports/controls/fusion/impl/qquickfusionbusyindicator_p.h
index 77487ec8..5aeea6c4 100644
--- a/src/imports/controls/fusion/qquickfusionbusyindicator_p.h
+++ b/src/imports/controls/fusion/impl/qquickfusionbusyindicator_p.h
@@ -58,6 +58,8 @@ class QQuickFusionBusyIndicator : public QQuickPaintedItem
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
Q_PROPERTY(bool running READ isRunning WRITE setRunning)
+ QML_NAMED_ELEMENT(BusyIndicatorImpl)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickFusionBusyIndicator(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/fusion/qquickfusiondial.cpp b/src/imports/controls/fusion/impl/qquickfusiondial.cpp
index eb6f21ad..eb6f21ad 100644
--- a/src/imports/controls/fusion/qquickfusiondial.cpp
+++ b/src/imports/controls/fusion/impl/qquickfusiondial.cpp
diff --git a/src/imports/controls/fusion/qquickfusiondial_p.h b/src/imports/controls/fusion/impl/qquickfusiondial_p.h
index 07c80cdb..c320527a 100644
--- a/src/imports/controls/fusion/qquickfusiondial_p.h
+++ b/src/imports/controls/fusion/impl/qquickfusiondial_p.h
@@ -56,6 +56,8 @@ class QQuickFusionDial : public QQuickPaintedItem
{
Q_OBJECT
Q_PROPERTY(bool highlight READ highlight WRITE setHighlight FINAL)
+ QML_NAMED_ELEMENT(DialImpl)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickFusionDial(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/fusion/qquickfusionknob.cpp b/src/imports/controls/fusion/impl/qquickfusionknob.cpp
index a641d190..a641d190 100644
--- a/src/imports/controls/fusion/qquickfusionknob.cpp
+++ b/src/imports/controls/fusion/impl/qquickfusionknob.cpp
diff --git a/src/imports/controls/fusion/qquickfusionknob_p.h b/src/imports/controls/fusion/impl/qquickfusionknob_p.h
index 85e5f53e..b9b9c377 100644
--- a/src/imports/controls/fusion/qquickfusionknob_p.h
+++ b/src/imports/controls/fusion/impl/qquickfusionknob_p.h
@@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE
class QQuickFusionKnob : public QQuickPaintedItem
{
Q_OBJECT
+ QML_NAMED_ELEMENT(KnobImpl)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickFusionKnob(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/fusion/impl/qtquickcontrols2fusionstyleimplplugin.cpp b/src/imports/controls/fusion/impl/qtquickcontrols2fusionstyleimplplugin.cpp
new file mode 100644
index 00000000..56cfc151
--- /dev/null
+++ b/src/imports/controls/fusion/impl/qtquickcontrols2fusionstyleimplplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2FusionStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2FusionStyleImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2FusionStyleImplPlugin::QtQuickControls2FusionStyleImplPlugin(QObject *parent)
+ : QQmlEngineExtensionPlugin(parent)
+{
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2fusionstyleimplplugin.moc"
diff --git a/src/imports/controls/fusion/qquickfusionstyle_p.h b/src/imports/controls/fusion/qquickfusionstyle_p.h
index 0e7526ee..4655fd3d 100644
--- a/src/imports/controls/fusion/qquickfusionstyle_p.h
+++ b/src/imports/controls/fusion/qquickfusionstyle_p.h
@@ -50,6 +50,7 @@
#include <QtCore/qobject.h>
#include <QtGui/qcolor.h>
+#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
@@ -62,6 +63,9 @@ class QQuickFusionStyle : public QObject
Q_PROPERTY(QColor darkShade READ darkShade CONSTANT)
Q_PROPERTY(QColor topShadow READ topShadow CONSTANT)
Q_PROPERTY(QColor innerContrastLine READ innerContrastLine CONSTANT)
+ QML_NAMED_ELEMENT(Fusion)
+ QML_SINGLETON
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickFusionStyle(QObject *parent = nullptr);
diff --git a/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc b/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc
index 74c8e671..0a9e195a 100644
--- a/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc
+++ b/src/imports/controls/fusion/qtquickcontrols2fusionstyle.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="qt-project.org/imports/QtQuick/Controls.2/Fusion">
+<qresource prefix="qt-project.org/imports/QtQuick/Controls/Fusion">
<file>images/arrow.png</file>
<file>images/arrow@2x.png</file>
<file>images/arrow@3x.png</file>
diff --git a/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp b/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp
index 985945cf..1f9b4a1b 100644
--- a/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp
+++ b/src/imports/controls/fusion/qtquickcontrols2fusionstyleplugin.cpp
@@ -37,22 +37,12 @@
#include <QtQuickControls2/private/qquickstyleplugin_p.h>
#include <QtQml/qqml.h>
-#include "qquickfusionbusyindicator_p.h"
-#include "qquickfusiondial_p.h"
-#include "qquickfusionknob_p.h"
#include "qquickfusionstyle_p.h"
#include "qquickfusiontheme_p.h"
QT_BEGIN_NAMESPACE
-static QObject *styleSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
-{
- Q_UNUSED(engine);
- Q_UNUSED(scriptEngine);
- return new QQuickFusionStyle;
-}
-
-class QtQuickControls2FusionStylePlugin: public QQuickStylePlugin
+class QtQuickControls2FusionStylePlugin : public QQuickStylePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
@@ -72,18 +62,9 @@ QtQuickControls2FusionStylePlugin::QtQuickControls2FusionStylePlugin(QObject *pa
void QtQuickControls2FusionStylePlugin::registerTypes(const char *uri)
{
- qmlRegisterModule(uri, 2, 3); // Qt 5.10->2.3
- qmlRegisterModule(uri, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterModule(import, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
- qmlRegisterSingletonType<QQuickFusionStyle>(import, 2, 3, "Fusion", styleSingleton);
-
- qmlRegisterType<QQuickFusionBusyIndicator>(import, 2, 3, "BusyIndicatorImpl");
- qmlRegisterType<QQuickFusionDial>(import, 2, 3, "DialImpl");
- qmlRegisterType<QQuickFusionKnob>(import, 2, 3, "KnobImpl");
-
qmlRegisterType(resolvedUrl(QStringLiteral("ButtonPanel.qml")), import, 2, 3, "ButtonPanel");
qmlRegisterType(resolvedUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 3, "CheckIndicator");
qmlRegisterType(resolvedUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 3, "RadioIndicator");
diff --git a/src/imports/controls/imagine/.prev_CMakeLists.txt b/src/imports/controls/imagine/.prev_CMakeLists.txt
index 5533f872..a7c0a59e 100644
--- a/src/imports/controls/imagine/.prev_CMakeLists.txt
+++ b/src/imports/controls/imagine/.prev_CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquickcontrols2imaginestyleplugin
- TARGET_PATH "QtQuick/Controls.2/Imagine"
+ TARGET_PATH "QtQuick/Controls/Imagine"
URI "QtQuick.Controls.Imagine"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2ImagineStylePlugin
@@ -56,7 +56,7 @@ set(qmake_qtquickcontrols2imaginestyle_resource_files
qt_add_resource(qtquickcontrols2imaginestyleplugin "qmake_qtquickcontrols2imaginestyle"
PREFIX
- "qt-project.org/imports/QtQuick/Controls.2/Imagine"
+ "qt-project.org/imports/QtQuick/Controls/Imagine"
FILES
${qmake_qtquickcontrols2imaginestyle_resource_files}
)
@@ -66,7 +66,7 @@ qt_add_resource(qtquickcontrols2imaginestyleplugin "qmake_qtquickcontrols2imagin
# IMPORT_NAME = "QtQuick.Controls.Imagine"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Imagine"
+# TARGETPATH = "QtQuick/Controls/Imagine"
# _REQUIREMENTS = "qtConfig(quickcontrols2-imagine)"
set(qml_files
diff --git a/src/imports/controls/imagine/CMakeLists.txt b/src/imports/controls/imagine/CMakeLists.txt
index 5533f872..a7c0a59e 100644
--- a/src/imports/controls/imagine/CMakeLists.txt
+++ b/src/imports/controls/imagine/CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquickcontrols2imaginestyleplugin
- TARGET_PATH "QtQuick/Controls.2/Imagine"
+ TARGET_PATH "QtQuick/Controls/Imagine"
URI "QtQuick.Controls.Imagine"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2ImagineStylePlugin
@@ -56,7 +56,7 @@ set(qmake_qtquickcontrols2imaginestyle_resource_files
qt_add_resource(qtquickcontrols2imaginestyleplugin "qmake_qtquickcontrols2imaginestyle"
PREFIX
- "qt-project.org/imports/QtQuick/Controls.2/Imagine"
+ "qt-project.org/imports/QtQuick/Controls/Imagine"
FILES
${qmake_qtquickcontrols2imaginestyle_resource_files}
)
@@ -66,7 +66,7 @@ qt_add_resource(qtquickcontrols2imaginestyleplugin "qmake_qtquickcontrols2imagin
# IMPORT_NAME = "QtQuick.Controls.Imagine"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Imagine"
+# TARGETPATH = "QtQuick/Controls/Imagine"
# _REQUIREMENTS = "qtConfig(quickcontrols2-imagine)"
set(qml_files
diff --git a/src/imports/controls/imagine/imagine.pri b/src/imports/controls/imagine/imagine.pri
index 9033808f..1c9ffaa2 100644
--- a/src/imports/controls/imagine/imagine.pri
+++ b/src/imports/controls/imagine/imagine.pri
@@ -1,3 +1,11 @@
+HEADERS += \
+ $$PWD/qquickimaginestyle_p.h \
+ $$PWD/qquickimaginetheme_p.h
+
+SOURCES += \
+ $$PWD/qquickimaginestyle.cpp \
+ $$PWD/qquickimaginetheme.cpp
+
QML_FILES += \
$$PWD/ApplicationWindow.qml \
$$PWD/BusyIndicator.qml \
@@ -18,7 +26,6 @@ QML_FILES += \
$$PWD/Menu.qml \
$$PWD/MenuItem.qml \
$$PWD/MenuSeparator.qml \
- $$PWD/OpacityMask.qml \
$$PWD/PageIndicator.qml \
$$PWD/Page.qml \
$$PWD/Pane.qml \
@@ -48,15 +55,3 @@ QML_FILES += \
$$PWD/ToolTip.qml \
$$PWD/Tumbler.qml \
$$PWD/VerticalHeaderView.qml
-
-HEADERS += \
- $$PWD/qquickimageselector_p.h \
- $$PWD/qquickimaginestyle_p.h \
- $$PWD/qquickimaginetheme_p.h \
- $$PWD/qquickninepatchimage_p.h
-
-SOURCES += \
- $$PWD/qquickimageselector.cpp \
- $$PWD/qquickimaginestyle.cpp \
- $$PWD/qquickimaginetheme.cpp \
- $$PWD/qquickninepatchimage.cpp
diff --git a/src/imports/controls/imagine/imagine.pro b/src/imports/controls/imagine/imagine.pro
index 66aec543..0dfba717 100644
--- a/src/imports/controls/imagine/imagine.pro
+++ b/src/imports/controls/imagine/imagine.pro
@@ -5,7 +5,7 @@ IMPORT_NAME = QtQuick.Controls.Imagine
IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private quickcontrols2impl-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
@@ -18,13 +18,10 @@ OTHER_FILES += \
SOURCES += \
$$PWD/qtquickcontrols2imaginestyleplugin.cpp
-qtquickcontrols2imaginestyle.prefix = qt-project.org/imports/QtQuick/Controls.2/Imagine
+qtquickcontrols2imaginestyle.prefix = qt-project.org/imports/QtQuick/Controls/Imagine
qtquickcontrols2imaginestyle.files += \
$$files($$PWD/images/*.png) \
- $$files($$PWD/images/*.webp) \
- $$files($$PWD/shaders/OpacityMask.frag) \
- $$files($$PWD/shaders/+glslcore/OpacityMask.frag) \
- $$files($$PWD/shaders/+qsb/OpacityMask.frag)
+ $$files($$PWD/images/*.webp)
RESOURCES += qtquickcontrols2imaginestyle
CONFIG += no_cxx_module install_qml_files builtin_resources qtquickcompiler
diff --git a/src/imports/controls/imagine/OpacityMask.qml b/src/imports/controls/imagine/impl/OpacityMask.qml
index 040bdcf4..90175386 100644
--- a/src/imports/controls/imagine/OpacityMask.qml
+++ b/src/imports/controls/imagine/impl/OpacityMask.qml
@@ -63,6 +63,6 @@ Item {
anchors.fill: parent
- fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Imagine/shaders/OpacityMask.frag"
+ fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls/Imagine/impl/shaders/OpacityMask.frag"
}
}
diff --git a/src/imports/controls/imagine/impl/imagine-impl.pro b/src/imports/controls/imagine/impl/imagine-impl.pro
new file mode 100644
index 00000000..cb0f7043
--- /dev/null
+++ b/src/imports/controls/imagine/impl/imagine-impl.pro
@@ -0,0 +1,39 @@
+TARGET = qtquickcontrols2imaginestyleimplplugin
+TARGETPATH = QtQuick/Controls.2/Imagine/impl
+
+QML_IMPORT_NAME = QtQuick.Controls.Imagine.impl
+QML_IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private
+QT_FOR_CONFIG = quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+QML_FILES += \
+ $$PWD/OpacityMask.qml
+
+OTHER_FILES += \
+ qmldir \
+ $$QML_FILES
+
+HEADERS += \
+ $$PWD/qquickimageselector_p.h \
+ $$PWD/qquickninepatchimage_p.h
+
+SOURCES += \
+ $$PWD/qquickimageselector.cpp \
+ $$PWD/qquickninepatchimage.cpp \
+ $$PWD/qtquickcontrols2imaginestyleimplplugin.cpp
+
+qtquickcontrols2imaginestyleimpl.prefix = qt-project.org/imports/QtQuick/Controls/Imagine/impl
+qtquickcontrols2imaginestyleimpl.files += \
+ $$files($$PWD/shaders/OpacityMask.frag) \
+ $$files($$PWD/shaders/+glslcore/OpacityMask.frag) \
+ $$files($$PWD/shaders/+qsb/OpacityMask.frag)
+RESOURCES += qtquickcontrols2imaginestyleimpl
+
+CONFIG += qmltypes install_qmltypes no_cxx_module builtin_resources qtquickcompiler
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-imagine))
diff --git a/src/imports/controls/imagine/impl/qmldir b/src/imports/controls/imagine/impl/qmldir
new file mode 100644
index 00000000..9febda6d
--- /dev/null
+++ b/src/imports/controls/imagine/impl/qmldir
@@ -0,0 +1,6 @@
+module QtQuick.Controls.Imagine.impl
+plugin qtquickcontrols2imaginestyleimplplugin
+classname QtQuickControls2ImagineStyleImplPlugin
+
+#TODO: update to 6.0
+OpacityMask 2.0 OpacityMask.qml
diff --git a/src/imports/controls/imagine/qquickimageselector.cpp b/src/imports/controls/imagine/impl/qquickimageselector.cpp
index 67d3a24b..dcb7738c 100644
--- a/src/imports/controls/imagine/qquickimageselector.cpp
+++ b/src/imports/controls/imagine/impl/qquickimageselector.cpp
@@ -47,6 +47,8 @@
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcQtQuickControlsImagine, "qt.quick.controls.imagine")
+
static const int DEFAULT_CACHE = 500;
static inline int cacheSize()
@@ -56,8 +58,6 @@ static inline int cacheSize()
return ok ? size : DEFAULT_CACHE;
}
-Q_DECLARE_LOGGING_CATEGORY(lcQtQuickControlsImagine)
-
// input: [focused, pressed]
// => [[focused, pressed], [pressed, focused], [focused], [pressed]]
static QList<QStringList> permutations(const QStringList &input, int count = -1)
diff --git a/src/imports/controls/imagine/qquickimageselector_p.h b/src/imports/controls/imagine/impl/qquickimageselector_p.h
index d050707d..351caefb 100644
--- a/src/imports/controls/imagine/qquickimageselector_p.h
+++ b/src/imports/controls/imagine/impl/qquickimageselector_p.h
@@ -69,6 +69,8 @@ class QQuickImageSelector : public QObject, public QQmlParserStatus, public QQml
Q_PROPERTY(QString separator READ separator WRITE setSeparator FINAL)
Q_PROPERTY(bool cache READ cache WRITE setCache FINAL)
Q_INTERFACES(QQmlParserStatus QQmlPropertyValueInterceptor)
+ QML_NAMED_ELEMENT(ImageSelector)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickImageSelector(QObject *parent = nullptr);
@@ -124,6 +126,8 @@ private:
class QQuickNinePatchImageSelector : public QQuickImageSelector
{
Q_OBJECT
+ QML_NAMED_ELEMENT(NinePatchImageSelector)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickNinePatchImageSelector(QObject *parent = nullptr);
@@ -135,6 +139,8 @@ protected:
class QQuickAnimatedImageSelector : public QQuickImageSelector
{
Q_OBJECT
+ QML_NAMED_ELEMENT(AnimatedImageSelector)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickAnimatedImageSelector(QObject *parent = nullptr);
diff --git a/src/imports/controls/imagine/qquickninepatchimage.cpp b/src/imports/controls/imagine/impl/qquickninepatchimage.cpp
index 1d6d60dd..1d6d60dd 100644
--- a/src/imports/controls/imagine/qquickninepatchimage.cpp
+++ b/src/imports/controls/imagine/impl/qquickninepatchimage.cpp
diff --git a/src/imports/controls/imagine/qquickninepatchimage_p.h b/src/imports/controls/imagine/impl/qquickninepatchimage_p.h
index 2c29490a..78cc3068 100644
--- a/src/imports/controls/imagine/qquickninepatchimage_p.h
+++ b/src/imports/controls/imagine/impl/qquickninepatchimage_p.h
@@ -65,6 +65,8 @@ class QQuickNinePatchImage : public QQuickImage
Q_PROPERTY(qreal leftInset READ leftInset NOTIFY leftInsetChanged FINAL)
Q_PROPERTY(qreal rightInset READ rightInset NOTIFY rightInsetChanged FINAL)
Q_PROPERTY(qreal bottomInset READ bottomInset NOTIFY bottomInsetChanged FINAL)
+ QML_NAMED_ELEMENT(NinePatchImage)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickNinePatchImage(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/imagine/impl/qtquickcontrols2imaginestyleimplplugin.cpp b/src/imports/controls/imagine/impl/qtquickcontrols2imaginestyleimplplugin.cpp
new file mode 100644
index 00000000..514d9ed8
--- /dev/null
+++ b/src/imports/controls/imagine/impl/qtquickcontrols2imaginestyleimplplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2ImagineStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2ImagineStyleImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2ImagineStyleImplPlugin::QtQuickControls2ImagineStyleImplPlugin(QObject *parent)
+ : QQmlEngineExtensionPlugin(parent)
+{
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2imaginestyleimplplugin.moc"
diff --git a/src/imports/controls/imagine/shaders/+glslcore/OpacityMask.frag b/src/imports/controls/imagine/impl/shaders/+glslcore/OpacityMask.frag
index 529e2696..529e2696 100644
--- a/src/imports/controls/imagine/shaders/+glslcore/OpacityMask.frag
+++ b/src/imports/controls/imagine/impl/shaders/+glslcore/OpacityMask.frag
diff --git a/src/imports/controls/imagine/shaders/+qsb/OpacityMask.frag b/src/imports/controls/imagine/impl/shaders/+qsb/OpacityMask.frag
index 331b30b8..331b30b8 100644
--- a/src/imports/controls/imagine/shaders/+qsb/OpacityMask.frag
+++ b/src/imports/controls/imagine/impl/shaders/+qsb/OpacityMask.frag
Binary files differ
diff --git a/src/imports/controls/imagine/shaders/OpacityMask.frag b/src/imports/controls/imagine/impl/shaders/OpacityMask.frag
index 84f9bc3e..84f9bc3e 100644
--- a/src/imports/controls/imagine/shaders/OpacityMask.frag
+++ b/src/imports/controls/imagine/impl/shaders/OpacityMask.frag
diff --git a/src/imports/controls/imagine/shaders/OpacityMask_rhi.frag b/src/imports/controls/imagine/impl/shaders/OpacityMask_rhi.frag
index 9ae32499..9ae32499 100644
--- a/src/imports/controls/imagine/shaders/OpacityMask_rhi.frag
+++ b/src/imports/controls/imagine/impl/shaders/OpacityMask_rhi.frag
diff --git a/src/imports/controls/imagine/shaders/compile.bat b/src/imports/controls/imagine/impl/shaders/compile.bat
index 8f16d7ac..8f16d7ac 100644
--- a/src/imports/controls/imagine/shaders/compile.bat
+++ b/src/imports/controls/imagine/impl/shaders/compile.bat
diff --git a/src/imports/controls/imagine/qquickimaginestyle.cpp b/src/imports/controls/imagine/qquickimaginestyle.cpp
index 745bef10..37e55b61 100644
--- a/src/imports/controls/imagine/qquickimaginestyle.cpp
+++ b/src/imports/controls/imagine/qquickimaginestyle.cpp
@@ -41,7 +41,7 @@
QT_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC_WITH_ARGS(QString, GlobalPath, (QLatin1String("qrc:/qt-project.org/imports/QtQuick/Controls.2/Imagine/images/")))
+Q_GLOBAL_STATIC_WITH_ARGS(QString, GlobalPath, (QLatin1String("qrc:/qt-project.org/imports/QtQuick/Controls/Imagine/images/")))
static QString ensureSlash(const QString &path)
{
@@ -117,7 +117,7 @@ QUrl QQuickImagineStyle::url() const
//
// If Imagine.path is set to ":/images" by the user, then the final URL would be:
//
- // QUrl("file:///home/user/qt/qtbase/qml/QtQuick/Controls.2/Imagine/:/images/applicationwindow-background")
+ // QUrl("file:///home/user/qt/qtbase/qml/QtQuick/Controls/Imagine/:/images/applicationwindow-background")
//
// To ensure that the correct URL is constructed, we do it ourselves here,
// and then the control QML files use the "url" property instead.
diff --git a/src/imports/controls/imagine/qquickimaginestyle_p.h b/src/imports/controls/imagine/qquickimaginestyle_p.h
index 20a4baf0..212096b9 100644
--- a/src/imports/controls/imagine/qquickimaginestyle_p.h
+++ b/src/imports/controls/imagine/qquickimaginestyle_p.h
@@ -48,9 +48,9 @@
// We mean it.
//
-#include <QtQuickControls2/private/qquickattachedobject_p.h>
#include <QtCore/qvariant.h>
#include <QtQml/qqml.h>
+#include <QtQuickControls2Impl/private/qquickattachedobject_p.h>
QT_BEGIN_NAMESPACE
@@ -59,6 +59,10 @@ class QQuickImagineStyle : public QQuickAttachedObject
Q_OBJECT
Q_PROPERTY(QString path READ path WRITE setPath RESET resetPath NOTIFY pathChanged FINAL)
Q_PROPERTY(QUrl url READ url NOTIFY pathChanged FINAL)
+ QML_NAMED_ELEMENT(Imagine)
+ QML_ATTACHED(QQuickImagineStyle)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickImagineStyle(QObject *parent = nullptr);
diff --git a/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp b/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp
index dd20c84b..d59cf555 100644
--- a/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp
+++ b/src/imports/controls/imagine/qtquickcontrols2imaginestyleplugin.cpp
@@ -38,16 +38,12 @@
#include <QtCore/qloggingcategory.h>
#include <QtQml/qqml.h>
-#include "qquickimageselector_p.h"
#include "qquickimaginestyle_p.h"
#include "qquickimaginetheme_p.h"
-#include "qquickninepatchimage_p.h"
QT_BEGIN_NAMESPACE
-Q_LOGGING_CATEGORY(lcQtQuickControlsImagine, "qt.quick.controls.imagine")
-
-class QtQuickControls2ImagineStylePlugin: public QQuickStylePlugin
+class QtQuickControls2ImagineStylePlugin : public QQuickStylePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
@@ -55,8 +51,6 @@ class QtQuickControls2ImagineStylePlugin: public QQuickStylePlugin
public:
QtQuickControls2ImagineStylePlugin(QObject *parent = nullptr);
- void registerTypes(const char *uri) override;
-
QString name() const override;
void initializeTheme(QQuickTheme *theme) override;
};
@@ -65,23 +59,6 @@ QtQuickControls2ImagineStylePlugin::QtQuickControls2ImagineStylePlugin(QObject *
{
}
-void QtQuickControls2ImagineStylePlugin::registerTypes(const char *uri)
-{
- qmlRegisterModule(uri, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
- qmlRegisterUncreatableType<QQuickImagineStyle>(uri, 2, 3, "Imagine", tr("Imagine is an attached property"));
-
- QByteArray import = QByteArray(uri) + ".impl";
- qmlRegisterModule(import, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
-
- qmlRegisterType<QQuickAnimatedImageSelector>(import, 2, 3, "AnimatedImageSelector");
- qmlRegisterType<QQuickImageSelector>(import, 2, 3, "ImageSelector");
- qmlRegisterType<QQuickNinePatchImage>(import, 2, 3, "NinePatchImage");
- qmlRegisterType<QQuickNinePatchImageSelector>(import, 2, 3, "NinePatchImageSelector");
-
- // Qt 6.0, import version may need to be updated.
- qmlRegisterType(resolvedUrl(QStringLiteral("OpacityMask.qml")), import, 2, 0, "OpacityMask");
-}
-
QString QtQuickControls2ImagineStylePlugin::name() const
{
return QStringLiteral("Imagine");
diff --git a/src/imports/controls/material/.prev_CMakeLists.txt b/src/imports/controls/material/.prev_CMakeLists.txt
index 15fe3519..7039271f 100644
--- a/src/imports/controls/material/.prev_CMakeLists.txt
+++ b/src/imports/controls/material/.prev_CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
add_qml_module(qtquickcontrols2materialstyleplugin
- TARGET_PATH "QtQuick/Controls.2/Material"
+ TARGET_PATH "QtQuick/Controls/Material"
URI "QtQuick.Controls.Material"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2MaterialStylePlugin
@@ -58,7 +58,7 @@ set(qtquickcontrols2materialstyleplugin_resource_files
add_qt_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialstyleplugin"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2/Material"
+ "/qt-project.org/imports/QtQuick/Controls/Material"
FILES
${qtquickcontrols2materialstyleplugin_resource_files}
)
@@ -68,7 +68,7 @@ add_qt_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialsty
# IMPORT_NAME = "QtQuick.Controls.Material"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Material"
+# TARGETPATH = "QtQuick/Controls/Material"
# _REQUIREMENTS = "qtConfig(quickcontrols2-material)"
set(qml_files
diff --git a/src/imports/controls/material/CMakeLists.txt b/src/imports/controls/material/CMakeLists.txt
index 1270bfc6..8bcb9c5d 100644
--- a/src/imports/controls/material/CMakeLists.txt
+++ b/src/imports/controls/material/CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquickcontrols2materialstyleplugin
- TARGET_PATH "QtQuick/Controls.2/Material"
+ TARGET_PATH "QtQuick/Controls/Material"
URI "QtQuick.Controls.Material"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2MaterialStylePlugin
@@ -58,7 +58,7 @@ set(qtquickcontrols2materialstyleplugin_resource_files
qt_add_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialstyleplugin"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2/Material"
+ "/qt-project.org/imports/QtQuick/Controls/Material"
FILES
${qtquickcontrols2materialstyleplugin_resource_files}
)
@@ -68,7 +68,7 @@ qt_add_resource(qtquickcontrols2materialstyleplugin "qtquickcontrols2materialsty
# IMPORT_NAME = "QtQuick.Controls.Material"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Material"
+# TARGETPATH = "QtQuick/Controls/Material"
# _REQUIREMENTS = "qtConfig(quickcontrols2-material)"
set(qml_files
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index a9bdd934..791e57ab 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -74,7 +74,7 @@ T.ComboBox {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/drop-indicator.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/drop-indicator.png"
}
contentItem: T.TextField {
diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml
index a5d2f8a1..cb558e4c 100644
--- a/src/imports/controls/material/MenuItem.qml
+++ b/src/imports/controls/material/MenuItem.qml
@@ -73,7 +73,7 @@ T.MenuItem {
visible: control.subMenu
mirror: control.mirrored
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/arrow-indicator.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/arrow-indicator.png"
}
contentItem: IconLabel {
diff --git a/src/imports/controls/material/BoxShadow.qml b/src/imports/controls/material/impl/BoxShadow.qml
index 5a746c0f..5a746c0f 100644
--- a/src/imports/controls/material/BoxShadow.qml
+++ b/src/imports/controls/material/impl/BoxShadow.qml
diff --git a/src/imports/controls/material/CheckIndicator.qml b/src/imports/controls/material/impl/CheckIndicator.qml
index 7caf8553..ecaa673d 100644
--- a/src/imports/controls/material/CheckIndicator.qml
+++ b/src/imports/controls/material/impl/CheckIndicator.qml
@@ -72,7 +72,7 @@ Rectangle {
y: (parent.height - height) / 2
width: 14
height: 14
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/check.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/images/check.png"
fillMode: Image.PreserveAspectFit
scale: indicatorItem.checkState === Qt.Checked ? 1 : 0
diff --git a/src/imports/controls/material/CursorDelegate.qml b/src/imports/controls/material/impl/CursorDelegate.qml
index fe2d25c6..fe2d25c6 100644
--- a/src/imports/controls/material/CursorDelegate.qml
+++ b/src/imports/controls/material/impl/CursorDelegate.qml
diff --git a/src/imports/controls/material/ElevationEffect.qml b/src/imports/controls/material/impl/ElevationEffect.qml
index 73a2a238..73a2a238 100644
--- a/src/imports/controls/material/ElevationEffect.qml
+++ b/src/imports/controls/material/impl/ElevationEffect.qml
diff --git a/src/imports/controls/material/RadioIndicator.qml b/src/imports/controls/material/impl/RadioIndicator.qml
index e2c55184..e2c55184 100644
--- a/src/imports/controls/material/RadioIndicator.qml
+++ b/src/imports/controls/material/impl/RadioIndicator.qml
diff --git a/src/imports/controls/material/RectangularGlow.qml b/src/imports/controls/material/impl/RectangularGlow.qml
index c01e536d..7e09c1a5 100644
--- a/src/imports/controls/material/RectangularGlow.qml
+++ b/src/imports/controls/material/impl/RectangularGlow.qml
@@ -235,6 +235,6 @@ Item {
property real spread: rootItem.spread / 2.0
property real cornerRadius: clampedCornerRadius()
- fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/shaders/RectangularGlow.frag"
+ fragmentShader: "qrc:/qt-project.org/imports/QtQuick/Controls/Material/shaders/RectangularGlow.frag"
}
}
diff --git a/src/imports/controls/material/SliderHandle.qml b/src/imports/controls/material/impl/SliderHandle.qml
index c9078bc8..c9078bc8 100644
--- a/src/imports/controls/material/SliderHandle.qml
+++ b/src/imports/controls/material/impl/SliderHandle.qml
diff --git a/src/imports/controls/material/SwitchIndicator.qml b/src/imports/controls/material/impl/SwitchIndicator.qml
index 3034e771..3034e771 100644
--- a/src/imports/controls/material/SwitchIndicator.qml
+++ b/src/imports/controls/material/impl/SwitchIndicator.qml
diff --git a/src/imports/controls/material/impl/material-impl.pro b/src/imports/controls/material/impl/material-impl.pro
new file mode 100644
index 00000000..f0a97b18
--- /dev/null
+++ b/src/imports/controls/material/impl/material-impl.pro
@@ -0,0 +1,41 @@
+TARGET = qtquickcontrols2materialstyleimplplugin
+TARGETPATH = QtQuick/Controls.2/Material/impl
+
+QML_IMPORT_NAME = QtQuick.Controls.Material.impl
+QML_IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private
+QT_FOR_CONFIG = quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+QML_FILES += \
+ $$PWD/BoxShadow.qml \
+ $$PWD/CheckIndicator.qml \
+ $$PWD/CursorDelegate.qml \
+ $$PWD/ElevationEffect.qml \
+ $$PWD/RadioIndicator.qml \
+ $$PWD/RectangularGlow.qml \
+ $$PWD/SliderHandle.qml \
+ $$PWD/SwitchIndicator.qml
+
+OTHER_FILES += \
+ qmldir \
+ $$QML_FILES
+
+HEADERS += \
+ qquickmaterialbusyindicator_p.h \
+ qquickmaterialprogressbar_p.h \
+ qquickmaterialripple_p.h
+
+SOURCES += \
+ $$PWD/qquickmaterialbusyindicator.cpp \
+ $$PWD/qquickmaterialprogressbar.cpp \
+ $$PWD/qquickmaterialripple.cpp \
+ $$PWD/qtquickcontrols2materialstyleimplplugin.cpp
+
+CONFIG += qmltypes install_qmltypes no_cxx_module install_qml_files builtin_resources qtquickcompiler
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-material))
diff --git a/src/imports/controls/material/impl/qmldir b/src/imports/controls/material/impl/qmldir
new file mode 100644
index 00000000..4c863d9d
--- /dev/null
+++ b/src/imports/controls/material/impl/qmldir
@@ -0,0 +1,3 @@
+module QtQuick.Controls.Material.impl
+plugin qtquickcontrols2materialstyleimplplugin
+classname QtQuickControls2MaterialStyleImplPlugin
diff --git a/src/imports/controls/material/qquickmaterialbusyindicator.cpp b/src/imports/controls/material/impl/qquickmaterialbusyindicator.cpp
index 58c1fd8c..10bcc035 100644
--- a/src/imports/controls/material/qquickmaterialbusyindicator.cpp
+++ b/src/imports/controls/material/impl/qquickmaterialbusyindicator.cpp
@@ -41,7 +41,7 @@
#include <QtGui/qpainter.h>
#include <QtQuick/qsgimagenode.h>
#include <QtQuick/qquickwindow.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/material/qquickmaterialbusyindicator_p.h b/src/imports/controls/material/impl/qquickmaterialbusyindicator_p.h
index ad7bc002..72aeaf66 100644
--- a/src/imports/controls/material/qquickmaterialbusyindicator_p.h
+++ b/src/imports/controls/material/impl/qquickmaterialbusyindicator_p.h
@@ -58,6 +58,8 @@ class QQuickMaterialBusyIndicator : public QQuickItem
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
Q_PROPERTY(bool running READ isRunning WRITE setRunning FINAL)
+ QML_NAMED_ELEMENT(BusyIndicatorImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickMaterialBusyIndicator(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/material/qquickmaterialprogressbar.cpp b/src/imports/controls/material/impl/qquickmaterialprogressbar.cpp
index 4635c57b..8b3dde23 100644
--- a/src/imports/controls/material/qquickmaterialprogressbar.cpp
+++ b/src/imports/controls/material/impl/qquickmaterialprogressbar.cpp
@@ -43,7 +43,7 @@
#include <QtQuick/qsgrectanglenode.h>
#include <QtQuick/qsgimagenode.h>
#include <QtQuick/qquickwindow.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/material/qquickmaterialprogressbar_p.h b/src/imports/controls/material/impl/qquickmaterialprogressbar_p.h
index 680f36a4..bf93812d 100644
--- a/src/imports/controls/material/qquickmaterialprogressbar_p.h
+++ b/src/imports/controls/material/impl/qquickmaterialprogressbar_p.h
@@ -59,6 +59,8 @@ class QQuickMaterialProgressBar : public QQuickItem
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
+ QML_NAMED_ELEMENT(ProgressBarImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickMaterialProgressBar(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/material/qquickmaterialripple.cpp b/src/imports/controls/material/impl/qquickmaterialripple.cpp
index e6287ff9..a39a115b 100644
--- a/src/imports/controls/material/qquickmaterialripple.cpp
+++ b/src/imports/controls/material/impl/qquickmaterialripple.cpp
@@ -39,7 +39,7 @@
#include <QtCore/qmath.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qsgadaptationlayer_p.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
#include <QtQuickTemplates2/private/qquickabstractbutton_p_p.h>
diff --git a/src/imports/controls/material/qquickmaterialripple_p.h b/src/imports/controls/material/impl/qquickmaterialripple_p.h
index 8a80113b..51728389 100644
--- a/src/imports/controls/material/qquickmaterialripple_p.h
+++ b/src/imports/controls/material/impl/qquickmaterialripple_p.h
@@ -62,6 +62,8 @@ class QQuickMaterialRipple : public QQuickItem
Q_PROPERTY(bool active READ isActive WRITE setActive FINAL)
Q_PROPERTY(QQuickItem *anchor READ anchor WRITE setAnchor FINAL)
Q_PROPERTY(Trigger trigger READ trigger WRITE setTrigger FINAL)
+ QML_NAMED_ELEMENT(Ripple)
+ QML_ADDED_IN_VERSION(2, 0)
public:
QQuickMaterialRipple(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp b/src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp
new file mode 100644
index 00000000..258ea2b6
--- /dev/null
+++ b/src/imports/controls/material/impl/qtquickcontrols2materialstyleimplplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2MaterialStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2MaterialStyleImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2MaterialStyleImplPlugin::QtQuickControls2MaterialStyleImplPlugin(QObject *parent)
+ : QQmlEngineExtensionPlugin(parent)
+{
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2materialstyleimplplugin.moc"
diff --git a/src/imports/controls/material/material.pri b/src/imports/controls/material/material.pri
index 457a8df1..8cffdabb 100644
--- a/src/imports/controls/material/material.pri
+++ b/src/imports/controls/material/material.pri
@@ -1,33 +1,23 @@
HEADERS += \
- $$PWD/qquickmaterialbusyindicator_p.h \
- $$PWD/qquickmaterialprogressbar_p.h \
- $$PWD/qquickmaterialripple_p.h \
$$PWD/qquickmaterialstyle_p.h \
$$PWD/qquickmaterialtheme_p.h
SOURCES += \
- $$PWD/qquickmaterialbusyindicator.cpp \
- $$PWD/qquickmaterialprogressbar.cpp \
- $$PWD/qquickmaterialripple.cpp \
$$PWD/qquickmaterialstyle.cpp \
$$PWD/qquickmaterialtheme.cpp
QML_FILES += \
$$PWD/ApplicationWindow.qml \
- $$PWD/BoxShadow.qml \
$$PWD/BusyIndicator.qml \
$$PWD/Button.qml \
$$PWD/CheckBox.qml \
$$PWD/CheckDelegate.qml \
- $$PWD/CheckIndicator.qml \
$$PWD/ComboBox.qml \
- $$PWD/CursorDelegate.qml \
$$PWD/DelayButton.qml \
$$PWD/Dial.qml \
$$PWD/Dialog.qml \
$$PWD/DialogButtonBox.qml \
$$PWD/Drawer.qml \
- $$PWD/ElevationEffect.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
$$PWD/HorizontalHeaderView.qml \
@@ -45,14 +35,11 @@ QML_FILES += \
$$PWD/ProgressBar.qml \
$$PWD/RadioButton.qml \
$$PWD/RadioDelegate.qml \
- $$PWD/RadioIndicator.qml \
$$PWD/RangeSlider.qml \
$$PWD/RoundButton.qml \
- $$PWD/RectangularGlow.qml \
$$PWD/ScrollBar.qml \
$$PWD/ScrollIndicator.qml \
$$PWD/Slider.qml \
- $$PWD/SliderHandle.qml \
$$PWD/SpinBox.qml \
$$PWD/SplitView.qml \
$$PWD/StackView.qml \
@@ -60,7 +47,6 @@ QML_FILES += \
$$PWD/SwipeView.qml \
$$PWD/Switch.qml \
$$PWD/SwitchDelegate.qml \
- $$PWD/SwitchIndicator.qml \
$$PWD/TabBar.qml \
$$PWD/TabButton.qml \
$$PWD/TextArea.qml \
diff --git a/src/imports/controls/material/material.pro b/src/imports/controls/material/material.pro
index cf08b925..269f704d 100644
--- a/src/imports/controls/material/material.pro
+++ b/src/imports/controls/material/material.pro
@@ -5,7 +5,7 @@ IMPORT_NAME = QtQuick.Controls.Material
IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private quickcontrols2impl-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index fa980efc..557a4434 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -49,7 +49,7 @@
//
#include <QtGui/qcolor.h>
-#include <QtQuickControls2/private/qquickattachedobject_p.h>
+#include <QtQuickControls2Impl/private/qquickattachedobject_p.h>
QT_BEGIN_NAMESPACE
@@ -109,6 +109,11 @@ class QQuickMaterialStyle : public QQuickAttachedObject
Q_PROPERTY(int switchDelegateVerticalPadding READ switchDelegateVerticalPadding CONSTANT FINAL)
Q_PROPERTY(int tooltipHeight READ tooltipHeight CONSTANT FINAL)
+ QML_NAMED_ELEMENT(Material)
+ QML_ATTACHED(QQuickMaterialStyle)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 0)
+
public:
enum Theme {
Light,
diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
index 88f6cd1e..c0dc5721 100644
--- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
+++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
@@ -38,11 +38,8 @@
#include "qquickmaterialstyle_p.h"
#include "qquickmaterialtheme_p.h"
-#include "qquickmaterialbusyindicator_p.h"
-#include "qquickmaterialprogressbar_p.h"
-#include "qquickmaterialripple_p.h"
-#include <QtQuickControls2/private/qquickpaddedrectangle_p.h>
+#include <QtQuickControls2Impl/private/qquickpaddedrectangle_p.h>
QT_BEGIN_NAMESPACE
@@ -67,15 +64,9 @@ QtQuickControls2MaterialStylePlugin::QtQuickControls2MaterialStylePlugin(QObject
void QtQuickControls2MaterialStylePlugin::registerTypes(const char *uri)
{
- qmlRegisterModule(uri, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
- qmlRegisterUncreatableType<QQuickMaterialStyle>(uri, 2, 0, "Material", tr("Material is an attached property"));
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterModule(import, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
- qmlRegisterType<QQuickMaterialBusyIndicator>(import, 2, 0, "BusyIndicatorImpl");
- qmlRegisterType<QQuickMaterialProgressBar>(import, 2, 0, "ProgressBarImpl");
- qmlRegisterType<QQuickMaterialRipple>(import, 2, 0, "Ripple");
qmlRegisterType(resolvedUrl(QStringLiteral("BoxShadow.qml")), import, 2, 0, "BoxShadow");
qmlRegisterType(resolvedUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator");
qmlRegisterType(resolvedUrl(QStringLiteral("CursorDelegate.qml")), import, 2, 0, "CursorDelegate");
diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
index 71f9563b..981960c4 100644
--- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
+++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/qt-project.org/imports/QtQuick/Controls.2/Material">
+ <qresource prefix="/qt-project.org/imports/QtQuick/Controls/Material">
<file>images/arrow-indicator.png</file>
<file>images/arrow-indicator@2x.png</file>
<file>images/arrow-indicator@3x.png</file>
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
index 55a03c36..483e6d0c 100644
--- a/src/imports/controls/qtquickcontrols2plugin.cpp
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -44,22 +44,22 @@
#include <QtQml/qqmlengine.h>
#include <QtQml/private/qqmldirparser_p.h>
#include <QtQuickControls2/qquickstyle.h>
-#include <QtQuickControls2/private/qquickchecklabel_p.h>
-#include <QtQuickControls2/private/qquickcolor_p.h>
-#include <QtQuickControls2/private/qquickcolorimage_p.h>
-#include <QtQuickControls2/private/qquickiconimage_p.h>
-#include <QtQuickControls2/private/qquickmnemoniclabel_p.h>
-#include <QtQuickControls2/private/qquickpaddedrectangle_p.h>
-#include <QtQuickControls2/private/qquickplaceholdertext_p.h>
-#include <QtQuickControls2/private/qquickiconlabel_p.h>
#include <QtQuickControls2/private/qquickstyle_p.h>
#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+#include <QtQuickControls2Impl/private/qquickchecklabel_p.h>
+#include <QtQuickControls2Impl/private/qquickcolor_p.h>
+#include <QtQuickControls2Impl/private/qquickcolorimage_p.h>
+#include <QtQuickControls2Impl/private/qquickiconimage_p.h>
+#include <QtQuickControls2Impl/private/qquickmnemoniclabel_p.h>
+#include <QtQuickControls2Impl/private/qquickpaddedrectangle_p.h>
+#include <QtQuickControls2Impl/private/qquickplaceholdertext_p.h>
+#include <QtQuickControls2Impl/private/qquickiconlabel_p.h>
#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
-#include <QtQuickControls2/private/qquicktumblerview_p.h>
+#include <QtQuickControls2Impl/private/qquicktumblerview_p.h>
#endif
#include <QtQuickTemplates2/private/qquickoverlay_p.h>
-#include <QtQuickControls2/private/qquickclippedtext_p.h>
-#include <QtQuickControls2/private/qquickitemgroup_p.h>
+#include <QtQuickControls2Impl/private/qquickclippedtext_p.h>
+#include <QtQuickControls2Impl/private/qquickitemgroup_p.h>
#include <QtQuickTemplates2/private/qquicktheme_p_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/universal/.prev_CMakeLists.txt b/src/imports/controls/universal/.prev_CMakeLists.txt
index f78b6e49..45c15169 100644
--- a/src/imports/controls/universal/.prev_CMakeLists.txt
+++ b/src/imports/controls/universal/.prev_CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
add_qml_module(qtquickcontrols2universalstyleplugin
- TARGET_PATH "QtQuick/Controls.2/Universal"
+ TARGET_PATH "QtQuick/Controls/Universal"
URI "QtQuick.Controls.Universal"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2UniversalStylePlugin
@@ -58,7 +58,7 @@ set(qtquickcontrols2universalstyleplugin_resource_files
add_qt_resource(qtquickcontrols2universalstyleplugin "qtquickcontrols2universalstyleplugin"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2/Universal"
+ "/qt-project.org/imports/QtQuick/Controls/Universal"
FILES
${qtquickcontrols2universalstyleplugin_resource_files}
)
@@ -68,7 +68,7 @@ add_qt_resource(qtquickcontrols2universalstyleplugin "qtquickcontrols2universals
# IMPORT_NAME = "QtQuick.Controls.Universal"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Universal"
+# TARGETPATH = "QtQuick/Controls/Universal"
# _REQUIREMENTS = "qtConfig(quickcontrols2-universal)"
set(qml_files
diff --git a/src/imports/controls/universal/CMakeLists.txt b/src/imports/controls/universal/CMakeLists.txt
index cf0464f3..53a3c9d0 100644
--- a/src/imports/controls/universal/CMakeLists.txt
+++ b/src/imports/controls/universal/CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquickcontrols2universalstyleplugin
- TARGET_PATH "QtQuick/Controls.2/Universal"
+ TARGET_PATH "QtQuick/Controls/Universal"
URI "QtQuick.Controls.Universal"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickControls2UniversalStylePlugin
@@ -58,7 +58,7 @@ set(qtquickcontrols2universalstyleplugin_resource_files
qt_add_resource(qtquickcontrols2universalstyleplugin "qtquickcontrols2universalstyleplugin"
PREFIX
- "/qt-project.org/imports/QtQuick/Controls.2/Universal"
+ "/qt-project.org/imports/QtQuick/Controls/Universal"
FILES
${qtquickcontrols2universalstyleplugin_resource_files}
)
@@ -68,7 +68,7 @@ qt_add_resource(qtquickcontrols2universalstyleplugin "qtquickcontrols2universals
# IMPORT_NAME = "QtQuick.Controls.Universal"
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir" "$$QML_FILES"
-# TARGETPATH = "QtQuick/Controls.2/Universal"
+# TARGETPATH = "QtQuick/Controls/Universal"
# _REQUIREMENTS = "qtConfig(quickcontrols2-universal)"
set(qml_files
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index 9b88ccf9..eb7fb09d 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -67,7 +67,7 @@ T.ComboBox {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumHighColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/downarrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/downarrow.png"
Rectangle {
z: -1
diff --git a/src/imports/controls/universal/MenuItem.qml b/src/imports/controls/universal/MenuItem.qml
index 23d0ee3c..872f1eba 100644
--- a/src/imports/controls/universal/MenuItem.qml
+++ b/src/imports/controls/universal/MenuItem.qml
@@ -82,7 +82,7 @@ T.MenuItem {
visible: control.subMenu
mirror: control.mirrored
color: !enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/rightarrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/rightarrow.png"
}
indicator: ColorImage {
@@ -91,7 +91,7 @@ T.MenuItem {
visible: control.checked
color: !control.enabled ? control.Universal.baseLowColor : control.down ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor
- source: !control.checkable ? "" : "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/checkmark.png"
+ source: !control.checkable ? "" : "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/checkmark.png"
}
background: Rectangle {
diff --git a/src/imports/controls/universal/SpinBox.qml b/src/imports/controls/universal/SpinBox.qml
index dfe927f5..56fdffdf 100644
--- a/src/imports/controls/universal/SpinBox.qml
+++ b/src/imports/controls/universal/SpinBox.qml
@@ -105,7 +105,7 @@ T.SpinBox {
y: (parent.height - height) / 2
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/" + (control.mirrored ? "left" : "right") + "arrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/" + (control.mirrored ? "left" : "right") + "arrow.png"
}
}
@@ -131,7 +131,7 @@ T.SpinBox {
y: (parent.height - height) / 2
color: !enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/" + (control.mirrored ? "right" : "left") + "arrow.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/" + (control.mirrored ? "right" : "left") + "arrow.png"
}
}
diff --git a/src/imports/controls/universal/CheckIndicator.qml b/src/imports/controls/universal/impl/CheckIndicator.qml
index 8f41617a..7e8d9327 100644
--- a/src/imports/controls/universal/CheckIndicator.qml
+++ b/src/imports/controls/universal/impl/CheckIndicator.qml
@@ -62,7 +62,7 @@ Rectangle {
visible: indicator.control.checkState === Qt.Checked
color: !indicator.control.enabled ? indicator.control.Universal.baseLowColor : indicator.control.Universal.chromeWhiteColor
- source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Universal/images/checkmark.png"
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls/Universal/images/checkmark.png"
}
Rectangle {
diff --git a/src/imports/controls/universal/RadioIndicator.qml b/src/imports/controls/universal/impl/RadioIndicator.qml
index 1a32decb..1a32decb 100644
--- a/src/imports/controls/universal/RadioIndicator.qml
+++ b/src/imports/controls/universal/impl/RadioIndicator.qml
diff --git a/src/imports/controls/universal/SwitchIndicator.qml b/src/imports/controls/universal/impl/SwitchIndicator.qml
index 10f39515..10f39515 100644
--- a/src/imports/controls/universal/SwitchIndicator.qml
+++ b/src/imports/controls/universal/impl/SwitchIndicator.qml
diff --git a/src/imports/controls/universal/impl/qmldir b/src/imports/controls/universal/impl/qmldir
new file mode 100644
index 00000000..26bbd8bf
--- /dev/null
+++ b/src/imports/controls/universal/impl/qmldir
@@ -0,0 +1,3 @@
+module QtQuick.Controls.Universal.impl
+plugin qtquickcontrols2universalstyleimplplugin
+classname QtQuickControls2UniversalStyleImplPlugin
diff --git a/src/imports/controls/universal/qquickuniversalbusyindicator.cpp b/src/imports/controls/universal/impl/qquickuniversalbusyindicator.cpp
index 70170296..2f0ada49 100644
--- a/src/imports/controls/universal/qquickuniversalbusyindicator.cpp
+++ b/src/imports/controls/universal/impl/qquickuniversalbusyindicator.cpp
@@ -40,7 +40,7 @@
#include <QtCore/qeasingcurve.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qsgadaptationlayer_p.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalbusyindicator_p.h b/src/imports/controls/universal/impl/qquickuniversalbusyindicator_p.h
index 119091b5..6d3ebb84 100644
--- a/src/imports/controls/universal/qquickuniversalbusyindicator_p.h
+++ b/src/imports/controls/universal/impl/qquickuniversalbusyindicator_p.h
@@ -58,6 +58,8 @@ class QQuickUniversalBusyIndicator : public QQuickItem
Q_OBJECT
Q_PROPERTY(int count READ count WRITE setCount FINAL)
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ QML_NAMED_ELEMENT(BusyIndicatorImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickUniversalBusyIndicator(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp b/src/imports/controls/universal/impl/qquickuniversalfocusrectangle.cpp
index 51508c6f..51508c6f 100644
--- a/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp
+++ b/src/imports/controls/universal/impl/qquickuniversalfocusrectangle.cpp
diff --git a/src/imports/controls/universal/qquickuniversalfocusrectangle_p.h b/src/imports/controls/universal/impl/qquickuniversalfocusrectangle_p.h
index 6bae3b13..f309b512 100644
--- a/src/imports/controls/universal/qquickuniversalfocusrectangle_p.h
+++ b/src/imports/controls/universal/impl/qquickuniversalfocusrectangle_p.h
@@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE
class QQuickUniversalFocusRectangle : public QQuickPaintedItem
{
Q_OBJECT
+ QML_NAMED_ELEMENT(FocusRectangle)
+ QML_ADDED_IN_VERSION(2, 0)
public:
QQuickUniversalFocusRectangle(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/universal/qquickuniversalprogressbar.cpp b/src/imports/controls/universal/impl/qquickuniversalprogressbar.cpp
index 7d4642c5..8f907b75 100644
--- a/src/imports/controls/universal/qquickuniversalprogressbar.cpp
+++ b/src/imports/controls/universal/impl/qquickuniversalprogressbar.cpp
@@ -41,7 +41,7 @@
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qsgadaptationlayer_p.h>
#include <QtQuick/qsgrectanglenode.h>
-#include <QtQuickControls2/private/qquickanimatednode_p.h>
+#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalprogressbar_p.h b/src/imports/controls/universal/impl/qquickuniversalprogressbar_p.h
index 449f7965..31cb4a32 100644
--- a/src/imports/controls/universal/qquickuniversalprogressbar_p.h
+++ b/src/imports/controls/universal/impl/qquickuniversalprogressbar_p.h
@@ -59,6 +59,8 @@ class QQuickUniversalProgressBar : public QQuickItem
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
+ QML_NAMED_ELEMENT(ProgressBarImpl)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickUniversalProgressBar(QQuickItem *parent = nullptr);
diff --git a/src/imports/controls/universal/impl/qtquickcontrols2universalstyleimplplugin.cpp b/src/imports/controls/universal/impl/qtquickcontrols2universalstyleimplplugin.cpp
new file mode 100644
index 00000000..bc36be44
--- /dev/null
+++ b/src/imports/controls/universal/impl/qtquickcontrols2universalstyleimplplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2UniversalStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2UniversalStyleImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2UniversalStyleImplPlugin::QtQuickControls2UniversalStyleImplPlugin(QObject *parent)
+ : QQmlEngineExtensionPlugin(parent)
+{
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2universalstyleimplplugin.moc"
diff --git a/src/imports/controls/universal/impl/universal-impl.pro b/src/imports/controls/universal/impl/universal-impl.pro
new file mode 100644
index 00000000..520f3243
--- /dev/null
+++ b/src/imports/controls/universal/impl/universal-impl.pro
@@ -0,0 +1,36 @@
+TARGET = qtquickcontrols2universalstyleimplplugin
+TARGETPATH = QtQuick/Controls.2/Universal/impl
+
+QML_IMPORT_NAME = QtQuick.Controls.Universal.impl
+QML_IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+
+QT += qml quick
+QT_PRIVATE += core-private gui qml-private quick-private quicktemplates2-private quickcontrols2impl-private
+QT_FOR_CONFIG = quickcontrols2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
+QML_FILES += \
+ $$PWD/CheckIndicator.qml \
+ $$PWD/RadioIndicator.qml \
+ $$PWD/SwitchIndicator.qml
+
+OTHER_FILES += \
+ qmldir \
+ $$QML_FILES
+
+HEADERS += \
+ $$PWD/qquickuniversalbusyindicator_p.h \
+ $$PWD/qquickuniversalfocusrectangle_p.h \
+ $$PWD/qquickuniversalprogressbar_p.h
+
+SOURCES += \
+ $$PWD/qquickuniversalbusyindicator.cpp \
+ $$PWD/qquickuniversalfocusrectangle.cpp \
+ $$PWD/qquickuniversalprogressbar.cpp \
+ $$PWD/qtquickcontrols2universalstyleimplplugin.cpp
+
+CONFIG += qmltypes install_qmltypes no_cxx_module install_qml_files builtin_resources qtquickcompiler
+load(qml_plugin)
+
+requires(qtConfig(quickcontrols2-universal))
diff --git a/src/imports/controls/universal/qquickuniversalstyle_p.h b/src/imports/controls/universal/qquickuniversalstyle_p.h
index 429621d7..50b07071 100644
--- a/src/imports/controls/universal/qquickuniversalstyle_p.h
+++ b/src/imports/controls/universal/qquickuniversalstyle_p.h
@@ -49,7 +49,7 @@
//
#include <QtGui/qcolor.h>
-#include <QtQuickControls2/private/qquickattachedobject_p.h>
+#include <QtQuickControls2Impl/private/qquickattachedobject_p.h>
QT_BEGIN_NAMESPACE
@@ -88,6 +88,11 @@ class QQuickUniversalStyle : public QQuickAttachedObject
Q_PROPERTY(QColor listLowColor READ listLowColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor listMediumColor READ listMediumColor NOTIFY paletteChanged FINAL)
+ QML_NAMED_ELEMENT(Universal)
+ QML_ATTACHED(QQuickUniversalStyle)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 0)
+
public:
explicit QQuickUniversalStyle(QObject *parent = nullptr);
diff --git a/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
index 08cd5001..bc0e6bb8 100644
--- a/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
+++ b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
@@ -36,15 +36,12 @@
#include <QtQuickControls2/private/qquickstyleplugin_p.h>
-#include "qquickuniversalbusyindicator_p.h"
-#include "qquickuniversalfocusrectangle_p.h"
-#include "qquickuniversalprogressbar_p.h"
#include "qquickuniversalstyle_p.h"
#include "qquickuniversaltheme_p.h"
QT_BEGIN_NAMESPACE
-class QtQuickControls2UniversalStylePlugin: public QQuickStylePlugin
+class QtQuickControls2UniversalStylePlugin : public QQuickStylePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
@@ -65,16 +62,9 @@ QtQuickControls2UniversalStylePlugin::QtQuickControls2UniversalStylePlugin(QObje
void QtQuickControls2UniversalStylePlugin::registerTypes(const char *uri)
{
- qmlRegisterModule(uri, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
- qmlRegisterUncreatableType<QQuickUniversalStyle>(uri, 2, 0, "Universal", tr("Universal is an attached property"));
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterModule(import, 2, 15); // Qt 5.12->2.12, 5.13->2.13...
- qmlRegisterType<QQuickUniversalFocusRectangle>(import, 2, 0, "FocusRectangle");
- qmlRegisterType<QQuickUniversalBusyIndicator>(import, 2, 0, "BusyIndicatorImpl");
- qmlRegisterType<QQuickUniversalProgressBar>(import, 2, 0, "ProgressBarImpl");
-
qmlRegisterType(resolvedUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator");
qmlRegisterType(resolvedUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator");
qmlRegisterType(resolvedUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator");
diff --git a/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc
index cd9ea61f..bfcb0974 100644
--- a/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc
+++ b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="qt-project.org/imports/QtQuick/Controls.2/Universal">
+<qresource prefix="qt-project.org/imports/QtQuick/Controls/Universal">
<file>images/checkmark.png</file>
<file>images/checkmark@2x.png</file>
<file>images/checkmark@3x.png</file>
diff --git a/src/imports/controls/universal/universal.pri b/src/imports/controls/universal/universal.pri
index 8f1b905c..983fcf10 100644
--- a/src/imports/controls/universal/universal.pri
+++ b/src/imports/controls/universal/universal.pri
@@ -1,10 +1,17 @@
+HEADERS += \
+ $$PWD/qquickuniversalstyle_p.h \
+ $$PWD/qquickuniversaltheme_p.h
+
+SOURCES += \
+ $$PWD/qquickuniversalstyle.cpp \
+ $$PWD/qquickuniversaltheme.cpp
+
QML_FILES += \
$$PWD/ApplicationWindow.qml \
$$PWD/BusyIndicator.qml \
$$PWD/Button.qml \
$$PWD/CheckBox.qml \
$$PWD/CheckDelegate.qml \
- $$PWD/CheckIndicator.qml \
$$PWD/ComboBox.qml \
$$PWD/DelayButton.qml \
$$PWD/Dial.qml \
@@ -28,7 +35,6 @@ QML_FILES += \
$$PWD/ProgressBar.qml \
$$PWD/RadioButton.qml \
$$PWD/RadioDelegate.qml \
- $$PWD/RadioIndicator.qml \
$$PWD/RangeSlider.qml \
$$PWD/RoundButton.qml \
$$PWD/ScrollBar.qml \
@@ -39,7 +45,6 @@ QML_FILES += \
$$PWD/StackView.qml \
$$PWD/SwipeDelegate.qml \
$$PWD/SwitchDelegate.qml \
- $$PWD/SwitchIndicator.qml \
$$PWD/Switch.qml \
$$PWD/TabBar.qml \
$$PWD/TabButton.qml \
@@ -51,17 +56,3 @@ QML_FILES += \
$$PWD/ToolTip.qml \
$$PWD/Tumbler.qml \
$$PWD/VerticalHeaderView.qml
-
-HEADERS += \
- $$PWD/qquickuniversalbusyindicator_p.h \
- $$PWD/qquickuniversalfocusrectangle_p.h \
- $$PWD/qquickuniversalprogressbar_p.h \
- $$PWD/qquickuniversalstyle_p.h \
- $$PWD/qquickuniversaltheme_p.h
-
-SOURCES += \
- $$PWD/qquickuniversalbusyindicator.cpp \
- $$PWD/qquickuniversalfocusrectangle.cpp \
- $$PWD/qquickuniversalprogressbar.cpp \
- $$PWD/qquickuniversalstyle.cpp \
- $$PWD/qquickuniversaltheme.cpp
diff --git a/src/imports/controls/universal/universal.pro b/src/imports/controls/universal/universal.pro
index 99bad4da..9065936c 100644
--- a/src/imports/controls/universal/universal.pro
+++ b/src/imports/controls/universal/universal.pro
@@ -5,7 +5,7 @@ IMPORT_NAME = QtQuick.Controls.Universal
IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private quickcontrols2impl-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII