aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-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.cpp (renamed from src/quickcontrols2/qtquickcontrols2global_p.h)35
-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
-rw-r--r--src/imports/controlsimpl/controlsimpl.pro17
-rw-r--r--src/imports/controlsimpl/qmldir4
-rw-r--r--src/imports/controlsimpl/qtquickcontrols2implplugin.cpp59
-rw-r--r--src/imports/imports.pro8
-rw-r--r--src/imports/platform/qquickplatformmenu_p.h4
-rw-r--r--src/imports/platform/qquickplatformmenuitem_p.h4
-rw-r--r--src/imports/platform/qquickplatformsystemtrayicon_p.h8
-rw-r--r--src/imports/templates/CMakeLists.txt4
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp280
-rw-r--r--src/imports/templates/templates.pro4
-rw-r--r--src/quickcontrols2/qquickstyle.cpp4
-rw-r--r--src/quickcontrols2/qquickstyle_p.h4
-rw-r--r--src/quickcontrols2/qquickstyleplugin.cpp3
-rw-r--r--src/quickcontrols2/qquickstyleplugin_p.h4
-rw-r--r--src/quickcontrols2/quickcontrols2.pro10
-rw-r--r--src/quickcontrols2impl/qquickanimatednode.cpp (renamed from src/quickcontrols2/qquickanimatednode.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickanimatednode_p.h (renamed from src/quickcontrols2/qquickanimatednode_p.h)2
-rw-r--r--src/quickcontrols2impl/qquickattachedobject.cpp (renamed from src/quickcontrols2/qquickattachedobject.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickattachedobject_p.h (renamed from src/quickcontrols2/qquickattachedobject_p.h)2
-rw-r--r--src/quickcontrols2impl/qquickchecklabel.cpp (renamed from src/quickcontrols2/qquickchecklabel.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickchecklabel_p.h (renamed from src/quickcontrols2/qquickchecklabel_p.h)12
-rw-r--r--src/quickcontrols2impl/qquickclippedtext.cpp (renamed from src/quickcontrols2/qquickclippedtext.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickclippedtext_p.h (renamed from src/quickcontrols2/qquickclippedtext_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickcolor.cpp (renamed from src/quickcontrols2/qquickcolor.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickcolor_p.h (renamed from src/quickcontrols2/qquickcolor_p.h)6
-rw-r--r--src/quickcontrols2impl/qquickcolorimage.cpp (renamed from src/quickcontrols2/qquickcolorimage.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickcolorimage_p.h (renamed from src/quickcontrols2/qquickcolorimage_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickiconimage.cpp (renamed from src/quickcontrols2/qquickiconimage.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickiconimage_p.h (renamed from src/quickcontrols2/qquickiconimage_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickiconimage_p_p.h (renamed from src/quickcontrols2/qquickiconimage_p_p.h)2
-rw-r--r--src/quickcontrols2impl/qquickiconlabel.cpp (renamed from src/quickcontrols2/qquickiconlabel.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickiconlabel_p.h (renamed from src/quickcontrols2/qquickiconlabel_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickiconlabel_p_p.h (renamed from src/quickcontrols2/qquickiconlabel_p_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickitemgroup.cpp (renamed from src/quickcontrols2/qquickitemgroup.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickitemgroup_p.h (renamed from src/quickcontrols2/qquickitemgroup_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickmnemoniclabel.cpp (renamed from src/quickcontrols2/qquickmnemoniclabel.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickmnemoniclabel_p.h (renamed from src/quickcontrols2/qquickmnemoniclabel_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickpaddedrectangle.cpp (renamed from src/quickcontrols2/qquickpaddedrectangle.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickpaddedrectangle_p.h (renamed from src/quickcontrols2/qquickpaddedrectangle_p.h)4
-rw-r--r--src/quickcontrols2impl/qquickplaceholdertext.cpp (renamed from src/quickcontrols2/qquickplaceholdertext.cpp)0
-rw-r--r--src/quickcontrols2impl/qquickplaceholdertext_p.h (renamed from src/quickcontrols2/qquickplaceholdertext_p.h)4
-rw-r--r--src/quickcontrols2impl/qquicktumblerview.cpp (renamed from src/quickcontrols2/qquicktumblerview.cpp)0
-rw-r--r--src/quickcontrols2impl/qquicktumblerview_p.h (renamed from src/quickcontrols2/qquicktumblerview_p.h)4
-rw-r--r--src/quickcontrols2impl/qtquickcontrols2foreign_p.h76
-rw-r--r--src/quickcontrols2impl/qtquickcontrols2implglobal_p.h67
-rw-r--r--src/quickcontrols2impl/quickcontrols2impl.pro (renamed from src/quickcontrols2/quickcontrols2.pri)25
-rw-r--r--src/quicktemplates2/qquickabstractbutton_p.h40
-rw-r--r--src/quicktemplates2/qquickaction_p.h2
-rw-r--r--src/quicktemplates2/qquickactiongroup_p.h3
-rw-r--r--src/quicktemplates2/qquickapplicationwindow_p.h36
-rw-r--r--src/quicktemplates2/qquickbusyindicator_p.h2
-rw-r--r--src/quicktemplates2/qquickbutton_p.h2
-rw-r--r--src/quicktemplates2/qquickbuttongroup_p.h13
-rw-r--r--src/quicktemplates2/qquickcheckbox_p.h6
-rw-r--r--src/quicktemplates2/qquickcheckdelegate_p.h6
-rw-r--r--src/quicktemplates2/qquickcombobox_p.h62
-rw-r--r--src/quicktemplates2/qquickcontainer_p.h16
-rw-r--r--src/quicktemplates2/qquickcontrol_p.h57
-rw-r--r--src/quicktemplates2/qquickdelaybutton_p.h2
-rw-r--r--src/quicktemplates2/qquickdial_p.h12
-rw-r--r--src/quicktemplates2/qquickdialog_p.h24
-rw-r--r--src/quicktemplates2/qquickdialogbuttonbox_p.h13
-rw-r--r--src/quicktemplates2/qquickdrawer_p.h6
-rw-r--r--src/quicktemplates2/qquickframe_p.h2
-rw-r--r--src/quicktemplates2/qquickgroupbox_p.h10
-rw-r--r--src/quicktemplates2/qquickheaderview_p.h12
-rw-r--r--src/quicktemplates2/qquickicon_p.h3
-rw-r--r--src/quicktemplates2/qquickitemdelegate_p.h2
-rw-r--r--src/quicktemplates2/qquicklabel_p.h34
-rw-r--r--src/quicktemplates2/qquickmenu_p.h48
-rw-r--r--src/quicktemplates2/qquickmenubar_p.h2
-rw-r--r--src/quicktemplates2/qquickmenubaritem_p.h2
-rw-r--r--src/quicktemplates2/qquickmenuitem_p.h14
-rw-r--r--src/quicktemplates2/qquickmenuseparator_p.h2
-rw-r--r--src/quicktemplates2/qquickoverlay_p.h4
-rw-r--r--src/quicktemplates2/qquickpage_p.h14
-rw-r--r--src/quicktemplates2/qquickpageindicator_p.h2
-rw-r--r--src/quicktemplates2/qquickpane_p.h2
-rw-r--r--src/quicktemplates2/qquickpopup_p.h62
-rw-r--r--src/quicktemplates2/qquickpopupanchors_p.h2
-rw-r--r--src/quicktemplates2/qquickprogressbar_p.h2
-rw-r--r--src/quicktemplates2/qquickradiobutton_p.h2
-rw-r--r--src/quicktemplates2/qquickradiodelegate_p.h2
-rw-r--r--src/quicktemplates2/qquickrangeslider_p.h32
-rw-r--r--src/quicktemplates2/qquickroundbutton_p.h2
-rw-r--r--src/quicktemplates2/qquickscrollbar_p.h31
-rw-r--r--src/quicktemplates2/qquickscrollindicator_p.h19
-rw-r--r--src/quicktemplates2/qquickscrollview_p.h2
-rw-r--r--src/quicktemplates2/qquickslider_p.h26
-rw-r--r--src/quicktemplates2/qquickspinbox_p.h34
-rw-r--r--src/quicktemplates2/qquicksplitview_p.h7
-rw-r--r--src/quicktemplates2/qquickstackview_p.h21
-rw-r--r--src/quicktemplates2/qquickswipe_p.h20
-rw-r--r--src/quicktemplates2/qquickswipedelegate_p.h3
-rw-r--r--src/quicktemplates2/qquickswipeview_p.h23
-rw-r--r--src/quicktemplates2/qquickswitch_p.h2
-rw-r--r--src/quicktemplates2/qquickswitchdelegate_p.h2
-rw-r--r--src/quicktemplates2/qquicktabbar_p.h7
-rw-r--r--src/quicktemplates2/qquicktabbutton_p.h2
-rw-r--r--src/quicktemplates2/qquicktextarea_p.h50
-rw-r--r--src/quicktemplates2/qquicktextfield_p.h50
-rw-r--r--src/quicktemplates2/qquicktoolbar_p.h2
-rw-r--r--src/quicktemplates2/qquicktoolbutton_p.h2
-rw-r--r--src/quicktemplates2/qquicktoolseparator_p.h2
-rw-r--r--src/quicktemplates2/qquicktooltip_p.h7
-rw-r--r--src/quicktemplates2/qquicktumbler_p.h13
-rw-r--r--src/quicktemplates2/qtquicktemplates2global_p.h2
-rw-r--r--src/quicktemplates2/quicktemplates2.pro6
-rw-r--r--src/src.pro4
222 files changed, 1502 insertions, 917 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/quickcontrols2/qtquickcontrols2global_p.h b/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp
index 7a54849e..734d32de 100644
--- a/src/quickcontrols2/qtquickcontrols2global_p.h
+++ b/src/imports/controls/default/impl/qtquickcontrols2defaultstyleimplplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** 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.
@@ -34,23 +34,24 @@
**
****************************************************************************/
-#ifndef QTQUICKCONTROLS2GLOBAL_P_H
-#define QTQUICKCONTROLS2GLOBAL_P_H
+#include <QtQml/qqmlextensionplugin.h>
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
+QT_BEGIN_NAMESPACE
-#include <QtQuickControls2/qtquickcontrols2global.h>
-#include <QtQuickControls2/private/qtquickcontrols2-config_p.h>
+class QtQuickControls2DefaultStyleImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-#define Q_QUICKCONTROLS2_PRIVATE_EXPORT Q_QUICKCONTROLS2_EXPORT
+public:
+ QtQuickControls2DefaultStyleImplPlugin(QObject *parent = nullptr);
+};
-#endif // QTQUICKCONTROLS2GLOBAL_P_H
+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
diff --git a/src/imports/controlsimpl/controlsimpl.pro b/src/imports/controlsimpl/controlsimpl.pro
new file mode 100644
index 00000000..70f3e170
--- /dev/null
+++ b/src/imports/controlsimpl/controlsimpl.pro
@@ -0,0 +1,17 @@
+TARGET = qtquickcontrols2implplugin
+TARGETPATH = QtQuick/Controls.2/impl
+IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+
+QT += qml quick
+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
+
+OTHER_FILES += \
+ qmldir
+
+SOURCES += \
+ $$PWD/qtquickcontrols2implplugin.cpp
+
+CONFIG += no_cxx_module
+load(qml_plugin)
diff --git a/src/imports/controlsimpl/qmldir b/src/imports/controlsimpl/qmldir
new file mode 100644
index 00000000..e7097d82
--- /dev/null
+++ b/src/imports/controlsimpl/qmldir
@@ -0,0 +1,4 @@
+module QtQuick.Controls.impl
+plugin qtquickcontrols2implplugin
+classname QtQuickControls2ImplPlugin
+depends QtQuick.Templates 2.5
diff --git a/src/imports/controlsimpl/qtquickcontrols2implplugin.cpp b/src/imports/controlsimpl/qtquickcontrols2implplugin.cpp
new file mode 100644
index 00000000..d5f29f5c
--- /dev/null
+++ b/src/imports/controlsimpl/qtquickcontrols2implplugin.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** 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>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2ImplPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2ImplPlugin(QObject *parent = nullptr);
+};
+
+QtQuickControls2ImplPlugin::QtQuickControls2ImplPlugin(QObject *parent) : QQmlEngineExtensionPlugin(parent)
+{
+ volatile auto registration = &qml_register_types_QtQuick_Controls_impl;
+ Q_UNUSED(registration)
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2implplugin.moc"
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index 387418de..b461f162 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -1,12 +1,18 @@
TEMPLATE = subdirs
SUBDIRS += \
controls \
+ controlsimpl \
platform \
templates
SUBDIRS += \
controls/default/default.pro \
+ controls/default/impl/default-impl.pro \
controls/fusion/fusion.pro \
+ controls/fusion/impl/fusion-impl.pro \
controls/imagine/imagine.pro \
+ controls/imagine/impl/imagine-impl.pro \
controls/material/material.pro \
- controls/universal/universal.pro
+ controls/material/impl/material-impl.pro \
+ controls/universal/universal.pro \
+ controls/universal/impl/universal-impl.pro
diff --git a/src/imports/platform/qquickplatformmenu_p.h b/src/imports/platform/qquickplatformmenu_p.h
index 089e1f89..b573b0d4 100644
--- a/src/imports/platform/qquickplatformmenu_p.h
+++ b/src/imports/platform/qquickplatformmenu_p.h
@@ -86,7 +86,7 @@ class QQuickPlatformMenu : public QObject, public QQmlParserStatus
Q_PROPERTY(QPlatformMenu::MenuType type READ type WRITE setType NOTIFY typeChanged FINAL)
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL)
- Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 1)
+ Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
Q_ENUMS(QPlatformMenu::MenuType)
Q_CLASSINFO("DefaultProperty", "data")
@@ -162,7 +162,7 @@ Q_SIGNALS:
void minimumWidthChanged();
void fontChanged();
void typeChanged();
- Q_REVISION(1) void iconChanged();
+ Q_REVISION(2, 1) void iconChanged();
protected:
void classBegin() override;
diff --git a/src/imports/platform/qquickplatformmenuitem_p.h b/src/imports/platform/qquickplatformmenuitem_p.h
index c1e6cc30..01b7482d 100644
--- a/src/imports/platform/qquickplatformmenuitem_p.h
+++ b/src/imports/platform/qquickplatformmenuitem_p.h
@@ -80,7 +80,7 @@ class QQuickPlatformMenuItem : public QObject, public QQmlParserStatus
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
Q_PROPERTY(QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL)
- Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 1)
+ Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
Q_ENUMS(QPlatformMenuItem::MenuRole)
public:
@@ -149,7 +149,7 @@ Q_SIGNALS:
void textChanged();
void shortcutChanged();
void fontChanged();
- Q_REVISION(1) void iconChanged();
+ Q_REVISION(2, 1) void iconChanged();
protected:
void classBegin() override;
diff --git a/src/imports/platform/qquickplatformsystemtrayicon_p.h b/src/imports/platform/qquickplatformsystemtrayicon_p.h
index 0216aee3..d7cc46c0 100644
--- a/src/imports/platform/qquickplatformsystemtrayicon_p.h
+++ b/src/imports/platform/qquickplatformsystemtrayicon_p.h
@@ -72,8 +72,8 @@ class QQuickPlatformSystemTrayIcon : public QObject, public QQmlParserStatus
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(QString tooltip READ tooltip WRITE setTooltip NOTIFY tooltipChanged FINAL)
Q_PROPERTY(QQuickPlatformMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
- Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged FINAL REVISION 1)
- Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 1)
+ Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged FINAL REVISION(1, 1))
+ Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
Q_ENUMS(QPlatformSystemTrayIcon::ActivationReason QPlatformSystemTrayIcon::MessageIcon)
public:
@@ -112,8 +112,8 @@ Q_SIGNALS:
void visibleChanged();
void tooltipChanged();
void menuChanged();
- Q_REVISION(1) void geometryChanged();
- Q_REVISION(1) void iconChanged();
+ Q_REVISION(2, 1) void geometryChanged();
+ Q_REVISION(2, 1) void iconChanged();
protected:
void init();
diff --git a/src/imports/templates/CMakeLists.txt b/src/imports/templates/CMakeLists.txt
index 4e6a80c4..a1d95e94 100644
--- a/src/imports/templates/CMakeLists.txt
+++ b/src/imports/templates/CMakeLists.txt
@@ -5,7 +5,7 @@
#####################################################################
qt_add_qml_module(qtquicktemplates2plugin
- TARGET_PATH "QtQuick/Templates.2"
+ TARGET_PATH "QtQuick/Templates"
URI "QtQuick.Templates"
VERSION "2.${CMAKE_PROJECT_VERSION_MINOR}"
CLASSNAME QtQuickTemplates2Plugin
@@ -33,4 +33,4 @@ qt_add_qml_module(qtquicktemplates2plugin
#### Keys ignored in scope 1:.:.:templates.pro:<TRUE>:
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
# OTHER_FILES = "qmldir"
-# TARGETPATH = "QtQuick/Templates.2"
+# TARGETPATH = "QtQuick/Templates"
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 28ce0bf0..e2a15213 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.
@@ -37,73 +37,9 @@
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/private/qqmlglobal_p.h>
-#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
-#include <QtQuickTemplates2/private/qquickaction_p.h>
-#include <QtQuickTemplates2/private/qquickactiongroup_p.h>
-#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
-#include <QtQuickTemplates2/private/qquickbusyindicator_p.h>
-#include <QtQuickTemplates2/private/qquickbutton_p.h>
-#include <QtQuickTemplates2/private/qquickbuttongroup_p.h>
-#include <QtQuickTemplates2/private/qquickcheckbox_p.h>
-#include <QtQuickTemplates2/private/qquickcheckdelegate_p.h>
-#include <QtQuickTemplates2/private/qquickcombobox_p.h>
-#include <QtQuickTemplates2/private/qquickcontrol_p.h>
-#include <QtQuickTemplates2/private/qquickcontainer_p.h>
-#include <QtQuickTemplates2/private/qquickdelaybutton_p.h>
-#include <QtQuickTemplates2/private/qquickdial_p.h>
-#include <QtQuickTemplates2/private/qquickdialog_p.h>
-#include <QtQuickTemplates2/private/qquickdialogbuttonbox_p.h>
-#include <QtQuickTemplates2/private/qquickdrawer_p.h>
-#include <QtQuickTemplates2/private/qquickframe_p.h>
-#include <QtQuickTemplates2/private/qquickgroupbox_p.h>
-#include <QtQuickTemplates2/private/qquickheaderview_p.h>
-#include <QtQuickTemplates2/private/qquickicon_p.h>
-#include <QtQuickTemplates2/private/qquickitemdelegate_p.h>
-#include <QtQuickTemplates2/private/qquicklabel_p.h>
-#include <QtQuickTemplates2/private/qquickmenu_p.h>
-#include <QtQuickTemplates2/private/qquickmenubar_p.h>
-#include <QtQuickTemplates2/private/qquickmenubaritem_p.h>
-#include <QtQuickTemplates2/private/qquickmenuitem_p.h>
-#include <QtQuickTemplates2/private/qquickmenuseparator_p.h>
-#include <QtQuickTemplates2/private/qquickoverlay_p.h>
-#include <QtQuickTemplates2/private/qquickpage_p.h>
-#include <QtQuickTemplates2/private/qquickpageindicator_p.h>
-#include <QtQuickTemplates2/private/qquickpane_p.h>
-#include <QtQuickTemplates2/private/qquickpopup_p.h>
-#include <QtQuickTemplates2/private/qquickpopupanchors_p.h>
-#include <QtQuickTemplates2/private/qquickprogressbar_p.h>
-#include <QtQuickTemplates2/private/qquickradiobutton_p.h>
-#include <QtQuickTemplates2/private/qquickradiodelegate_p.h>
-#include <QtQuickTemplates2/private/qquickrangeslider_p.h>
-#include <QtQuickTemplates2/private/qquickroundbutton_p.h>
-#include <QtQuickTemplates2/private/qquickscrollbar_p.h>
-#include <QtQuickTemplates2/private/qquickscrollindicator_p.h>
-#include <QtQuickTemplates2/private/qquickscrollview_p.h>
+#if QT_CONFIG(shortcut)
#include <QtQuickTemplates2/private/qquickshortcutcontext_p_p.h>
-#include <QtQuickTemplates2/private/qquickslider_p.h>
-#include <QtQuickTemplates2/private/qquickspinbox_p.h>
-#include <QtQuickTemplates2/private/qquicksplitview_p.h>
-#include <QtQuickTemplates2/private/qquickstackview_p.h>
-#include <QtQuickTemplates2/private/qquickswipe_p.h>
-#include <QtQuickTemplates2/private/qquickswipedelegate_p.h>
-#include <QtQuickTemplates2/private/qquickswipeview_p.h>
-#include <QtQuickTemplates2/private/qquickswitch_p.h>
-#include <QtQuickTemplates2/private/qquickswitchdelegate_p.h>
-#include <QtQuickTemplates2/private/qquicktabbar_p.h>
-#include <QtQuickTemplates2/private/qquicktabbutton_p.h>
-#include <QtQuickTemplates2/private/qquicktextarea_p.h>
-#include <QtQuickTemplates2/private/qquicktextfield_p.h>
-#include <QtQuickTemplates2/private/qquicktoolbar_p.h>
-#include <QtQuickTemplates2/private/qquicktoolbutton_p.h>
-#include <QtQuickTemplates2/private/qquicktoolseparator_p.h>
-#include <QtQuickTemplates2/private/qquicktooltip_p.h>
-#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
-#include <QtQuickTemplates2/private/qquicktumbler_p.h>
-#endif
-
-#include <QtQuick/private/qquickpalette_p.h>
-#if QT_CONFIG(shortcut)
// qtdeclarative/src/quick/util/qquickshortcut.cpp
typedef bool (*ShortcutContextMatcher)(QObject *, Qt::ShortcutContext);
extern ShortcutContextMatcher qt_quick_shortcut_context_matcher();
@@ -112,7 +48,7 @@ extern void qt_quick_set_shortcut_context_matcher(ShortcutContextMatcher matcher
QT_BEGIN_NAMESPACE
-class QtQuickTemplates2Plugin: public QQmlExtensionPlugin
+class QtQuickTemplates2Plugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
@@ -134,6 +70,8 @@ private:
QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent)
: QQmlExtensionPlugin(parent), registered(false)
{
+ volatile auto registration = &qml_register_types_QtQuick_Templates;
+ Q_UNUSED(registration)
}
QtQuickTemplates2Plugin::~QtQuickTemplates2Plugin()
@@ -142,7 +80,7 @@ QtQuickTemplates2Plugin::~QtQuickTemplates2Plugin()
// initialization and cleanup, as plugins are not unloaded on macOS.
}
-void QtQuickTemplates2Plugin::registerTypes(const char *uri)
+void QtQuickTemplates2Plugin::registerTypes(const char */*uri*/)
{
#if QT_CONFIG(shortcut)
originalContextMatcher = qt_quick_shortcut_context_matcher();
@@ -150,212 +88,6 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
#endif
registered = true;
-
- // The minor version used to be the current Qt 5 minor. For compatibility it is the last
- // Qt 5 release.
- qmlRegisterModule(uri, 2, 15);
-
- // QtQuick.Templates 2.0 (originally introduced in Qt 5.7)
- qmlRegisterType<QQuickAbstractButton>(uri, 2, 0, "AbstractButton");
- qmlRegisterType<QQuickApplicationWindow>(uri, 2, 0, "ApplicationWindow");
- qmlRegisterAnonymousType<QQuickApplicationWindowAttached>(uri, 2);
- qmlRegisterType<QQuickBusyIndicator>(uri, 2, 0, "BusyIndicator");
- qmlRegisterType<QQuickButton>(uri, 2, 0, "Button");
- qmlRegisterType<QQuickButtonGroup>(uri, 2, 0, "ButtonGroup");
- qmlRegisterAnonymousType<QQuickButtonGroupAttached>(uri, 2);
- qmlRegisterType<QQuickCheckBox>(uri, 2, 0, "CheckBox");
- qmlRegisterType<QQuickCheckDelegate>(uri, 2, 0, "CheckDelegate");
- qmlRegisterType<QQuickComboBox>(uri, 2, 0, "ComboBox");
- qmlRegisterType<QQuickContainer>(uri, 2, 0, "Container");
- qmlRegisterType<QQuickControl>(uri, 2, 0, "Control");
- qmlRegisterType<QQuickDial>(uri, 2, 0, "Dial");
- qmlRegisterType<QQuickDrawer>(uri, 2, 0, "Drawer");
- qmlRegisterType<QQuickFrame>(uri, 2, 0, "Frame");
- qmlRegisterType<QQuickGroupBox>(uri, 2, 0, "GroupBox");
- qmlRegisterType<QQuickItemDelegate>(uri, 2, 0, "ItemDelegate");
- qmlRegisterType<QQuickLabel>(uri, 2, 0, "Label");
- qmlRegisterType<QQuickMenu>(uri, 2, 0, "Menu");
- qmlRegisterType<QQuickMenuItem>(uri, 2, 0, "MenuItem");
- qmlRegisterAnonymousType<QQuickOverlay>(uri, 2);
- qmlRegisterType<QQuickPage>(uri, 2, 0, "Page");
- qmlRegisterType<QQuickPageIndicator>(uri, 2, 0, "PageIndicator");
- qmlRegisterType<QQuickPane>(uri, 2, 0, "Pane");
- qmlRegisterType<QQuickPopup>(uri, 2, 0, "Popup");
- qmlRegisterType<QQuickProgressBar>(uri, 2, 0, "ProgressBar");
- qmlRegisterType<QQuickRadioButton>(uri, 2, 0, "RadioButton");
- qmlRegisterType<QQuickRadioDelegate>(uri, 2, 0, "RadioDelegate");
- qmlRegisterType<QQuickRangeSlider>(uri, 2, 0, "RangeSlider");
- qmlRegisterAnonymousType<QQuickRangeSliderNode>(uri, 2);
- qmlRegisterType<QQuickScrollBar>(uri, 2, 0, "ScrollBar");
- qmlRegisterAnonymousType<QQuickScrollBarAttached>(uri, 2);
- qmlRegisterType<QQuickScrollIndicator>(uri, 2, 0, "ScrollIndicator");
- qmlRegisterAnonymousType<QQuickScrollIndicatorAttached>(uri, 2);
- qmlRegisterType<QQuickSlider>(uri, 2, 0, "Slider");
- qmlRegisterType<QQuickSpinBox>(uri, 2, 0, "SpinBox");
- qmlRegisterAnonymousType<QQuickSpinButton>(uri, 2);
- qmlRegisterType<QQuickStackView>(uri, 2, 0, "StackView");
- qmlRegisterAnonymousType<QQuickStackViewAttached>(uri, 2);
- qmlRegisterAnonymousType<QQuickSwipe>(uri, 2);
- qmlRegisterType<QQuickSwipeDelegate>(uri, 2, 0, "SwipeDelegate");
- qmlRegisterType<QQuickSwipeView>(uri, 2, 0, "SwipeView");
- qmlRegisterAnonymousType<QQuickSwipeViewAttached>(uri, 2);
- qmlRegisterType<QQuickSwitch>(uri, 2, 0, "Switch");
- qmlRegisterType<QQuickSwitchDelegate>(uri, 2, 0, "SwitchDelegate");
- qmlRegisterType<QQuickTabBar>(uri, 2, 0, "TabBar");
- qmlRegisterType<QQuickTabButton>(uri, 2, 0, "TabButton");
- qmlRegisterType<QQuickTextArea>(uri, 2, 0, "TextArea");
- qmlRegisterAnonymousType<QQuickTextAreaAttached>(uri, 2);
- qmlRegisterType<QQuickTextField>(uri, 2, 0, "TextField");
- qmlRegisterType<QQuickToolBar>(uri, 2, 0, "ToolBar");
- qmlRegisterType<QQuickToolButton>(uri, 2, 0, "ToolButton");
- qmlRegisterType<QQuickToolTip>(uri, 2, 0, "ToolTip");
- qmlRegisterAnonymousType<QQuickToolTipAttached>(uri, 2);
-#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
- qmlRegisterAnonymousType<QQuickTumblerAttached>(uri, 2);
- qmlRegisterType<QQuickTumbler>(uri, 2, 0, "Tumbler");
-#endif
-
- // NOTE: register the latest revisions of all template/control base classes to
- // make revisioned properties available to their subclasses (synced with Qt 5.7)
- qmlRegisterRevision<QQuickItem, 7>(uri, 2, 0);
- qmlRegisterRevision<QQuickText, 6>(uri, 2, 0);
- qmlRegisterRevision<QQuickTextInput, 7>(uri, 2, 0);
- qmlRegisterRevision<QQuickTextEdit, 7>(uri, 2, 0);
- qmlRegisterRevision<QQuickWindow, 2>(uri, 2, 0);
- qmlRegisterRevision<QWindow, 3>(uri, 2, 0);
-
- // QtQuick.Templates 2.1 (new types and revisions in Qt 5.8)
- qmlRegisterType<QQuickButtonGroup, 1>(uri, 2, 1, "ButtonGroup");
- qmlRegisterType<QQuickComboBox, 1>(uri, 2, 1, "ComboBox");
- qmlRegisterType<QQuickContainer, 1>(uri, 2, 1, "Container");
- qmlRegisterType<QQuickDialog>(uri, 2, 1, "Dialog");
- qmlRegisterType<QQuickDialogButtonBox>(uri, 2, 1, "DialogButtonBox");
- qmlRegisterAnonymousType<QQuickDialogButtonBoxAttached>(uri, 2);
- qmlRegisterType<QQuickMenuSeparator>(uri, 2, 1, "MenuSeparator");
- qmlRegisterType<QQuickPage, 1>(uri, 2, 1, "Page");
- qmlRegisterType<QQuickPopup, 1>(uri, 2, 1, "Popup");
- qmlRegisterType<QQuickRangeSlider, 1>(uri, 2, 1, "RangeSlider");
- qmlRegisterType<QQuickRoundButton>(uri, 2, 1, "RoundButton");
- qmlRegisterType<QQuickSlider, 1>(uri, 2, 1, "Slider");
- qmlRegisterType<QQuickSpinBox, 1>(uri, 2, 1, "SpinBox");
- qmlRegisterType<QQuickStackView, 1>(uri, 2, 1, "StackView");
- qmlRegisterType<QQuickSwipeDelegate, 1>(uri, 2, 1, "SwipeDelegate");
- qmlRegisterType<QQuickSwipeView, 1>(uri, 2, 1, "SwipeView");
- qmlRegisterType<QQuickTextArea, 1>(uri, 2, 1, "TextArea");
- qmlRegisterType<QQuickTextField, 1>(uri, 2, 1, "TextField");
- qmlRegisterType<QQuickToolSeparator>(uri, 2, 1, "ToolSeparator");
-#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
- qmlRegisterType<QQuickTumbler, 1>(uri, 2, 1, "Tumbler");
-#endif
-
- // QtQuick.Templates 2.2 (new types and revisions in Qt 5.9)
- qmlRegisterType<QQuickAbstractButton, 2>(uri, 2, 2, "AbstractButton");
- qmlRegisterType<QQuickComboBox, 2>(uri, 2, 2, "ComboBox");
- qmlRegisterType<QQuickDelayButton>(uri, 2, 2, "DelayButton");
- qmlRegisterType<QQuickDial, 2>(uri, 2, 2, "Dial");
- qmlRegisterType<QQuickDrawer, 2>(uri, 2, 2, "Drawer");
- qmlRegisterType<QQuickRangeSlider, 2>(uri, 2, 2, "RangeSlider");
- qmlRegisterType<QQuickScrollBar, 2>(uri, 2, 2, "ScrollBar");
- qmlRegisterType<QQuickScrollView>(uri, 2, 2, "ScrollView");
- qmlRegisterType<QQuickSlider, 2>(uri, 2, 2, "Slider");
- qmlRegisterType<QQuickSpinBox, 2>(uri, 2, 2, "SpinBox");
- qmlRegisterType<QQuickSwipeDelegate, 2>(uri, 2, 2, "SwipeDelegate");
- qmlRegisterType<QQuickSwipeView, 2>(uri, 2, 2, "SwipeView");
- qmlRegisterType<QQuickTabBar, 2>(uri, 2, 2, "TabBar");
-#if QT_CONFIG(quick_listview) && QT_CONFIG(quick_pathview)
- qmlRegisterType<QQuickTumbler, 2>(uri, 2, 2, "Tumbler");
-#endif
-
- // NOTE: register the latest revisions of all template/control base classes to
- // make revisioned properties available to their subclasses (synced with Qt 5.9)
- qmlRegisterRevision<QQuickText, 9>(uri, 2, 2);
- qmlRegisterRevision<QQuickTextInput, 9>(uri, 2, 2);
- qmlRegisterRevision<QQuickWindowQmlImpl, 3>(uri, 2, 2);
- qmlRegisterRevision<QQuickWindowQmlImpl, 3>(uri, 2, 3);
- qmlRegisterRevision<QQuickWindow, 3>(uri, 2, 3);
- qmlRegisterRevision<QQuickItem, 3>(uri, 2, 3);
-
- // QtQuick.Templates 2.3 (new types and revisions in Qt 5.10)
- qmlRegisterType<QQuickAbstractButton, 3>(uri, 2, 3, "AbstractButton");
- qmlRegisterType<QQuickAction>(uri, 2, 3, "Action");
- qmlRegisterType<QQuickActionGroup>(uri, 2, 3, "ActionGroup");
- qmlRegisterType<QQuickApplicationWindow, 3>(uri, 2, 3, "ApplicationWindow");
- qmlRegisterType<QQuickButtonGroup, 3>(uri, 2, 3, "ButtonGroup");
- qmlRegisterType<QQuickControl, 3>(uri, 2, 3, "Control");
- qmlRegisterType<QQuickContainer, 3>(uri, 2, 3, "Container");
- qmlRegisterType<QQuickDialog, 3>(uri, 2, 3, "Dialog");
- qmlRegisterType<QQuickDialogButtonBox, 3>(uri, 2, 3, "DialogButtonBox");
- qmlRegisterAnonymousType<QQuickIcon>(uri, 2);
- qRegisterMetaType<QQuickIcon>();
- qmlRegisterType<QQuickLabel, 3>(uri, 2, 3, "Label");
- qmlRegisterType<QQuickMenu, 3>(uri, 2, 3, "Menu");
- qmlRegisterType<QQuickMenuBar>(uri, 2, 3, "MenuBar");
- qmlRegisterType<QQuickMenuBarItem>(uri, 2, 3, "MenuBarItem");
- qmlRegisterType<QQuickMenuItem, 3>(uri, 2, 3, "MenuItem");
- qmlRegisterUncreatableType<QQuickOverlay>(uri, 2, 3, "Overlay", QStringLiteral("Overlay is only available as an attached property."));
- qmlRegisterAnonymousType<QQuickOverlayAttached>(uri, 2);
- qmlRegisterType<QQuickPopup, 3>(uri, 2, 3, "Popup");
- qmlRegisterType<QQuickRangeSlider, 3>(uri, 2, 3, "RangeSlider");
- qmlRegisterType<QQuickScrollBar, 3>(uri, 2, 3, "ScrollBar");
- qmlRegisterType<QQuickScrollIndicator, 3>(uri, 2, 3, "ScrollIndicator");
- qmlRegisterType<QQuickSlider, 3>(uri, 2, 3, "Slider");
- qmlRegisterType<QQuickSpinBox, 3>(uri, 2, 3, "SpinBox");
- qmlRegisterType<QQuickTextArea, 3>(uri, 2, 3, "TextArea");
- qmlRegisterType<QQuickTextField, 3>(uri, 2, 3, "TextField");
-
- // NOTE: register the latest revisions of all template/control base classes to
- // make revisioned properties available to their subclasses (synced with Qt 5.10)
- qmlRegisterRevision<QQuickText, 10>(uri, 2, 3);
- qmlRegisterRevision<QQuickTextEdit, 10>(uri, 2, 3);
- // For backward compatibility
- qmlRegisterType<QQuickColorGroup, 13>(uri, 2, 13, "ColorGroup");
- qmlRegisterType<QQuickPalette, 13>(uri, 2, 13, "Palette");
-
- // QtQuick.Templates 2.4 (new types and revisions in Qt 5.11)
- qmlRegisterType<QQuickAbstractButton, 4>(uri, 2, 4, "AbstractButton");
- qmlRegisterType<QQuickButtonGroup, 4>(uri, 2, 4, "ButtonGroup");
- qmlRegisterType<QQuickCheckBox, 4>(uri, 2, 4, "CheckBox");
- qmlRegisterType<QQuickCheckDelegate, 4>(uri, 2, 4, "CheckDelegate");
- qmlRegisterType<QQuickScrollBar, 4>(uri, 2, 4, "ScrollBar");
- qmlRegisterType<QQuickScrollIndicator, 4>(uri, 2, 4, "ScrollIndicator");
- qmlRegisterType<QQuickSpinBox, 4>(uri, 2, 4, "SpinBox");
-
- // QtQuick.Templates 2.5 (new types and revisions in Qt 5.12)
- qmlRegisterType<QQuickAbstractButton, 5>(uri, 2, 5, "AbstractButton");
- qmlRegisterType<QQuickDialogButtonBox, 5>(uri, 2, 5, "DialogButtonBox");
- qmlRegisterType<QQuickComboBox, 5>(uri, 2, 5, "ComboBox");
- qmlRegisterType<QQuickControl, 5>(uri, 2, 5, "Control");
- qmlRegisterType<QQuickContainer, 5>(uri, 2, 5, "Container");
- qmlRegisterType<QQuickDial, 5>(uri, 2, 5, "Dial");
- qmlRegisterType<QQuickDialog, 5>(uri, 2, 5, "Dialog");
- qmlRegisterType<QQuickGroupBox, 5>(uri, 2, 5, "GroupBox");
- qmlRegisterType<QQuickLabel, 5>(uri, 2, 5, "Label");
- qmlRegisterType<QQuickPage, 5>(uri, 2, 5, "Page");
- qmlRegisterType<QQuickPopup, 5>(uri, 2, 5, "Popup");
- qmlRegisterAnonymousType<QQuickPopupAnchors>(uri, 2);
- qmlRegisterType<QQuickRangeSlider, 5>(uri, 2, 5, "RangeSlider");
- qmlRegisterType<QQuickSlider, 5>(uri, 2, 5, "Slider");
- qmlRegisterType<QQuickSpinBox, 5>(uri, 2, 5, "SpinBox");
- qmlRegisterType<QQuickTextArea, 5>(uri, 2, 5, "TextArea");
- qmlRegisterType<QQuickTextField, 5>(uri, 2, 5, "TextField");
- qmlRegisterType<QQuickToolTip, 5>(uri, 2, 5, "ToolTip");
-
- // QtQuick.Templates 2.13 (new types and revisions in Qt 5.13)
- qmlRegisterType<QQuickSplitView>(uri, 2, 13, "SplitView");
- qmlRegisterAnonymousType<QQuickSplitViewAttached>(uri, 2);
- qmlRegisterUncreatableType<QQuickSplitHandleAttached>(uri, 2, 13, "SplitHandle",
- QStringLiteral("SplitHandle is only available as an attached property."));
- qmlRegisterAnonymousType<QQuickSplitHandleAttached>(uri, 2);
-
- // QtQuick.Templates 2.14 (new types and revisions in Qt 5.14)
- qmlRegisterType<QQuickComboBox, 14>(uri, 2, 14, "ComboBox");
-
- // QtQuick.Templates 2.15 (new types and revisions in Qt 5.15)
- qmlRegisterType<QQuickComboBox, 15>(uri, 2, 15, "ComboBox");
- // Register QQuickTableView here to expose headerView's base, with a irregular type name to 'hide' it.
- qmlRegisterType<QQuickTableView, 15>(uri, 2, 15, "__TableView__");
- qmlRegisterType<QQuickHorizontalHeaderView>(uri, 2, 15, "HorizontalHeaderView");
- qmlRegisterType<QQuickVerticalHeaderView>(uri, 2, 15, "VerticalHeaderView");
}
void QtQuickTemplates2Plugin::unregisterTypes()
diff --git a/src/imports/templates/templates.pro b/src/imports/templates/templates.pro
index 3447ef90..72e32c47 100644
--- a/src/imports/templates/templates.pro
+++ b/src/imports/templates/templates.pro
@@ -1,6 +1,6 @@
TARGET = qtquicktemplates2plugin
-TARGETPATH = QtQuick/Templates.2
-IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+TARGETPATH = QtQuick/Templates
+IMPORT_VERSION = 2.15
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index 6e1f17b1..836eb2f4 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -378,7 +378,7 @@ QStringList QQuickStylePrivate::stylePaths(bool resolve)
paths += envPathList("QT_QUICK_CONTROLS_STYLE_PATH");
// built-in import paths
- const QString targetPath = QStringLiteral("QtQuick/Controls.2");
+ const QString targetPath = QStringLiteral("QtQuick/Controls");
const QStringList importPaths = defaultImportPathList();
for (const QString &importPath : importPaths) {
QDir dir(importPath);
@@ -648,7 +648,7 @@ QStringList QQuickStyle::availableStyles()
Returns the list of directories where Qt Quick Controls 2 searches for available styles.
By default, the list contains paths specified in the \c QT_QUICK_CONTROLS_STYLE_PATH
- environment variable, and any existing \c QtQuick/Controls.2 sub-directories in
+ environment variable, and any existing \c QtQuick/Controls sub-directories in
\l QQmlEngine::importPathList().
\sa addStylePath(), availableStyles()
diff --git a/src/quickcontrols2/qquickstyle_p.h b/src/quickcontrols2/qquickstyle_p.h
index 205a4a11..7c837423 100644
--- a/src/quickcontrols2/qquickstyle_p.h
+++ b/src/quickcontrols2/qquickstyle_p.h
@@ -50,13 +50,13 @@
#include <QtCore/qurl.h>
#include <QtCore/qsharedpointer.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2/qtquickcontrols2global.h>
QT_BEGIN_NAMESPACE
class QSettings;
-class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickStylePrivate
+class Q_QUICKCONTROLS2_EXPORT QQuickStylePrivate
{
public:
static QStringList stylePaths(bool resolve = false);
diff --git a/src/quickcontrols2/qquickstyleplugin.cpp b/src/quickcontrols2/qquickstyleplugin.cpp
index b387b378..18f0d485 100644
--- a/src/quickcontrols2/qquickstyleplugin.cpp
+++ b/src/quickcontrols2/qquickstyleplugin.cpp
@@ -34,9 +34,8 @@
**
****************************************************************************/
-#include "qquickstyleplugin_p.h"
-#include "qquickstyle.h"
#include "qquickstyle_p.h"
+#include "qquickstyleplugin_p.h"
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlfile.h>
diff --git a/src/quickcontrols2/qquickstyleplugin_p.h b/src/quickcontrols2/qquickstyleplugin_p.h
index f5c5705c..7ae129d9 100644
--- a/src/quickcontrols2/qquickstyleplugin_p.h
+++ b/src/quickcontrols2/qquickstyleplugin_p.h
@@ -49,13 +49,13 @@
//
#include <QtQml/qqmlextensionplugin.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2/qtquickcontrols2global.h>
QT_BEGIN_NAMESPACE
class QQuickTheme;
-class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickStylePlugin : public QQmlExtensionPlugin
+class Q_QUICKCONTROLS2_EXPORT QQuickStylePlugin : public QQmlExtensionPlugin
{
Q_OBJECT
diff --git a/src/quickcontrols2/quickcontrols2.pro b/src/quickcontrols2/quickcontrols2.pro
index 5a11dcd2..8c2f9cba 100644
--- a/src/quickcontrols2/quickcontrols2.pro
+++ b/src/quickcontrols2/quickcontrols2.pro
@@ -8,12 +8,16 @@ DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
HEADERS += \
$$PWD/qtquickcontrols2global.h \
- $$PWD/qtquickcontrols2global_p.h
+ $$PWD/qquickstyle.h \
+ $$PWD/qquickstyle_p.h \
+ $$PWD/qquickstyleplugin_p.h
-include(quickcontrols2.pri)
+SOURCES += \
+ $$PWD/qquickstyle.cpp \
+ $$PWD/qquickstyleplugin.cpp
QMLTYPES_FILENAME = plugins.qmltypes
-QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Controls.2
+QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Controls
QML_IMPORT_NAME = QtQuick.Controls
QML_IMPORT_VERSION = 2.15
CONFIG += qmltypes install_qmltypes install_metatypes
diff --git a/src/quickcontrols2/qquickanimatednode.cpp b/src/quickcontrols2impl/qquickanimatednode.cpp
index b4e665de..b4e665de 100644
--- a/src/quickcontrols2/qquickanimatednode.cpp
+++ b/src/quickcontrols2impl/qquickanimatednode.cpp
diff --git a/src/quickcontrols2/qquickanimatednode_p.h b/src/quickcontrols2impl/qquickanimatednode_p.h
index d42d9319..e403f0bf 100644
--- a/src/quickcontrols2/qquickanimatednode_p.h
+++ b/src/quickcontrols2impl/qquickanimatednode_p.h
@@ -50,7 +50,7 @@
#include <QtQuick/qsgnode.h>
#include <QtCore/qelapsedtimer.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quickcontrols2/qquickattachedobject.cpp b/src/quickcontrols2impl/qquickattachedobject.cpp
index 722f22f9..722f22f9 100644
--- a/src/quickcontrols2/qquickattachedobject.cpp
+++ b/src/quickcontrols2impl/qquickattachedobject.cpp
diff --git a/src/quickcontrols2/qquickattachedobject_p.h b/src/quickcontrols2impl/qquickattachedobject_p.h
index 1e90c082..cd2404c2 100644
--- a/src/quickcontrols2/qquickattachedobject_p.h
+++ b/src/quickcontrols2impl/qquickattachedobject_p.h
@@ -50,7 +50,7 @@
#include <QtQml/qqml.h>
#include <QtCore/qobject.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quickcontrols2/qquickchecklabel.cpp b/src/quickcontrols2impl/qquickchecklabel.cpp
index dccbf77f..dccbf77f 100644
--- a/src/quickcontrols2/qquickchecklabel.cpp
+++ b/src/quickcontrols2impl/qquickchecklabel.cpp
diff --git a/src/quickcontrols2/qquickchecklabel_p.h b/src/quickcontrols2impl/qquickchecklabel_p.h
index 100ef48f..823ce9df 100644
--- a/src/quickcontrols2/qquickchecklabel_p.h
+++ b/src/quickcontrols2impl/qquickchecklabel_p.h
@@ -49,18 +49,28 @@
//
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickCheckLabel : public QQuickText
{
Q_OBJECT
+ QML_NAMED_ELEMENT(CheckLabel)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickCheckLabel(QQuickItem *parent = nullptr);
};
+struct QQuickTextForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickText)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickCheckLabel)
diff --git a/src/quickcontrols2/qquickclippedtext.cpp b/src/quickcontrols2impl/qquickclippedtext.cpp
index 862197f3..862197f3 100644
--- a/src/quickcontrols2/qquickclippedtext.cpp
+++ b/src/quickcontrols2impl/qquickclippedtext.cpp
diff --git a/src/quickcontrols2/qquickclippedtext_p.h b/src/quickcontrols2impl/qquickclippedtext_p.h
index 486ac7c4..f3b011fd 100644
--- a/src/quickcontrols2/qquickclippedtext_p.h
+++ b/src/quickcontrols2impl/qquickclippedtext_p.h
@@ -49,7 +49,7 @@
//
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -60,6 +60,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickClippedText : public QQuickText
Q_PROPERTY(qreal clipY READ clipY WRITE setClipY FINAL)
Q_PROPERTY(qreal clipWidth READ clipWidth WRITE setClipWidth FINAL)
Q_PROPERTY(qreal clipHeight READ clipHeight WRITE setClipHeight FINAL)
+ QML_NAMED_ELEMENT(ClippedText)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickClippedText(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquickcolor.cpp b/src/quickcontrols2impl/qquickcolor.cpp
index 8ae568fc..8ae568fc 100644
--- a/src/quickcontrols2/qquickcolor.cpp
+++ b/src/quickcontrols2impl/qquickcolor.cpp
diff --git a/src/quickcontrols2/qquickcolor_p.h b/src/quickcontrols2impl/qquickcolor_p.h
index 657a9fa4..cd69d0d8 100644
--- a/src/quickcontrols2/qquickcolor_p.h
+++ b/src/quickcontrols2impl/qquickcolor_p.h
@@ -50,13 +50,17 @@
#include <QtCore/qobject.h>
#include <QtGui/qcolor.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQml/qqml.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickColor : public QObject
{
Q_OBJECT
+ QML_NAMED_ELEMENT(Color)
+ QML_SINGLETON
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickColor(QObject *parent = nullptr);
diff --git a/src/quickcontrols2/qquickcolorimage.cpp b/src/quickcontrols2impl/qquickcolorimage.cpp
index 3afcef7e..3afcef7e 100644
--- a/src/quickcontrols2/qquickcolorimage.cpp
+++ b/src/quickcontrols2impl/qquickcolorimage.cpp
diff --git a/src/quickcontrols2/qquickcolorimage_p.h b/src/quickcontrols2impl/qquickcolorimage_p.h
index 8227d068..faa2e42c 100644
--- a/src/quickcontrols2/qquickcolorimage_p.h
+++ b/src/quickcontrols2impl/qquickcolorimage_p.h
@@ -50,7 +50,7 @@
#include <QtGui/qcolor.h>
#include <QtQuick/private/qquickimage_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -59,6 +59,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickColorImage : public QQuickImage
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor NOTIFY colorChanged FINAL)
Q_PROPERTY(QColor defaultColor READ defaultColor WRITE setDefaultColor RESET resetDefaultColor NOTIFY defaultColorChanged FINAL)
+ QML_NAMED_ELEMENT(ColorImage)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickColorImage(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquickiconimage.cpp b/src/quickcontrols2impl/qquickiconimage.cpp
index 1fc3abfc..1fc3abfc 100644
--- a/src/quickcontrols2/qquickiconimage.cpp
+++ b/src/quickcontrols2impl/qquickiconimage.cpp
diff --git a/src/quickcontrols2/qquickiconimage_p.h b/src/quickcontrols2impl/qquickiconimage_p.h
index 0aac08e6..37891476 100644
--- a/src/quickcontrols2/qquickiconimage_p.h
+++ b/src/quickcontrols2impl/qquickiconimage_p.h
@@ -49,7 +49,7 @@
//
#include <QtQuick/private/qquickimage_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -60,6 +60,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickIconImage : public QQuickImage
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged FINAL)
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
+ QML_NAMED_ELEMENT(IconImage)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickIconImage(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquickiconimage_p_p.h b/src/quickcontrols2impl/qquickiconimage_p_p.h
index 0c755ff6..cec5956a 100644
--- a/src/quickcontrols2/qquickiconimage_p_p.h
+++ b/src/quickcontrols2impl/qquickiconimage_p_p.h
@@ -49,7 +49,7 @@
//
#include <QtQuick/private/qquickimage_p_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
#include <QtGui/private/qiconloader_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quickcontrols2/qquickiconlabel.cpp b/src/quickcontrols2impl/qquickiconlabel.cpp
index d76da28f..d76da28f 100644
--- a/src/quickcontrols2/qquickiconlabel.cpp
+++ b/src/quickcontrols2impl/qquickiconlabel.cpp
diff --git a/src/quickcontrols2/qquickiconlabel_p.h b/src/quickcontrols2impl/qquickiconlabel_p.h
index ecf2336e..1ea0affb 100644
--- a/src/quickcontrols2/qquickiconlabel_p.h
+++ b/src/quickcontrols2impl/qquickiconlabel_p.h
@@ -49,7 +49,7 @@
//
#include <QtQuick/qquickitem.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
#include <QtQuickTemplates2/private/qquickicon_p.h>
QT_BEGIN_NAMESPACE
@@ -71,6 +71,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickIconLabel : public QQuickItem
Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding FINAL)
Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding FINAL)
Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding FINAL)
+ QML_NAMED_ELEMENT(IconLabel)
+ QML_ADDED_IN_VERSION(2, 3)
public:
enum Display {
diff --git a/src/quickcontrols2/qquickiconlabel_p_p.h b/src/quickcontrols2impl/qquickiconlabel_p_p.h
index 6a2a0f58..18cefe53 100644
--- a/src/quickcontrols2/qquickiconlabel_p_p.h
+++ b/src/quickcontrols2impl/qquickiconlabel_p_p.h
@@ -49,8 +49,8 @@
//
#include <QtQuick/private/qquickitem_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
-#include <QtQuickControls2/private/qquickiconlabel_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
+#include <QtQuickControls2Impl/private/qquickiconlabel_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quickcontrols2/qquickitemgroup.cpp b/src/quickcontrols2impl/qquickitemgroup.cpp
index c4307001..c4307001 100644
--- a/src/quickcontrols2/qquickitemgroup.cpp
+++ b/src/quickcontrols2impl/qquickitemgroup.cpp
diff --git a/src/quickcontrols2/qquickitemgroup_p.h b/src/quickcontrols2impl/qquickitemgroup_p.h
index ab6306b4..9c04a990 100644
--- a/src/quickcontrols2/qquickitemgroup_p.h
+++ b/src/quickcontrols2impl/qquickitemgroup_p.h
@@ -50,13 +50,15 @@
#include <QtQuick/private/qquickimplicitsizeitem_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickItemGroup : public QQuickImplicitSizeItem, protected QQuickItemChangeListener
{
Q_OBJECT
+ QML_NAMED_ELEMENT(ItemGroup)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickItemGroup(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquickmnemoniclabel.cpp b/src/quickcontrols2impl/qquickmnemoniclabel.cpp
index 309d076a..309d076a 100644
--- a/src/quickcontrols2/qquickmnemoniclabel.cpp
+++ b/src/quickcontrols2impl/qquickmnemoniclabel.cpp
diff --git a/src/quickcontrols2/qquickmnemoniclabel_p.h b/src/quickcontrols2impl/qquickmnemoniclabel_p.h
index da5a83db..69ddbfb1 100644
--- a/src/quickcontrols2/qquickmnemoniclabel_p.h
+++ b/src/quickcontrols2impl/qquickmnemoniclabel_p.h
@@ -49,7 +49,7 @@
//
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -58,6 +58,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickMnemonicLabel : public QQuickText
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText FINAL)
Q_PROPERTY(bool mnemonicVisible READ isMnemonicVisible WRITE setMnemonicVisible FINAL)
+ QML_NAMED_ELEMENT(MnemonicLabel)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickMnemonicLabel(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquickpaddedrectangle.cpp b/src/quickcontrols2impl/qquickpaddedrectangle.cpp
index fd9e9d90..fd9e9d90 100644
--- a/src/quickcontrols2/qquickpaddedrectangle.cpp
+++ b/src/quickcontrols2impl/qquickpaddedrectangle.cpp
diff --git a/src/quickcontrols2/qquickpaddedrectangle_p.h b/src/quickcontrols2impl/qquickpaddedrectangle_p.h
index c2e0ddef..27743270 100644
--- a/src/quickcontrols2/qquickpaddedrectangle_p.h
+++ b/src/quickcontrols2impl/qquickpaddedrectangle_p.h
@@ -49,7 +49,7 @@
//
#include <QtQuick/private/qquickrectangle_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -61,6 +61,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickPaddedRectangle : public QQuickRecta
Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged FINAL)
Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged FINAL)
Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged FINAL)
+ QML_NAMED_ELEMENT(PaddedRectangle)
+ QML_ADDED_IN_VERSION(2, 0)
public:
QQuickPaddedRectangle(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquickplaceholdertext.cpp b/src/quickcontrols2impl/qquickplaceholdertext.cpp
index 2fe6be07..2fe6be07 100644
--- a/src/quickcontrols2/qquickplaceholdertext.cpp
+++ b/src/quickcontrols2impl/qquickplaceholdertext.cpp
diff --git a/src/quickcontrols2/qquickplaceholdertext_p.h b/src/quickcontrols2impl/qquickplaceholdertext_p.h
index 1e49286c..0beccd72 100644
--- a/src/quickcontrols2/qquickplaceholdertext_p.h
+++ b/src/quickcontrols2impl/qquickplaceholdertext_p.h
@@ -49,13 +49,15 @@
//
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickPlaceholderText : public QQuickText
{
Q_OBJECT
+ QML_NAMED_ELEMENT(PlaceholderText)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickPlaceholderText(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2/qquicktumblerview.cpp b/src/quickcontrols2impl/qquicktumblerview.cpp
index 911e2ae8..911e2ae8 100644
--- a/src/quickcontrols2/qquicktumblerview.cpp
+++ b/src/quickcontrols2impl/qquicktumblerview.cpp
diff --git a/src/quickcontrols2/qquicktumblerview_p.h b/src/quickcontrols2impl/qquicktumblerview_p.h
index 4e67e69b..44ce5fa6 100644
--- a/src/quickcontrols2/qquicktumblerview_p.h
+++ b/src/quickcontrols2impl/qquicktumblerview_p.h
@@ -49,7 +49,7 @@
//
#include <QQuickItem>
-#include <QtQuickControls2/private/qtquickcontrols2global_p.h>
+#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -65,6 +65,8 @@ class Q_QUICKCONTROLS2_PRIVATE_EXPORT QQuickTumblerView : public QQuickItem
Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged)
+ QML_NAMED_ELEMENT(TumblerView)
+ QML_ADDED_IN_VERSION(2, 1)
public:
QQuickTumblerView(QQuickItem *parent = nullptr);
diff --git a/src/quickcontrols2impl/qtquickcontrols2foreign_p.h b/src/quickcontrols2impl/qtquickcontrols2foreign_p.h
new file mode 100644
index 00000000..6285e43c
--- /dev/null
+++ b/src/quickcontrols2impl/qtquickcontrols2foreign_p.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** 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/qqml.h>
+#include <QtQuickTemplates2/private/qquickoverlay_p.h>
+#include <QtQuickTemplates2/private/qquicksplitview_p.h>
+
+QT_BEGIN_NAMESPACE
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+// These are necessary in order to use C++ types in a file where only QtQuick.Controls has been imported.
+// Control types like Button don't need this done for them, as each style module provides a Button type,
+// and QtQuick.Controls is a sort of alias for the active style import.
+
+struct QQuickOverlayAttachedForeign
+{
+ Q_GADGET
+ QML_NAMED_ELEMENT(Overlay)
+ QML_FOREIGN(QQuickOverlay)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
+struct QQuickSplitHandleAttachedForeign
+{
+ Q_GADGET
+ QML_NAMED_ELEMENT(SplitHandle)
+ QML_FOREIGN(QQuickSplitHandleAttached)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 13)
+};
+
+QT_END_NAMESPACE
diff --git a/src/quickcontrols2impl/qtquickcontrols2implglobal_p.h b/src/quickcontrols2impl/qtquickcontrols2implglobal_p.h
new file mode 100644
index 00000000..9ff27a3b
--- /dev/null
+++ b/src/quickcontrols2impl/qtquickcontrols2implglobal_p.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QTQUICKCONTROLS2IMPLGLOBAL_H
+#define QTQUICKCONTROLS2IMPLGLOBAL_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+#ifndef QT_STATIC
+# if defined(QT_BUILD_QUICKCONTROLS2IMPL_LIB)
+# define Q_QUICKCONTROLS2IMPL_EXPORT Q_DECL_EXPORT
+# else
+# define Q_QUICKCONTROLS2IMPL_EXPORT Q_DECL_IMPORT
+# endif
+#else
+# define Q_QUICKCONTROLS2IMPL_EXPORT
+#endif
+
+#define Q_QUICKCONTROLS2_PRIVATE_EXPORT Q_QUICKCONTROLS2IMPL_EXPORT
+
+Q_QUICKCONTROLS2_PRIVATE_EXPORT void qml_register_types_QtQuick_Controls_impl();
+
+#endif // QTQUICKCONTROLS2IMPLGLOBAL_H
diff --git a/src/quickcontrols2/quickcontrols2.pri b/src/quickcontrols2impl/quickcontrols2impl.pro
index 2c28038f..7a7d2862 100644
--- a/src/quickcontrols2/quickcontrols2.pri
+++ b/src/quickcontrols2impl/quickcontrols2impl.pro
@@ -1,4 +1,13 @@
+TARGET = QtQuickControls2Impl
+MODULE = quickcontrols2impl
+
+QT += quick
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+
HEADERS += \
+ $$PWD/qtquickcontrols2implglobal_p.h \
$$PWD/qquickanimatednode_p.h \
$$PWD/qquickattachedobject_p.h \
$$PWD/qquickchecklabel_p.h \
@@ -13,9 +22,7 @@ HEADERS += \
$$PWD/qquickmnemoniclabel_p.h \
$$PWD/qquickpaddedrectangle_p.h \
$$PWD/qquickplaceholdertext_p.h \
- $$PWD/qquickstyle.h \
- $$PWD/qquickstyle_p.h \
- $$PWD/qquickstyleplugin_p.h
+ $$PWD/qtquickcontrols2foreign_p.h
SOURCES += \
$$PWD/qquickanimatednode.cpp \
@@ -29,9 +36,7 @@ SOURCES += \
$$PWD/qquickitemgroup.cpp \
$$PWD/qquickmnemoniclabel.cpp \
$$PWD/qquickpaddedrectangle.cpp \
- $$PWD/qquickplaceholdertext.cpp \
- $$PWD/qquickstyle.cpp \
- $$PWD/qquickstyleplugin.cpp
+ $$PWD/qquickplaceholdertext.cpp
qtConfig(quick-listview):qtConfig(quick-pathview) {
HEADERS += \
@@ -39,3 +44,11 @@ qtConfig(quick-listview):qtConfig(quick-pathview) {
SOURCES += \
$$PWD/qquicktumblerview.cpp
}
+
+QMLTYPES_FILENAME = plugins.qmltypes
+QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Controls/impl
+QML_IMPORT_NAME = QtQuick.Controls.impl
+QML_IMPORT_VERSION = 2.15
+CONFIG += qmltypes install_qmltypes install_metatypes
+
+load(qt_module)
diff --git a/src/quicktemplates2/qquickabstractbutton_p.h b/src/quicktemplates2/qquickabstractbutton_p.h
index 0fa48980..a5dbd733 100644
--- a/src/quicktemplates2/qquickabstractbutton_p.h
+++ b/src/quicktemplates2/qquickabstractbutton_p.h
@@ -68,18 +68,20 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAbstractButton : public QQuickContr
Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL)
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 3)
- Q_PROPERTY(Display display READ display WRITE setDisplay NOTIFY displayChanged FINAL REVISION 3)
- Q_PROPERTY(QQuickAction *action READ action WRITE setAction NOTIFY actionChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(Display display READ display WRITE setDisplay NOTIFY displayChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQuickAction *action READ action WRITE setAction NOTIFY actionChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay NOTIFY autoRepeatDelayChanged FINAL REVISION 4)
- Q_PROPERTY(int autoRepeatInterval READ autoRepeatInterval WRITE setAutoRepeatInterval NOTIFY autoRepeatIntervalChanged FINAL REVISION 4)
- Q_PROPERTY(qreal pressX READ pressX NOTIFY pressXChanged FINAL REVISION 4)
- Q_PROPERTY(qreal pressY READ pressY NOTIFY pressYChanged FINAL REVISION 4)
+ Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay NOTIFY autoRepeatDelayChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(int autoRepeatInterval READ autoRepeatInterval WRITE setAutoRepeatInterval NOTIFY autoRepeatIntervalChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal pressX READ pressX NOTIFY pressXChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal pressY READ pressY NOTIFY pressYChanged FINAL REVISION(2, 4))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,indicator")
+ QML_NAMED_ELEMENT(AbstractButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickAbstractButton(QQuickItem *parent = nullptr);
@@ -167,19 +169,19 @@ Q_SIGNALS:
void autoRepeatChanged();
void indicatorChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void toggled();
+ Q_REVISION(2, 2) void toggled();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void iconChanged();
- Q_REVISION(3) void displayChanged();
- Q_REVISION(3) void actionChanged();
+ Q_REVISION(2, 3) void iconChanged();
+ Q_REVISION(2, 3) void displayChanged();
+ Q_REVISION(2, 3) void actionChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void autoRepeatDelayChanged();
- Q_REVISION(4) void autoRepeatIntervalChanged();
- Q_REVISION(4) void pressXChanged();
- Q_REVISION(4) void pressYChanged();
+ Q_REVISION(2, 4) void autoRepeatDelayChanged();
+ Q_REVISION(2, 4) void autoRepeatIntervalChanged();
+ Q_REVISION(2, 4) void pressXChanged();
+ Q_REVISION(2, 4) void pressYChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitIndicatorWidthChanged();
- Q_REVISION(5) void implicitIndicatorHeightChanged();
+ Q_REVISION(2, 5) void implicitIndicatorWidthChanged();
+ Q_REVISION(2, 5) void implicitIndicatorHeightChanged();
protected:
QQuickAbstractButton(QQuickAbstractButtonPrivate &dd, QQuickItem *parent);
diff --git a/src/quicktemplates2/qquickaction_p.h b/src/quicktemplates2/qquickaction_p.h
index cbe0d8fe..f600d89e 100644
--- a/src/quicktemplates2/qquickaction_p.h
+++ b/src/quicktemplates2/qquickaction_p.h
@@ -69,6 +69,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickAction : public QObject
#if QT_CONFIG(shortcut)
Q_PRIVATE_PROPERTY(QQuickAction::d_func(), QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
#endif
+ QML_NAMED_ELEMENT(Action)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickAction(QObject *parent = nullptr);
diff --git a/src/quicktemplates2/qquickactiongroup_p.h b/src/quicktemplates2/qquickactiongroup_p.h
index aa04d32e..d905f595 100644
--- a/src/quicktemplates2/qquickactiongroup_p.h
+++ b/src/quicktemplates2/qquickactiongroup_p.h
@@ -67,6 +67,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickActionGroup : public QObject
Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
Q_CLASSINFO("DefaultProperty", "actions")
+ QML_NAMED_ELEMENT(ActionGroup)
+ QML_ATTACHED(QQuickActionGroupAttached)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickActionGroup(QObject *parent = nullptr);
diff --git a/src/quicktemplates2/qquickapplicationwindow_p.h b/src/quicktemplates2/qquickapplicationwindow_p.h
index 9c0292ed..4e4f50ef 100644
--- a/src/quicktemplates2/qquickapplicationwindow_p.h
+++ b/src/quicktemplates2/qquickapplicationwindow_p.h
@@ -72,11 +72,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickApplicationWindow : public QQuickWi
Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL)
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION(2, 3))
// 2.14 (Qt 6)
- Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION 3)
+ Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3))
Q_CLASSINFO("DeferredPropertyNames", "background")
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(ApplicationWindow)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickApplicationWindow(QWindow *parent = nullptr);
@@ -115,7 +117,7 @@ Q_SIGNALS:
void footerChanged();
void fontChanged();
void localeChanged();
- Q_REVISION(3) void menuBarChanged();
+ Q_REVISION(2, 3) void menuBarChanged();
protected:
bool isComponentComplete() const;
@@ -137,7 +139,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickApplicationWindowAttached : public
Q_PROPERTY(QQuickItem *activeFocusControl READ activeFocusControl NOTIFY activeFocusControlChanged FINAL)
Q_PROPERTY(QQuickItem *header READ header NOTIFY headerChanged FINAL)
Q_PROPERTY(QQuickItem *footer READ footer NOTIFY footerChanged FINAL)
- Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION 3
+ Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION(2, 3)
public:
explicit QQuickApplicationWindowAttached(QObject *parent = nullptr);
@@ -156,13 +158,37 @@ Q_SIGNALS:
void headerChanged();
void footerChanged();
// 2.3 (Qt 5.10)
- /*Q_REVISION(3)*/ void menuBarChanged();
+ /*Q_REVISION(2, 3)*/ void menuBarChanged();
private:
Q_DISABLE_COPY(QQuickApplicationWindowAttached)
Q_DECLARE_PRIVATE(QQuickApplicationWindowAttached)
};
+struct QWindowForeign2
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QWindow)
+ QML_ADDED_IN_VERSION(2, 0)
+};
+
+struct QQuickWindowForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickWindow)
+ QML_ADDED_IN_VERSION(2, 0)
+};
+
+struct QQuickWindowQmlImplForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickWindowQmlImpl)
+ QML_ADDED_IN_VERSION(2, 2)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickApplicationWindow)
diff --git a/src/quicktemplates2/qquickbusyindicator_p.h b/src/quicktemplates2/qquickbusyindicator_p.h
index f140764b..bdb2eb24 100644
--- a/src/quicktemplates2/qquickbusyindicator_p.h
+++ b/src/quicktemplates2/qquickbusyindicator_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickBusyIndicator : public QQuickContro
{
Q_OBJECT
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged FINAL)
+ QML_NAMED_ELEMENT(BusyIndicator)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickBusyIndicator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickbutton_p.h b/src/quicktemplates2/qquickbutton_p.h
index 2a757952..bfac5663 100644
--- a/src/quicktemplates2/qquickbutton_p.h
+++ b/src/quicktemplates2/qquickbutton_p.h
@@ -59,6 +59,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButton : public QQuickAbstractButto
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL)
+ QML_NAMED_ELEMENT(Button)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickbuttongroup_p.h b/src/quicktemplates2/qquickbuttongroup_p.h
index 84ddd225..daff84f2 100644
--- a/src/quicktemplates2/qquickbuttongroup_p.h
+++ b/src/quicktemplates2/qquickbuttongroup_p.h
@@ -66,10 +66,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButtonGroup : public QObject, publi
Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged FINAL)
Q_PROPERTY(QQmlListProperty<QQuickAbstractButton> buttons READ buttons NOTIFY buttonsChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION 3)
+ Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL REVISION 4)
+ Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL REVISION(2, 4))
Q_INTERFACES(QQmlParserStatus)
+ QML_NAMED_ELEMENT(ButtonGroup)
+ QML_ATTACHED(QQuickButtonGroupAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickButtonGroup(QObject *parent = nullptr);
@@ -97,11 +100,11 @@ Q_SIGNALS:
void checkedButtonChanged();
void buttonsChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void clicked(QQuickAbstractButton *button);
+ Q_REVISION(2, 1) void clicked(QQuickAbstractButton *button);
// 2.3 (Qt 5.10)
- Q_REVISION(3) void exclusiveChanged();
+ Q_REVISION(2, 3) void exclusiveChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void checkStateChanged();
+ Q_REVISION(2, 4) void checkStateChanged();
protected:
void classBegin() override;
diff --git a/src/quicktemplates2/qquickcheckbox_p.h b/src/quicktemplates2/qquickcheckbox_p.h
index 1e333d7c..8e53b41d 100644
--- a/src/quicktemplates2/qquickcheckbox_p.h
+++ b/src/quicktemplates2/qquickcheckbox_p.h
@@ -60,7 +60,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickCheckBox : public QQuickAbstractBut
Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL)
Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
// 2.4 (Qt 5.11)
- Q_PRIVATE_PROPERTY(QQuickCheckBox::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION 4)
+ Q_PRIVATE_PROPERTY(QQuickCheckBox::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(CheckBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickCheckBox(QQuickItem *parent = nullptr);
@@ -75,7 +77,7 @@ Q_SIGNALS:
void tristateChanged();
void checkStateChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void nextCheckStateChanged();
+ Q_REVISION(2, 4) void nextCheckStateChanged();
protected:
QFont defaultFont() const override;
diff --git a/src/quicktemplates2/qquickcheckdelegate_p.h b/src/quicktemplates2/qquickcheckdelegate_p.h
index 67dcf706..9b69943f 100644
--- a/src/quicktemplates2/qquickcheckdelegate_p.h
+++ b/src/quicktemplates2/qquickcheckdelegate_p.h
@@ -60,7 +60,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickCheckDelegate : public QQuickItemDe
Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL)
Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
// 2.4 (Qt 5.11)
- Q_PRIVATE_PROPERTY(QQuickCheckDelegate::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION 4)
+ Q_PRIVATE_PROPERTY(QQuickCheckDelegate::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(CheckDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickCheckDelegate(QQuickItem *parent = nullptr);
@@ -75,7 +77,7 @@ Q_SIGNALS:
void tristateChanged();
void checkStateChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void nextCheckStateChanged();
+ Q_REVISION(2, 4) void nextCheckStateChanged();
protected:
QFont defaultFont() const override;
diff --git a/src/quicktemplates2/qquickcombobox_p.h b/src/quicktemplates2/qquickcombobox_p.h
index 18c1275c..4ad8279e 100644
--- a/src/quicktemplates2/qquickcombobox_p.h
+++ b/src/quicktemplates2/qquickcombobox_p.h
@@ -76,27 +76,29 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickComboBox : public QQuickControl
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
Q_PROPERTY(QQuickPopup *popup READ popup WRITE setPopup NOTIFY popupChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION 1)
+ Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION(2, 1))
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool down READ isDown WRITE setDown RESET resetDown NOTIFY downChanged FINAL REVISION 2)
- Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL REVISION 2)
- Q_PROPERTY(QString editText READ editText WRITE setEditText RESET resetEditText NOTIFY editTextChanged FINAL REVISION 2)
- Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL REVISION 2)
- Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION 2)
- Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION 2)
- Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged FINAL REVISION 2)
+ Q_PROPERTY(bool down READ isDown WRITE setDown RESET resetDown NOTIFY downChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(QString editText READ editText WRITE setEditText RESET resetEditText NOTIFY editTextChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged FINAL REVISION(2, 2))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,indicator,popup")
// 2.14 (Qt 5.14)
- Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY currentValueChanged FINAL REVISION 14)
- Q_PROPERTY(QString valueRole READ valueRole WRITE setValueRole NOTIFY valueRoleChanged FINAL REVISION 14)
+ Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY currentValueChanged FINAL REVISION(2, 14))
+ Q_PROPERTY(QString valueRole READ valueRole WRITE setValueRole NOTIFY valueRoleChanged FINAL REVISION(2, 14))
// 2.15 (Qt 5.15)
- Q_PROPERTY(bool selectTextByMouse READ selectTextByMouse WRITE setSelectTextByMouse NOTIFY selectTextByMouseChanged FINAL REVISION 15)
+ Q_PROPERTY(bool selectTextByMouse READ selectTextByMouse WRITE setSelectTextByMouse NOTIFY selectTextByMouseChanged FINAL REVISION(2, 15))
// TODO: 6.0 (Qt 6.0) - QTBUG-84190
Q_PROPERTY(ImplicitContentWidthPolicy implicitContentWidthPolicy READ implicitContentWidthPolicy
WRITE setImplicitContentWidthPolicy NOTIFY implicitContentWidthPolicyChanged FINAL REVISION 15)
+ QML_NAMED_ELEMENT(ComboBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickComboBox(QQuickItem *parent = nullptr);
@@ -171,8 +173,8 @@ public:
// 2.14 (Qt 5.14)
QVariant currentValue() const;
- Q_REVISION(14) Q_INVOKABLE QVariant valueAt(int index) const;
- Q_REVISION(14) Q_INVOKABLE int indexOfValue(const QVariant &value) const;
+ Q_REVISION(2, 14) Q_INVOKABLE QVariant valueAt(int index) const;
+ Q_REVISION(2, 14) Q_INVOKABLE int indexOfValue(const QVariant &value) const;
// 2.15 (Qt 5.15)
bool selectTextByMouse() const;
@@ -192,7 +194,7 @@ public:
public Q_SLOTS:
void incrementCurrentIndex();
void decrementCurrentIndex();
- Q_REVISION(2) void selectAll();
+ Q_REVISION(2, 2) void selectAll();
Q_SIGNALS:
void activated(int index);
@@ -210,24 +212,24 @@ Q_SIGNALS:
void indicatorChanged();
void popupChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void flatChanged();
+ Q_REVISION(2, 1) void flatChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void accepted();
- Q_REVISION(2) void downChanged();
- Q_REVISION(2) void editableChanged();
- Q_REVISION(2) void editTextChanged();
- Q_REVISION(2) void validatorChanged();
- Q_REVISION(2) void inputMethodHintsChanged();
- Q_REVISION(2) void inputMethodComposingChanged();
- Q_REVISION(2) void acceptableInputChanged();
+ Q_REVISION(2, 2) void accepted();
+ Q_REVISION(2, 2) void downChanged();
+ Q_REVISION(2, 2) void editableChanged();
+ Q_REVISION(2, 2) void editTextChanged();
+ Q_REVISION(2, 2) void validatorChanged();
+ Q_REVISION(2, 2) void inputMethodHintsChanged();
+ Q_REVISION(2, 2) void inputMethodComposingChanged();
+ Q_REVISION(2, 2) void acceptableInputChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitIndicatorWidthChanged();
- Q_REVISION(5) void implicitIndicatorHeightChanged();
+ Q_REVISION(2, 5) void implicitIndicatorWidthChanged();
+ Q_REVISION(2, 5) void implicitIndicatorHeightChanged();
// 2.14 (Qt 5.14)
- Q_REVISION(14) void valueRoleChanged();
- Q_REVISION(14) void currentValueChanged();
+ Q_REVISION(2, 14) void valueRoleChanged();
+ Q_REVISION(2, 14) void currentValueChanged();
// 2.15 (Qt 5.15)
- Q_REVISION(15) void selectTextByMouseChanged();
+ Q_REVISION(2, 15) void selectTextByMouseChanged();
// 6.0 (Qt 6.0)
Q_REVISION(6, 0) void implicitContentWidthPolicyChanged();
diff --git a/src/quicktemplates2/qquickcontainer_p.h b/src/quicktemplates2/qquickcontainer_p.h
index 9deba199..666c9307 100644
--- a/src/quicktemplates2/qquickcontainer_p.h
+++ b/src/quicktemplates2/qquickcontainer_p.h
@@ -65,9 +65,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickContainer : public QQuickControl
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL)
Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Container)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickContainer(QQuickItem *parent = nullptr);
@@ -80,7 +82,7 @@ public:
Q_INVOKABLE void moveItem(int from, int to);
Q_INVOKABLE void removeItem(QQuickItem *item);
// 2.3 (Qt 5.10)
- Q_REVISION(3) Q_INVOKABLE QQuickItem *takeItem(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickItem *takeItem(int index);
QVariant contentModel() const;
QQmlListProperty<QObject> contentData();
@@ -101,8 +103,8 @@ public:
public Q_SLOTS:
void setCurrentIndex(int index);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void incrementCurrentIndex();
- Q_REVISION(1) void decrementCurrentIndex();
+ Q_REVISION(2, 1) void incrementCurrentIndex();
+ Q_REVISION(2, 1) void decrementCurrentIndex();
Q_SIGNALS:
void countChanged();
@@ -110,8 +112,8 @@ Q_SIGNALS:
void currentIndexChanged();
void currentItemChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void contentWidthChanged();
- Q_REVISION(5) void contentHeightChanged();
+ Q_REVISION(2, 5) void contentWidthChanged();
+ Q_REVISION(2, 5) void contentHeightChanged();
protected:
QQuickContainer(QQuickContainerPrivate &dd, QQuickItem *parent);
diff --git a/src/quicktemplates2/qquickcontrol_p.h b/src/quicktemplates2/qquickcontrol_p.h
index 6d88a8b2..5e4a7cd9 100644
--- a/src/quicktemplates2/qquickcontrol_p.h
+++ b/src/quicktemplates2/qquickcontrol_p.h
@@ -81,17 +81,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickControl : public QQuickItem
Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL)
Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset RESET resetBaselineOffset NOTIFY baselineOffsetChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL REVISION 5)
- Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem")
+ QML_NAMED_ELEMENT(Control)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickControl(QQuickItem *parent = nullptr);
@@ -215,16 +217,16 @@ Q_SIGNALS:
void contentItemChanged();
void baselineOffsetChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void horizontalPaddingChanged();
- Q_REVISION(5) void verticalPaddingChanged();
- Q_REVISION(5) void implicitContentWidthChanged();
- Q_REVISION(5) void implicitContentHeightChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void horizontalPaddingChanged();
+ Q_REVISION(2, 5) void verticalPaddingChanged();
+ Q_REVISION(2, 5) void implicitContentWidthChanged();
+ Q_REVISION(2, 5) void implicitContentHeightChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
virtual QFont defaultFont() const;
@@ -286,6 +288,21 @@ private:
Q_DECLARE_PRIVATE(QQuickControl)
};
+struct QQuickItemForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickItem)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
+struct QQuickPaletteForeign
+{
+ Q_GADGET
+ QML_NAMED_ELEMENT(Palette)
+ QML_ADDED_IN_VERSION(6, 0)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickControl)
diff --git a/src/quicktemplates2/qquickdelaybutton_p.h b/src/quicktemplates2/qquickdelaybutton_p.h
index 5ac0885d..a697bca8 100644
--- a/src/quicktemplates2/qquickdelaybutton_p.h
+++ b/src/quicktemplates2/qquickdelaybutton_p.h
@@ -61,6 +61,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDelayButton : public QQuickAbstract
Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL)
Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged FINAL)
Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL)
+ QML_NAMED_ELEMENT(DelayButton)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickDelayButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickdial_p.h b/src/quicktemplates2/qquickdial_p.h
index cc641c78..67bbc183 100644
--- a/src/quicktemplates2/qquickdial_p.h
+++ b/src/quicktemplates2/qquickdial_p.h
@@ -71,10 +71,12 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDial : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
// 2.5 (Qt 5.12)
- Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode NOTIFY inputModeChanged FINAL REVISION 5)
+ Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode NOTIFY inputModeChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,handle")
+ QML_NAMED_ELEMENT(Dial)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDial(QQuickItem *parent = nullptr);
@@ -145,10 +147,10 @@ Q_SIGNALS:
void pressedChanged();
void handleChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void moved();
- Q_REVISION(2) void liveChanged();
+ Q_REVISION(2, 2) void moved();
+ Q_REVISION(2, 2) void liveChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void inputModeChanged();
+ Q_REVISION(2, 5) void inputModeChanged();
protected:
void keyPressEvent(QKeyEvent *event) override;
diff --git a/src/quicktemplates2/qquickdialog_p.h b/src/quicktemplates2/qquickdialog_p.h
index 38a1b396..20f56f6b 100644
--- a/src/quicktemplates2/qquickdialog_p.h
+++ b/src/quicktemplates2/qquickdialog_p.h
@@ -64,13 +64,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialog : public QQuickPopup
Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION 3)
+ Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION(2, 3))
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5))
+ QML_NAMED_ELEMENT(Dialog)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickDialog(QObject *parent = nullptr);
@@ -86,7 +88,7 @@ public:
QPlatformDialogHelper::StandardButtons standardButtons() const;
void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons);
- Q_REVISION(3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const;
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const;
// 2.3 (Qt 5.10)
enum StandardCode { Rejected, Accepted };
@@ -115,11 +117,11 @@ Q_SIGNALS:
void footerChanged();
void standardButtonsChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void applied();
- Q_REVISION(3) void reset();
- Q_REVISION(3) void discarded();
- Q_REVISION(3) void helpRequested();
- Q_REVISION(3) void resultChanged();
+ Q_REVISION(2, 3) void applied();
+ Q_REVISION(2, 3) void reset();
+ Q_REVISION(2, 3) void discarded();
+ Q_REVISION(2, 3) void helpRequested();
+ Q_REVISION(2, 3) void resultChanged();
// 2.5 (Qt 5.12)
void implicitHeaderWidthChanged();
void implicitHeaderHeightChanged();
diff --git a/src/quicktemplates2/qquickdialogbuttonbox_p.h b/src/quicktemplates2/qquickdialogbuttonbox_p.h
index 996f4ef7..b1687df7 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox_p.h
+++ b/src/quicktemplates2/qquickdialogbuttonbox_p.h
@@ -67,8 +67,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialogButtonBox : public QQuickCont
Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(QPlatformDialogHelper::ButtonLayout buttonLayout READ buttonLayout WRITE setButtonLayout RESET resetButtonLayout NOTIFY buttonLayoutChanged FINAL REVISION 5)
+ Q_PROPERTY(QPlatformDialogHelper::ButtonLayout buttonLayout READ buttonLayout WRITE setButtonLayout RESET resetButtonLayout NOTIFY buttonLayoutChanged FINAL REVISION(2, 5))
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
+ QML_NAMED_ELEMENT(DialogButtonBox)
+ QML_ATTACHED(QQuickDialogButtonBoxAttached)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickDialogButtonBox(QQuickItem *parent = nullptr);
@@ -113,11 +116,11 @@ Q_SIGNALS:
void standardButtonsChanged();
void delegateChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void applied();
- Q_REVISION(3) void reset();
- Q_REVISION(3) void discarded();
+ Q_REVISION(2, 3) void applied();
+ Q_REVISION(2, 3) void reset();
+ Q_REVISION(2, 3) void discarded();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void buttonLayoutChanged();
+ Q_REVISION(2, 5) void buttonLayoutChanged();
protected:
void updatePolish() override;
diff --git a/src/quicktemplates2/qquickdrawer_p.h b/src/quicktemplates2/qquickdrawer_p.h
index 8e246fcc..f16ae771 100644
--- a/src/quicktemplates2/qquickdrawer_p.h
+++ b/src/quicktemplates2/qquickdrawer_p.h
@@ -61,7 +61,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDrawer : public QQuickPopup
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin RESET resetDragMargin NOTIFY dragMarginChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
+ QML_NAMED_ELEMENT(Drawer)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickDrawer(QObject *parent = nullptr);
@@ -85,7 +87,7 @@ Q_SIGNALS:
void positionChanged();
void dragMarginChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void interactiveChanged();
+ Q_REVISION(2, 2) void interactiveChanged();
protected:
bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
diff --git a/src/quicktemplates2/qquickframe_p.h b/src/quicktemplates2/qquickframe_p.h
index 381088ec..f65e2814 100644
--- a/src/quicktemplates2/qquickframe_p.h
+++ b/src/quicktemplates2/qquickframe_p.h
@@ -57,6 +57,8 @@ class QQuickFramePrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickFrame : public QQuickPane
{
Q_OBJECT
+ QML_NAMED_ELEMENT(Frame)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickFrame(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickgroupbox_p.h b/src/quicktemplates2/qquickgroupbox_p.h
index f5159630..39e20494 100644
--- a/src/quicktemplates2/qquickgroupbox_p.h
+++ b/src/quicktemplates2/qquickgroupbox_p.h
@@ -60,9 +60,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickGroupBox : public QQuickFrame
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitLabelWidth READ implicitLabelWidth NOTIFY implicitLabelWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitLabelHeight READ implicitLabelHeight NOTIFY implicitLabelHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitLabelWidth READ implicitLabelWidth NOTIFY implicitLabelWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitLabelHeight READ implicitLabelHeight NOTIFY implicitLabelHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,label")
+ QML_NAMED_ELEMENT(GroupBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickGroupBox(QQuickItem *parent = nullptr);
@@ -82,8 +84,8 @@ Q_SIGNALS:
void titleChanged();
void labelChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitLabelWidthChanged();
- Q_REVISION(5) void implicitLabelHeightChanged();
+ Q_REVISION(2, 5) void implicitLabelWidthChanged();
+ Q_REVISION(2, 5) void implicitLabelHeightChanged();
protected:
void componentComplete() override;
diff --git a/src/quicktemplates2/qquickheaderview_p.h b/src/quicktemplates2/qquickheaderview_p.h
index 10c55c6e..b8e8b77a 100644
--- a/src/quicktemplates2/qquickheaderview_p.h
+++ b/src/quicktemplates2/qquickheaderview_p.h
@@ -88,6 +88,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickHorizontalHeaderView : public QQuic
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickHorizontalHeaderView)
+ QML_NAMED_ELEMENT(HorizontalHeaderView)
+ QML_ADDED_IN_VERSION(2, 15)
public:
QQuickHorizontalHeaderView(QQuickItem *parent = nullptr);
@@ -105,6 +107,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickVerticalHeaderView : public QQuickH
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickVerticalHeaderView)
+ QML_NAMED_ELEMENT(VerticalHeaderView)
+ QML_ADDED_IN_VERSION(2, 15)
public:
QQuickVerticalHeaderView(QQuickItem *parent = nullptr);
@@ -117,6 +121,14 @@ private:
Q_DISABLE_COPY(QQuickVerticalHeaderView)
};
+struct QQuickTableViewForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickTableView)
+ QML_ADDED_IN_VERSION(2, 14)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickHorizontalHeaderView)
diff --git a/src/quicktemplates2/qquickicon_p.h b/src/quicktemplates2/qquickicon_p.h
index 1835585d..0c0fe101 100644
--- a/src/quicktemplates2/qquickicon_p.h
+++ b/src/quicktemplates2/qquickicon_p.h
@@ -54,6 +54,7 @@
#include <QtCore/qshareddata.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
#include <QtGui/qcolor.h>
+#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
@@ -68,6 +69,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickIcon
Q_PROPERTY(int height READ height WRITE setHeight RESET resetHeight FINAL)
Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor FINAL)
Q_PROPERTY(bool cache READ cache WRITE setCache RESET resetCache FINAL)
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 3)
public:
QQuickIcon();
diff --git a/src/quicktemplates2/qquickitemdelegate_p.h b/src/quicktemplates2/qquickitemdelegate_p.h
index a162ddee..2568a0bf 100644
--- a/src/quicktemplates2/qquickitemdelegate_p.h
+++ b/src/quicktemplates2/qquickitemdelegate_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickItemDelegate : public QQuickAbstrac
{
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
+ QML_NAMED_ELEMENT(ItemDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickItemDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicklabel_p.h b/src/quicktemplates2/qquicklabel_p.h
index c3e4fb45..02acddca 100644
--- a/src/quicktemplates2/qquicklabel_p.h
+++ b/src/quicktemplates2/qquicklabel_p.h
@@ -62,13 +62,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickLabel : public QQuickText
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background")
+ QML_NAMED_ELEMENT(Label)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickLabel(QQuickItem *parent = nullptr);
@@ -104,12 +106,12 @@ Q_SIGNALS:
void fontChanged();
void backgroundChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
void classBegin() override;
@@ -124,6 +126,14 @@ private:
Q_DECLARE_PRIVATE(QQuickLabel)
};
+struct QQuickTextForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickText)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickLabel)
diff --git a/src/quicktemplates2/qquickmenu_p.h b/src/quicktemplates2/qquickmenu_p.h
index de252bf8..2646cffa 100644
--- a/src/quicktemplates2/qquickmenu_p.h
+++ b/src/quicktemplates2/qquickmenu_p.h
@@ -67,12 +67,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenu : public QQuickPopup
Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL)
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(int count READ count NOTIFY countChanged FINAL REVISION 3)
- Q_PROPERTY(bool cascade READ cascade WRITE setCascade RESET resetCascade NOTIFY cascadeChanged FINAL REVISION 3)
- Q_PROPERTY(qreal overlap READ overlap WRITE setOverlap NOTIFY overlapChanged FINAL REVISION 3)
- Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL REVISION 3)
- Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL REVISION 3)
+ Q_PROPERTY(int count READ count NOTIFY countChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool cascade READ cascade WRITE setCascade RESET resetCascade NOTIFY cascadeChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(qreal overlap READ overlap WRITE setOverlap NOTIFY overlapChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL REVISION(2, 3))
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Menu)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickMenu(QObject *parent = nullptr);
@@ -104,25 +106,25 @@ public:
// 2.3 (Qt 5.10)
int count() const;
- Q_REVISION(3) Q_INVOKABLE QQuickItem *takeItem(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickItem *takeItem(int index);
- Q_REVISION(3) Q_INVOKABLE QQuickMenu *menuAt(int index) const;
- Q_REVISION(3) Q_INVOKABLE void addMenu(QQuickMenu *menu);
- Q_REVISION(3) Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu);
- Q_REVISION(3) Q_INVOKABLE void removeMenu(QQuickMenu *menu);
- Q_REVISION(3) Q_INVOKABLE QQuickMenu *takeMenu(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickMenu *menuAt(int index) const;
+ Q_REVISION(2, 3) Q_INVOKABLE void addMenu(QQuickMenu *menu);
+ Q_REVISION(2, 3) Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu);
+ Q_REVISION(2, 3) Q_INVOKABLE void removeMenu(QQuickMenu *menu);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickMenu *takeMenu(int index);
- Q_REVISION(3) Q_INVOKABLE QQuickAction *actionAt(int index) const;
- Q_REVISION(3) Q_INVOKABLE void addAction(QQuickAction *action);
- Q_REVISION(3) Q_INVOKABLE void insertAction(int index, QQuickAction *action);
- Q_REVISION(3) Q_INVOKABLE void removeAction(QQuickAction *action);
- Q_REVISION(3) Q_INVOKABLE QQuickAction *takeAction(int index);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickAction *actionAt(int index) const;
+ Q_REVISION(2, 3) Q_INVOKABLE void addAction(QQuickAction *action);
+ Q_REVISION(2, 3) Q_INVOKABLE void insertAction(int index, QQuickAction *action);
+ Q_REVISION(2, 3) Q_INVOKABLE void removeAction(QQuickAction *action);
+ Q_REVISION(2, 3) Q_INVOKABLE QQuickAction *takeAction(int index);
void popup(QQuickItem *menuItem = nullptr);
void popup(const QPointF &pos, QQuickItem *menuItem = nullptr);
- Q_REVISION(3) Q_INVOKABLE void popup(QQmlV4Function *args);
- Q_REVISION(3) Q_INVOKABLE void dismiss();
+ Q_REVISION(2, 3) Q_INVOKABLE void popup(QQmlV4Function *args);
+ Q_REVISION(2, 3) Q_INVOKABLE void dismiss();
protected:
void componentComplete() override;
@@ -133,11 +135,11 @@ protected:
Q_SIGNALS:
void titleChanged(const QString &title);
// 2.3 (Qt 5.10)
- Q_REVISION(3) void countChanged();
- Q_REVISION(3) void cascadeChanged(bool cascade);
- Q_REVISION(3) void overlapChanged();
- Q_REVISION(3) void delegateChanged();
- Q_REVISION(3) void currentIndexChanged();
+ Q_REVISION(2, 3) void countChanged();
+ Q_REVISION(2, 3) void cascadeChanged(bool cascade);
+ Q_REVISION(2, 3) void overlapChanged();
+ Q_REVISION(2, 3) void delegateChanged();
+ Q_REVISION(2, 3) void currentIndexChanged();
protected:
void timerEvent(QTimerEvent *event) override;
diff --git a/src/quicktemplates2/qquickmenubar_p.h b/src/quicktemplates2/qquickmenubar_p.h
index 8fcaa870..8092cf9b 100644
--- a/src/quicktemplates2/qquickmenubar_p.h
+++ b/src/quicktemplates2/qquickmenubar_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBar : public QQuickContainer
Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL) // re-declare QQuickContainer::contentHeight (REV 5)
Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged FINAL)
Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL)
+ QML_NAMED_ELEMENT(MenuBar)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickMenuBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickmenubaritem_p.h b/src/quicktemplates2/qquickmenubaritem_p.h
index b58ef1c4..a913f242 100644
--- a/src/quicktemplates2/qquickmenubaritem_p.h
+++ b/src/quicktemplates2/qquickmenubaritem_p.h
@@ -62,6 +62,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBarItem : public QQuickAbstract
Q_PROPERTY(QQuickMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL)
Q_PROPERTY(QQuickMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
+ QML_NAMED_ELEMENT(MenuBarItem)
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickMenuBarItem(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickmenuitem_p.h b/src/quicktemplates2/qquickmenuitem_p.h
index e519132e..817da76b 100644
--- a/src/quicktemplates2/qquickmenuitem_p.h
+++ b/src/quicktemplates2/qquickmenuitem_p.h
@@ -60,10 +60,12 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuItem : public QQuickAbstractBut
Q_OBJECT
Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION 3)
- Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION 3)
- Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION 3)
+ Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION(2, 3))
Q_CLASSINFO("DeferredPropertyNames", "arrow,background,contentItem,indicator")
+ QML_NAMED_ELEMENT(MenuItem)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickMenuItem(QQuickItem *parent = nullptr);
@@ -82,9 +84,9 @@ Q_SIGNALS:
void triggered();
void highlightedChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void arrowChanged();
- Q_REVISION(3) void menuChanged();
- Q_REVISION(3) void subMenuChanged();
+ Q_REVISION(2, 3) void arrowChanged();
+ Q_REVISION(2, 3) void menuChanged();
+ Q_REVISION(2, 3) void subMenuChanged();
protected:
void componentComplete() override;
diff --git a/src/quicktemplates2/qquickmenuseparator_p.h b/src/quicktemplates2/qquickmenuseparator_p.h
index 15d96739..330aaac4 100644
--- a/src/quicktemplates2/qquickmenuseparator_p.h
+++ b/src/quicktemplates2/qquickmenuseparator_p.h
@@ -58,6 +58,8 @@ class QQuickMenuSeparator;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuSeparator : public QQuickControl
{
Q_OBJECT
+ QML_NAMED_ELEMENT(MenuSeparator)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickMenuSeparator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickoverlay_p.h b/src/quicktemplates2/qquickoverlay_p.h
index 20ec21a1..c6e530e2 100644
--- a/src/quicktemplates2/qquickoverlay_p.h
+++ b/src/quicktemplates2/qquickoverlay_p.h
@@ -63,6 +63,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickOverlay : public QQuickItem
Q_OBJECT
Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL)
Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL)
+ QML_NAMED_ELEMENT(Overlay)
+ QML_ATTACHED(QQuickOverlayAttached)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 3)
public:
explicit QQuickOverlay(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpage_p.h b/src/quicktemplates2/qquickpage_p.h
index b7888ad6..3278900d 100644
--- a/src/quicktemplates2/qquickpage_p.h
+++ b/src/quicktemplates2/qquickpage_p.h
@@ -62,13 +62,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPage : public QQuickPane
Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL)
Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged FINAL REVISION 1)
- Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged FINAL REVISION 1)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5))
+ QML_NAMED_ELEMENT(Page)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPage(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpageindicator_p.h b/src/quicktemplates2/qquickpageindicator_p.h
index 01352016..a21e88fe 100644
--- a/src/quicktemplates2/qquickpageindicator_p.h
+++ b/src/quicktemplates2/qquickpageindicator_p.h
@@ -62,6 +62,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPageIndicator : public QQuickContro
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL)
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
+ QML_NAMED_ELEMENT(PageIndicator)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPageIndicator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpane_p.h b/src/quicktemplates2/qquickpane_p.h
index 86b2c9f2..2aeb94cd 100644
--- a/src/quicktemplates2/qquickpane_p.h
+++ b/src/quicktemplates2/qquickpane_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPane : public QQuickControl
Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL)
Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty<QQuickItem> contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL)
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Pane)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPane(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h
index d5e2f1e9..76ccc7a9 100644
--- a/src/quicktemplates2/qquickpopup_p.h
+++ b/src/quicktemplates2/qquickpopup_p.h
@@ -116,26 +116,28 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopup : public QObject, public QQml
Q_PROPERTY(QQuickTransition *enter READ enter WRITE setEnter NOTIFY enterChanged FINAL)
Q_PROPERTY(QQuickTransition *exit READ exit WRITE setExit NOTIFY exitChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL REVISION 1)
+ Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL REVISION(2, 1))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool opened READ isOpened NOTIFY openedChanged FINAL REVISION 3)
- Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION 3)
- Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION 3)
- Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION 3)
+ Q_PROPERTY(bool opened READ isOpened NOTIFY openedChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION(2, 3))
+ Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3))
// 2.5 (Qt 5.12)
Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL)
Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL)
- Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPopupAnchors *anchors READ getAnchors DESIGNABLE false CONSTANT FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPopupAnchors *anchors READ getAnchors DESIGNABLE false CONSTANT FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,contentItem")
Q_CLASSINFO("DefaultProperty", "contentData")
+ QML_NAMED_ELEMENT(Popup)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickPopup(QObject *parent = nullptr);
@@ -390,24 +392,24 @@ Q_SIGNALS:
void exitChanged();
void windowChanged(QQuickWindow *window);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void spacingChanged();
+ Q_REVISION(2, 1) void spacingChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void openedChanged();
- Q_REVISION(3) void mirroredChanged();
- Q_REVISION(3) void enabledChanged();
- Q_REVISION(3) void paletteChanged();
- Q_REVISION(3) void paletteCreated();
+ Q_REVISION(2, 3) void openedChanged();
+ Q_REVISION(2, 3) void mirroredChanged();
+ Q_REVISION(2, 3) void enabledChanged();
+ Q_REVISION(2, 3) void paletteChanged();
+ Q_REVISION(2, 3) void paletteCreated();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void horizontalPaddingChanged();
- Q_REVISION(5) void verticalPaddingChanged();
- Q_REVISION(5) void implicitContentWidthChanged();
- Q_REVISION(5) void implicitContentHeightChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void horizontalPaddingChanged();
+ Q_REVISION(2, 5) void verticalPaddingChanged();
+ Q_REVISION(2, 5) void implicitContentWidthChanged();
+ Q_REVISION(2, 5) void implicitContentHeightChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
QQuickPopup(QQuickPopupPrivate &dd, QObject *parent);
diff --git a/src/quicktemplates2/qquickpopupanchors_p.h b/src/quicktemplates2/qquickpopupanchors_p.h
index eff4e23d..dce1c5b2 100644
--- a/src/quicktemplates2/qquickpopupanchors_p.h
+++ b/src/quicktemplates2/qquickpopupanchors_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopupAnchors : public QObject, publ
{
Q_OBJECT
Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 5)
public:
explicit QQuickPopupAnchors(QQuickPopup *popup);
diff --git a/src/quicktemplates2/qquickprogressbar_p.h b/src/quicktemplates2/qquickprogressbar_p.h
index f2284c65..8322670f 100644
--- a/src/quicktemplates2/qquickprogressbar_p.h
+++ b/src/quicktemplates2/qquickprogressbar_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickProgressBar : public QQuickControl
Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate NOTIFY indeterminateChanged FINAL)
+ QML_NAMED_ELEMENT(ProgressBar)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickProgressBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickradiobutton_p.h b/src/quicktemplates2/qquickradiobutton_p.h
index f937081f..29e18922 100644
--- a/src/quicktemplates2/qquickradiobutton_p.h
+++ b/src/quicktemplates2/qquickradiobutton_p.h
@@ -58,6 +58,8 @@ class QQuickRadioButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRadioButton : public QQuickAbstractButton
{
Q_OBJECT
+ QML_NAMED_ELEMENT(RadioButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRadioButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickradiodelegate_p.h b/src/quicktemplates2/qquickradiodelegate_p.h
index 1a4761a3..0ddff985 100644
--- a/src/quicktemplates2/qquickradiodelegate_p.h
+++ b/src/quicktemplates2/qquickradiodelegate_p.h
@@ -57,6 +57,8 @@ class QQuickRadioDelegatePrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRadioDelegate : public QQuickItemDelegate
{
Q_OBJECT
+ QML_NAMED_ELEMENT(RadioDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRadioDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickrangeslider_p.h b/src/quicktemplates2/qquickrangeslider_p.h
index a42245a1..d767228e 100644
--- a/src/quicktemplates2/qquickrangeslider_p.h
+++ b/src/quicktemplates2/qquickrangeslider_p.h
@@ -66,12 +66,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSlider : public QQuickControl
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5))
+ QML_NAMED_ELEMENT(RangeSlider)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRangeSlider(QQuickItem *parent = nullptr);
@@ -116,7 +118,7 @@ public:
qreal touchDragThreshold() const;
void setTouchDragThreshold(qreal touchDragThreshold);
void resetTouchDragThreshold();
- Q_REVISION(5) Q_INVOKABLE qreal valueAt(qreal position) const;
+ Q_REVISION(2, 5) Q_INVOKABLE qreal valueAt(qreal position) const;
Q_SIGNALS:
void fromChanged();
@@ -125,9 +127,9 @@ Q_SIGNALS:
void snapModeChanged();
void orientationChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void liveChanged();
+ Q_REVISION(2, 2) void liveChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void touchDragThresholdChanged();
+ Q_REVISION(2, 5) void touchDragThresholdChanged();
protected:
void focusInEvent(QFocusEvent *event) override;
@@ -166,11 +168,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSliderNode : public QObject
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "handle")
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickRangeSliderNode(qreal value, QQuickRangeSlider *slider);
@@ -207,11 +211,11 @@ Q_SIGNALS:
void handleChanged();
void pressedChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoveredChanged();
// 2.5 (Qt 5.12)
- /*Q_REVISION(5)*/ void moved();
- /*Q_REVISION(5)*/ void implicitHandleWidthChanged();
- /*Q_REVISION(5)*/ void implicitHandleHeightChanged();
+ /*Q_REVISION(2, 5)*/ void moved();
+ /*Q_REVISION(2, 5)*/ void implicitHandleWidthChanged();
+ /*Q_REVISION(2, 5)*/ void implicitHandleHeightChanged();
private:
Q_DISABLE_COPY(QQuickRangeSliderNode)
diff --git a/src/quicktemplates2/qquickroundbutton_p.h b/src/quicktemplates2/qquickroundbutton_p.h
index dc5e432a..fdd46cf8 100644
--- a/src/quicktemplates2/qquickroundbutton_p.h
+++ b/src/quicktemplates2/qquickroundbutton_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRoundButton : public QQuickButton
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius RESET resetRadius NOTIFY radiusChanged FINAL)
+ QML_NAMED_ELEMENT(RoundButton)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickRoundButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickscrollbar_p.h b/src/quicktemplates2/qquickscrollbar_p.h
index 5fad8240..dee0b749 100644
--- a/src/quicktemplates2/qquickscrollbar_p.h
+++ b/src/quicktemplates2/qquickscrollbar_p.h
@@ -65,16 +65,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollBar : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION 2)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION 2)
- Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION 2)
+ Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION 4)
+ Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(ScrollBar)
+ QML_ATTACHED(QQuickScrollBarAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickScrollBar(QQuickItem *parent = nullptr);
@@ -146,13 +149,13 @@ Q_SIGNALS:
void pressedChanged();
void orientationChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void snapModeChanged();
- Q_REVISION(2) void interactiveChanged();
- Q_REVISION(2) void policyChanged();
+ Q_REVISION(2, 2) void snapModeChanged();
+ Q_REVISION(2, 2) void interactiveChanged();
+ Q_REVISION(2, 2) void policyChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void minimumSizeChanged();
- Q_REVISION(4) void visualSizeChanged();
- Q_REVISION(4) void visualPositionChanged();
+ Q_REVISION(2, 4) void minimumSizeChanged();
+ Q_REVISION(2, 4) void visualSizeChanged();
+ Q_REVISION(2, 4) void visualPositionChanged();
protected:
void mousePressEvent(QMouseEvent *event) override;
diff --git a/src/quicktemplates2/qquickscrollindicator_p.h b/src/quicktemplates2/qquickscrollindicator_p.h
index 4fa06a33..dbad6ffe 100644
--- a/src/quicktemplates2/qquickscrollindicator_p.h
+++ b/src/quicktemplates2/qquickscrollindicator_p.h
@@ -64,12 +64,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollIndicator : public QQuickCont
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION 4)
- Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION 4)
+ Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
+ Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(ScrollIndicator)
+ QML_ATTACHED(QQuickScrollIndicatorAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickScrollIndicator(QQuickItem *parent = nullptr);
@@ -106,9 +109,9 @@ Q_SIGNALS:
void activeChanged();
void orientationChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void minimumSizeChanged();
- Q_REVISION(4) void visualSizeChanged();
- Q_REVISION(4) void visualPositionChanged();
+ Q_REVISION(2, 4) void minimumSizeChanged();
+ Q_REVISION(2, 4) void visualSizeChanged();
+ Q_REVISION(2, 4) void visualPositionChanged();
protected:
#if QT_CONFIG(quicktemplates2_multitouch)
diff --git a/src/quicktemplates2/qquickscrollview_p.h b/src/quicktemplates2/qquickscrollview_p.h
index 2b8d260e..7eea46dd 100644
--- a/src/quicktemplates2/qquickscrollview_p.h
+++ b/src/quicktemplates2/qquickscrollview_p.h
@@ -58,6 +58,8 @@ class QQuickScrollViewPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollView : public QQuickPane
{
Q_OBJECT
+ QML_NAMED_ELEMENT(ScrollView)
+ QML_ADDED_IN_VERSION(2, 2)
public:
explicit QQuickScrollView(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickslider_p.h b/src/quicktemplates2/qquickslider_p.h
index c65733dc..ac03f7f9 100644
--- a/src/quicktemplates2/qquickslider_p.h
+++ b/src/quicktemplates2/qquickslider_p.h
@@ -67,15 +67,17 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSlider : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
- Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
+ Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background,handle")
+ QML_NAMED_ELEMENT(Slider)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSlider(QQuickItem *parent = nullptr);
@@ -116,7 +118,7 @@ public:
void setHandle(QQuickItem *handle);
// 2.1 (Qt 5.8)
- Q_REVISION(1) Q_INVOKABLE qreal valueAt(qreal position) const;
+ Q_REVISION(2, 1) Q_INVOKABLE qreal valueAt(qreal position) const;
// 2.2 (Qt 5.9)
bool live() const;
@@ -150,12 +152,12 @@ Q_SIGNALS:
void orientationChanged();
void handleChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void moved();
- Q_REVISION(2) void liveChanged();
+ Q_REVISION(2, 2) void moved();
+ Q_REVISION(2, 2) void liveChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void touchDragThresholdChanged();
- Q_REVISION(5) void implicitHandleWidthChanged();
- Q_REVISION(5) void implicitHandleHeightChanged();
+ Q_REVISION(2, 5) void touchDragThresholdChanged();
+ Q_REVISION(2, 5) void implicitHandleWidthChanged();
+ Q_REVISION(2, 5) void implicitHandleHeightChanged();
protected:
void keyPressEvent(QKeyEvent *event) override;
diff --git a/src/quicktemplates2/qquickspinbox_p.h b/src/quicktemplates2/qquickspinbox_p.h
index 6b787674..d90aa531 100644
--- a/src/quicktemplates2/qquickspinbox_p.h
+++ b/src/quicktemplates2/qquickspinbox_p.h
@@ -72,12 +72,14 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSpinBox : public QQuickControl
Q_PROPERTY(QQuickSpinButton *up READ up CONSTANT FINAL)
Q_PROPERTY(QQuickSpinButton *down READ down CONSTANT FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION 2)
- Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION 2)
+ Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION(2, 2))
+ Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL REVISION 3)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL REVISION(2, 3))
// 2.4 (Qt 5.11)
- Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged FINAL REVISION 4)
+ Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged FINAL REVISION(2, 4))
+ QML_NAMED_ELEMENT(SpinBox)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSpinBox(QQuickItem *parent = nullptr);
@@ -137,13 +139,13 @@ Q_SIGNALS:
void textFromValueChanged();
void valueFromTextChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void valueModified();
- Q_REVISION(2) void inputMethodHintsChanged();
- Q_REVISION(2) void inputMethodComposingChanged();
+ Q_REVISION(2, 2) void valueModified();
+ Q_REVISION(2, 2) void inputMethodHintsChanged();
+ Q_REVISION(2, 2) void inputMethodComposingChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void wrapChanged();
+ Q_REVISION(2, 3) void wrapChanged();
// 2.4 (Qt 5.11)
- Q_REVISION(4) void displayTextChanged();
+ Q_REVISION(2, 4) void displayTextChanged();
protected:
void focusInEvent(QFocusEvent *event) override;
@@ -181,11 +183,13 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSpinButton : public QObject
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION 5)
+ Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "indicator")
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSpinButton(QQuickSpinBox *parent);
@@ -208,10 +212,10 @@ Q_SIGNALS:
void pressedChanged();
void indicatorChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoveredChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void implicitIndicatorWidthChanged();
- Q_REVISION(5) void implicitIndicatorHeightChanged();
+ Q_REVISION(2, 5) void implicitIndicatorWidthChanged();
+ Q_REVISION(2, 5) void implicitIndicatorHeightChanged();
private:
Q_DISABLE_COPY(QQuickSpinButton)
diff --git a/src/quicktemplates2/qquicksplitview_p.h b/src/quicktemplates2/qquicksplitview_p.h
index 06dc1a55..55b45ed8 100644
--- a/src/quicktemplates2/qquicksplitview_p.h
+++ b/src/quicktemplates2/qquicksplitview_p.h
@@ -65,6 +65,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitView : public QQuickContainer
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(bool resizing READ isResizing NOTIFY resizingChanged)
Q_PROPERTY(QQmlComponent *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
+ QML_NAMED_ELEMENT(SplitView)
+ QML_ATTACHED(QQuickSplitViewAttached)
+ QML_ADDED_IN_VERSION(2, 13)
public:
explicit QQuickSplitView(QQuickItem *parent = nullptr);
@@ -190,6 +193,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitHandleAttached : public QObjec
Q_OBJECT
Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL)
Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
+ QML_NAMED_ELEMENT(SplitHandle)
+ QML_ATTACHED(QQuickSplitHandleAttached)
+ QML_UNCREATABLE("")
+ QML_ADDED_IN_VERSION(2, 13)
public:
explicit QQuickSplitHandleAttached(QObject *parent = nullptr);
diff --git a/src/quicktemplates2/qquickstackview_p.h b/src/quicktemplates2/qquickstackview_p.h
index f551f027..f4cb5458 100644
--- a/src/quicktemplates2/qquickstackview_p.h
+++ b/src/quicktemplates2/qquickstackview_p.h
@@ -73,7 +73,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickStackView : public QQuickControl
Q_PROPERTY(QQuickTransition *replaceEnter READ replaceEnter WRITE setReplaceEnter NOTIFY replaceEnterChanged FINAL)
Q_PROPERTY(QQuickTransition *replaceExit READ replaceExit WRITE setReplaceExit NOTIFY replaceExitChanged FINAL)
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged FINAL REVISION 3)
+ Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged FINAL REVISION(2, 3))
+ QML_NAMED_ELEMENT(StackView)
+ QML_ATTACHED(QQuickStackViewAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickStackView(QQuickItem *parent = nullptr);
@@ -153,7 +156,7 @@ Q_SIGNALS:
void replaceEnterChanged();
void replaceExitChanged();
// 2.3 (Qt 5.10)
- Q_REVISION(3) void emptyChanged();
+ Q_REVISION(2, 3) void emptyChanged();
protected:
void componentComplete() override;
@@ -180,7 +183,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickStackViewAttached : public QObject
Q_PROPERTY(QQuickStackView *view READ view NOTIFY viewChanged FINAL)
Q_PROPERTY(QQuickStackView::Status status READ status NOTIFY statusChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool visible READ isVisible WRITE setVisible RESET resetVisible NOTIFY visibleChanged FINAL) // REVISION 2
+ Q_PROPERTY(bool visible READ isVisible WRITE setVisible RESET resetVisible NOTIFY visibleChanged FINAL) // REVISION(2, 2)
public:
explicit QQuickStackViewAttached(QObject *parent = nullptr);
@@ -200,13 +203,13 @@ Q_SIGNALS:
void viewChanged();
void statusChanged();
// 2.1 (Qt 5.8)
- /*Q_REVISION(1)*/ void activated();
- /*Q_REVISION(1)*/ void activating();
- /*Q_REVISION(1)*/ void deactivated();
- /*Q_REVISION(1)*/ void deactivating();
- /*Q_REVISION(1)*/ void removed();
+ /*Q_REVISION(2, 1)*/ void activated();
+ /*Q_REVISION(2, 1)*/ void activating();
+ /*Q_REVISION(2, 1)*/ void deactivated();
+ /*Q_REVISION(2, 1)*/ void deactivating();
+ /*Q_REVISION(2, 1)*/ void removed();
// 2.2 (Qt 5.9)
- /*Q_REVISION(2)*/ void visibleChanged();
+ /*Q_REVISION(2, 2)*/ void visibleChanged();
private:
Q_DISABLE_COPY(QQuickStackViewAttached)
diff --git a/src/quicktemplates2/qquickswipe_p.h b/src/quicktemplates2/qquickswipe_p.h
index 20e38e90..768d5638 100644
--- a/src/quicktemplates2/qquickswipe_p.h
+++ b/src/quicktemplates2/qquickswipe_p.h
@@ -71,8 +71,10 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipe : public QObject
Q_PROPERTY(QQuickItem *behindItem READ behindItem NOTIFY behindItemChanged FINAL)
Q_PROPERTY(QQuickItem *rightItem READ rightItem NOTIFY rightItemChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION 2
- Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION 2
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION(2, 2)
+ Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION(2, 2)
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwipe(QQuickSwipeDelegate *control);
@@ -102,7 +104,7 @@ public:
void setRightItem(QQuickItem *item);
// 2.1 (Qt 5.8)
- Q_REVISION(1) Q_INVOKABLE void close();
+ Q_REVISION(2, 1) Q_INVOKABLE void close();
// 2.2 (Qt 5.9)
bool isEnabled() const;
@@ -111,7 +113,7 @@ public:
QQuickTransition *transition() const;
void setTransition(QQuickTransition *transition);
- Q_REVISION(2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side);
+ Q_REVISION(2, 2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side);
Q_SIGNALS:
void positionChanged();
@@ -123,12 +125,12 @@ Q_SIGNALS:
void behindItemChanged();
void rightItemChanged();
// 2.1 (Qt 5.8)
- /*Q_REVISION(1)*/ void completed();
+ /*Q_REVISION(2, 1)*/ void completed();
// 2.2 (Qt 5.9)
- /*Q_REVISION(2)*/ void opened();
- /*Q_REVISION(2)*/ void closed();
- /*Q_REVISION(2)*/ void enabledChanged();
- /*Q_REVISION(2)*/ void transitionChanged();
+ /*Q_REVISION(2, 2)*/ void opened();
+ /*Q_REVISION(2, 2)*/ void closed();
+ /*Q_REVISION(2, 2)*/ void enabledChanged();
+ /*Q_REVISION(2, 2)*/ void transitionChanged();
private:
Q_DISABLE_COPY(QQuickSwipe)
diff --git a/src/quicktemplates2/qquickswipedelegate_p.h b/src/quicktemplates2/qquickswipedelegate_p.h
index 76f9df5b..228f1085 100644
--- a/src/quicktemplates2/qquickswipedelegate_p.h
+++ b/src/quicktemplates2/qquickswipedelegate_p.h
@@ -61,6 +61,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeDelegate : public QQuickItemDe
{
Q_OBJECT
Q_PROPERTY(QQuickSwipe *swipe READ swipe CONSTANT FINAL)
+ QML_NAMED_ELEMENT(SwipeDelegate)
+ QML_ATTACHED(QQuickSwipeDelegateAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwipeDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickswipeview_p.h b/src/quicktemplates2/qquickswipeview_p.h
index 72d7d543..8a09a37e 100644
--- a/src/quicktemplates2/qquickswipeview_p.h
+++ b/src/quicktemplates2/qquickswipeview_p.h
@@ -59,12 +59,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeView : public QQuickContainer
{
Q_OBJECT
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION 1)
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 1))
// 2.2 (Qt 5.9)
- Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION 2)
+ Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION(2, 2))
// 2.3 (Qt 5.10)
- Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
- Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
+ QML_NAMED_ELEMENT(SwipeView)
+ QML_ATTACHED(QQuickSwipeViewAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwipeView(QQuickItem *parent = nullptr);
@@ -85,9 +88,9 @@ public:
Q_SIGNALS:
// 2.1 (Qt 5.8)
- Q_REVISION(1) void interactiveChanged();
+ Q_REVISION(2, 1) void interactiveChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void orientationChanged();
+ Q_REVISION(2, 2) void orientationChanged();
protected:
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
@@ -113,8 +116,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeViewAttached : public QObject
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY isCurrentItemChanged FINAL)
Q_PROPERTY(QQuickSwipeView *view READ view NOTIFY viewChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION 1)
- Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION 1)
+ Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION(2, 1))
public:
explicit QQuickSwipeViewAttached(QObject *parent = nullptr);
@@ -132,8 +135,8 @@ Q_SIGNALS:
void isCurrentItemChanged();
void viewChanged();
// 2.1 (Qt 5.8)
- /*Q_REVISION(1)*/ void isNextItemChanged();
- /*Q_REVISION(1)*/ void isPreviousItemChanged();
+ /*Q_REVISION(2, 1)*/ void isNextItemChanged();
+ /*Q_REVISION(2, 1)*/ void isPreviousItemChanged();
private:
Q_DISABLE_COPY(QQuickSwipeViewAttached)
diff --git a/src/quicktemplates2/qquickswitch_p.h b/src/quicktemplates2/qquickswitch_p.h
index e4c55c2b..b3df0299 100644
--- a/src/quicktemplates2/qquickswitch_p.h
+++ b/src/quicktemplates2/qquickswitch_p.h
@@ -59,6 +59,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwitch : public QQuickAbstractButto
Q_OBJECT
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
+ QML_NAMED_ELEMENT(Switch)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwitch(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquickswitchdelegate_p.h b/src/quicktemplates2/qquickswitchdelegate_p.h
index 383a662d..a2eb6f62 100644
--- a/src/quicktemplates2/qquickswitchdelegate_p.h
+++ b/src/quicktemplates2/qquickswitchdelegate_p.h
@@ -59,6 +59,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwitchDelegate : public QQuickItemD
Q_OBJECT
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
+ QML_NAMED_ELEMENT(SwitchDelegate)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickSwitchDelegate(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktabbar_p.h b/src/quicktemplates2/qquicktabbar_p.h
index 42d39767..1025d3c6 100644
--- a/src/quicktemplates2/qquicktabbar_p.h
+++ b/src/quicktemplates2/qquicktabbar_p.h
@@ -61,8 +61,11 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTabBar : public QQuickContainer
Q_OBJECT
Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL)
// 2.2 (Qt 5.9)
- Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION 2) // re-declare QQuickContainer::contentWidth (REV 5)
- Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION 2) // re-declare QQuickContainer::contentHeight (REV 5)
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 2)) // re-declare QQuickContainer::contentWidth (REV 5)
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 2)) // re-declare QQuickContainer::contentHeight (REV 5)
+ QML_NAMED_ELEMENT(TabBar)
+ QML_ATTACHED(QQuickTabBarAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTabBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktabbutton_p.h b/src/quicktemplates2/qquicktabbutton_p.h
index bcaf7c29..302180c4 100644
--- a/src/quicktemplates2/qquicktabbutton_p.h
+++ b/src/quicktemplates2/qquicktabbutton_p.h
@@ -57,6 +57,8 @@ class QQuickTabButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTabButton : public QQuickAbstractButton
{
Q_OBJECT
+ QML_NAMED_ELEMENT(TabButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTabButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktextarea_p.h b/src/quicktemplates2/qquicktextarea_p.h
index 74247703..fed0eb59 100644
--- a/src/quicktemplates2/qquicktextarea_p.h
+++ b/src/quicktemplates2/qquicktextarea_p.h
@@ -69,17 +69,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextArea : public QQuickTextEdit
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL)
Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1)
- Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background")
+ QML_NAMED_ELEMENT(TextArea)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTextArea(QQuickItem *parent = nullptr);
@@ -141,18 +143,18 @@ Q_SIGNALS:
void focusReasonChanged();
void pressAndHold(QQuickMouseEvent *event);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void pressed(QQuickMouseEvent *event);
- Q_REVISION(1) void released(QQuickMouseEvent *event);
- Q_REVISION(1) void hoveredChanged();
- Q_REVISION(1) void hoverEnabledChanged();
+ Q_REVISION(2, 1) void pressed(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void released(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoverEnabledChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void placeholderTextColorChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void placeholderTextColorChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
friend struct QQuickPressHandler;
@@ -204,6 +206,14 @@ private:
Q_DECLARE_PRIVATE(QQuickTextAreaAttached)
};
+struct QQuickTextEditForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickTextEdit)
+ QML_ADDED_IN_VERSION(2, 3)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickTextArea)
diff --git a/src/quicktemplates2/qquicktextfield_p.h b/src/quicktemplates2/qquicktextfield_p.h
index f24330c7..b1b9715c 100644
--- a/src/quicktemplates2/qquicktextfield_p.h
+++ b/src/quicktemplates2/qquicktextfield_p.h
@@ -68,17 +68,19 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextField : public QQuickTextInput
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL)
Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1)
- Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1)
+ Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
+ Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1))
// 2.5 (Qt 5.12)
- Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION 5)
- Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION 5)
- Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION 5)
- Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION 5)
+ Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
+ Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
Q_CLASSINFO("DeferredPropertyNames", "background")
+ QML_NAMED_ELEMENT(TextField)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTextField(QQuickItem *parent = nullptr);
@@ -136,18 +138,18 @@ Q_SIGNALS:
void focusReasonChanged();
void pressAndHold(QQuickMouseEvent *event);
// 2.1 (Qt 5.8)
- Q_REVISION(1) void pressed(QQuickMouseEvent *event);
- Q_REVISION(1) void released(QQuickMouseEvent *event);
- Q_REVISION(1) void hoveredChanged();
- Q_REVISION(1) void hoverEnabledChanged();
+ Q_REVISION(2, 1) void pressed(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void released(QQuickMouseEvent *event);
+ Q_REVISION(2, 1) void hoveredChanged();
+ Q_REVISION(2, 1) void hoverEnabledChanged();
// 2.5 (Qt 5.12)
- Q_REVISION(5) void placeholderTextColorChanged();
- Q_REVISION(5) void implicitBackgroundWidthChanged();
- Q_REVISION(5) void implicitBackgroundHeightChanged();
- Q_REVISION(5) void topInsetChanged();
- Q_REVISION(5) void leftInsetChanged();
- Q_REVISION(5) void rightInsetChanged();
- Q_REVISION(5) void bottomInsetChanged();
+ Q_REVISION(2, 5) void placeholderTextColorChanged();
+ Q_REVISION(2, 5) void implicitBackgroundWidthChanged();
+ Q_REVISION(2, 5) void implicitBackgroundHeightChanged();
+ Q_REVISION(2, 5) void topInsetChanged();
+ Q_REVISION(2, 5) void leftInsetChanged();
+ Q_REVISION(2, 5) void rightInsetChanged();
+ Q_REVISION(2, 5) void bottomInsetChanged();
protected:
friend struct QQuickPressHandler;
@@ -178,6 +180,14 @@ private:
Q_DECLARE_PRIVATE(QQuickTextField)
};
+struct QQuickTextFieldForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_FOREIGN(QQuickTextInput)
+ QML_ADDED_IN_VERSION(2, 2)
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickTextField)
diff --git a/src/quicktemplates2/qquicktoolbar_p.h b/src/quicktemplates2/qquicktoolbar_p.h
index 631f553e..cefdeaa1 100644
--- a/src/quicktemplates2/qquicktoolbar_p.h
+++ b/src/quicktemplates2/qquicktoolbar_p.h
@@ -58,6 +58,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolBar : public QQuickPane
{
Q_OBJECT
Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL)
+ QML_NAMED_ELEMENT(ToolBar)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickToolBar(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktoolbutton_p.h b/src/quicktemplates2/qquicktoolbutton_p.h
index c8d70aef..2db052f6 100644
--- a/src/quicktemplates2/qquicktoolbutton_p.h
+++ b/src/quicktemplates2/qquicktoolbutton_p.h
@@ -57,6 +57,8 @@ class QQuickToolButtonPrivate;
class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolButton : public QQuickButton
{
Q_OBJECT
+ QML_NAMED_ELEMENT(ToolButton)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickToolButton(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktoolseparator_p.h b/src/quicktemplates2/qquicktoolseparator_p.h
index 30bcf7df..e4692154 100644
--- a/src/quicktemplates2/qquicktoolseparator_p.h
+++ b/src/quicktemplates2/qquicktoolseparator_p.h
@@ -60,6 +60,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolSeparator : public QQuickContro
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL)
Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL)
+ QML_NAMED_ELEMENT(ToolSeparator)
+ QML_ADDED_IN_VERSION(2, 1)
public:
explicit QQuickToolSeparator(QQuickItem *parent = nullptr);
diff --git a/src/quicktemplates2/qquicktooltip_p.h b/src/quicktemplates2/qquicktooltip_p.h
index a143452d..5be22fd8 100644
--- a/src/quicktemplates2/qquicktooltip_p.h
+++ b/src/quicktemplates2/qquicktooltip_p.h
@@ -62,6 +62,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickToolTip : public QQuickPopup
Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL)
Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged FINAL)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
+ QML_NAMED_ELEMENT(ToolTip)
+ QML_ATTACHED(QQuickToolTipAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickToolTip(QQuickItem *parent = nullptr);
@@ -85,8 +88,8 @@ Q_SIGNALS:
void timeoutChanged();
public Q_SLOTS:
- Q_REVISION(5) void show(const QString &text, int ms = -1);
- Q_REVISION(5) void hide();
+ Q_REVISION(2, 5) void show(const QString &text, int ms = -1);
+ Q_REVISION(2, 5) void hide();
protected:
QFont defaultFont() const override;
diff --git a/src/quicktemplates2/qquicktumbler_p.h b/src/quicktemplates2/qquicktumbler_p.h
index 046e8b8c..f9d5a13b 100644
--- a/src/quicktemplates2/qquicktumbler_p.h
+++ b/src/quicktemplates2/qquicktumbler_p.h
@@ -67,9 +67,12 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumbler : public QQuickControl
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
Q_PROPERTY(int visibleItemCount READ visibleItemCount WRITE setVisibleItemCount NOTIFY visibleItemCountChanged FINAL)
// 2.1 (Qt 5.8)
- Q_PROPERTY(bool wrap READ wrap WRITE setWrap RESET resetWrap NOTIFY wrapChanged FINAL REVISION 1)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap RESET resetWrap NOTIFY wrapChanged FINAL REVISION(2, 1))
// 2.2 (Qt 5.9)
- Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged FINAL REVISION 2)
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged FINAL REVISION(2, 2))
+ QML_NAMED_ELEMENT(Tumbler)
+ QML_ATTACHED(QQuickTumblerAttached)
+ QML_ADDED_IN_VERSION(2, 0)
public:
explicit QQuickTumbler(QQuickItem *parent = nullptr);
@@ -111,7 +114,7 @@ public:
Q_ENUM(PositionMode)
// 2.5 (Qt 5.12)
- Q_REVISION(5) Q_INVOKABLE void positionViewAtIndex(int index, PositionMode mode);
+ Q_REVISION(2, 5) Q_INVOKABLE void positionViewAtIndex(int index, PositionMode mode);
Q_SIGNALS:
void modelChanged();
@@ -121,9 +124,9 @@ Q_SIGNALS:
void delegateChanged();
void visibleItemCountChanged();
// 2.1 (Qt 5.8)
- Q_REVISION(1) void wrapChanged();
+ Q_REVISION(2, 1) void wrapChanged();
// 2.2 (Qt 5.9)
- Q_REVISION(2) void movingChanged();
+ Q_REVISION(2, 2) void movingChanged();
protected:
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
diff --git a/src/quicktemplates2/qtquicktemplates2global_p.h b/src/quicktemplates2/qtquicktemplates2global_p.h
index e5ee3f2e..37d81888 100644
--- a/src/quicktemplates2/qtquicktemplates2global_p.h
+++ b/src/quicktemplates2/qtquicktemplates2global_p.h
@@ -66,4 +66,6 @@ QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
+Q_QUICKTEMPLATES2_PRIVATE_EXPORT void qml_register_types_QtQuick_Templates();
+
#endif // QTQUICKTEMPLATES2GLOBAL_P_H
diff --git a/src/quicktemplates2/quicktemplates2.pro b/src/quicktemplates2/quicktemplates2.pro
index 8ed0151a..3567923e 100644
--- a/src/quicktemplates2/quicktemplates2.pro
+++ b/src/quicktemplates2/quicktemplates2.pro
@@ -12,3 +12,9 @@ HEADERS += \
include(quicktemplates2.pri)
load(qt_module)
+
+QMLTYPES_FILENAME = plugins.qmltypes
+QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Templates
+QML_IMPORT_NAME = QtQuick.Templates
+QML_IMPORT_VERSION = 2.15
+CONFIG += qmltypes install_qmltypes install_metatypes
diff --git a/src/src.pro b/src/src.pro
index 7f945ffb..b6d3b850 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -2,7 +2,9 @@ TEMPLATE = subdirs
SUBDIRS += \
quicktemplates2 \
quickcontrols2 \
+ quickcontrols2impl \
imports
quickcontrols2.depends = quicktemplates2
-imports.depends = quickcontrols2 quicktemplates2
+quickcontrols2impl.depends = quicktemplates2
+imports.depends = quicktemplates2 quickcontrols2 quickcontrols2impl