diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-10-16 12:04:15 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-11-11 16:51:44 +0100 |
commit | 97cb0ef9c45ceaf89189540dd740382ce32e2618 (patch) | |
tree | c497fe5a4ea90cce4cd1cf779fd17c588679669d | |
parent | e2b87dda1fe4e8e22ea4231971085f4cd4852843 (diff) |
Register native styles under 2.0 in addition to 6.0
Since we changed the logic that decides the default style, users with
QML that imports 2.x versions of QtQuick.Controls will get errors if
the default style that is chosen is a native style:
qrc:/main.qml:53:1: module "QtQuick.Controls.macOS" version 2.15 is not installed
qrc:/main.qml: Failed to load dependencies for module "QtQuick.Controls" version 2.15
We use PAST_MAJOR_VERSIONS to register the module for 2.x, and not
just 6.0, and register the types of those styles under version 2.0
in addition to 6.0. This should not cause any problems for existing
QML code.
Fixes: QTBUG-87658
Change-Id: I976078c0aea3fbebe4e04f5ba4d8056c0ca7a0e6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/imports/controls/macos/.prev_CMakeLists.txt | 30 | ||||
-rw-r--r-- | src/imports/controls/macos/CMakeLists.txt | 32 | ||||
-rw-r--r-- | src/imports/controls/macos/macos.pro | 1 | ||||
-rw-r--r-- | src/imports/controls/macos/qmldir | 14 | ||||
-rw-r--r-- | src/imports/controls/windows/.prev_CMakeLists.txt | 28 | ||||
-rw-r--r-- | src/imports/controls/windows/CMakeLists.txt | 28 | ||||
-rw-r--r-- | src/imports/controls/windows/qmldir | 13 | ||||
-rw-r--r-- | src/imports/controls/windows/windows.pro | 1 | ||||
-rw-r--r-- | src/imports/nativestyle/CMakeLists.txt | 28 | ||||
-rw-r--r-- | src/imports/nativestyle/nativestyle.pro | 1 | ||||
-rw-r--r-- | src/imports/nativestyle/qmldir | 13 |
11 files changed, 121 insertions, 68 deletions
diff --git a/src/imports/controls/macos/.prev_CMakeLists.txt b/src/imports/controls/macos/.prev_CMakeLists.txt index 97b29823..4d0b7653 100644 --- a/src/imports/controls/macos/.prev_CMakeLists.txt +++ b/src/imports/controls/macos/.prev_CMakeLists.txt @@ -10,6 +10,7 @@ qt_internal_add_qml_module(qtquickcontrols2macosstyleplugin CLASSNAME QtQuickControls2MacOSStylePlugin IMPORTS QtQuick.Controls.Fusion/auto + PAST_MAJOR_VERSIONS 2 GENERATE_QMLTYPES INSTALL_QMLTYPES SOURCES @@ -37,6 +38,7 @@ qt_internal_add_qml_module(qtquickcontrols2macosstyleplugin # OTHER_FILES = "qmldir" "$$QML_FILES" # QML_IMPORT_NAME = "QtQuick.Controls.macOS" # QML_IMPORT_VERSION = "$$QT_VERSION" +# QML_PAST_MAJOR_VERSIONS = "2" # TARGETPATH = "QtQuick/Controls/macOS" # _REQUIREMENTS = "qtConfig(quickcontrols2-macos)" @@ -57,46 +59,46 @@ set(qml_files "Dial.qml" ) set_source_files_properties(Button.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Slider.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(GroupBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(CheckBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RadioButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SpinBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextField.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Frame.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextArea.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ComboBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollView.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ProgressBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Dial.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) qt6_target_qml_files(qtquickcontrols2macosstyleplugin diff --git a/src/imports/controls/macos/CMakeLists.txt b/src/imports/controls/macos/CMakeLists.txt index f00f7c5c..4d0b7653 100644 --- a/src/imports/controls/macos/CMakeLists.txt +++ b/src/imports/controls/macos/CMakeLists.txt @@ -6,10 +6,11 @@ qt_internal_add_qml_module(qtquickcontrols2macosstyleplugin URI "QtQuick.Controls.macOS" - VERSION "6.0" # special case + VERSION "${CMAKE_PROJECT_VERSION}" CLASSNAME QtQuickControls2MacOSStylePlugin IMPORTS QtQuick.Controls.Fusion/auto + PAST_MAJOR_VERSIONS 2 GENERATE_QMLTYPES INSTALL_QMLTYPES SOURCES @@ -37,6 +38,7 @@ qt_internal_add_qml_module(qtquickcontrols2macosstyleplugin # OTHER_FILES = "qmldir" "$$QML_FILES" # QML_IMPORT_NAME = "QtQuick.Controls.macOS" # QML_IMPORT_VERSION = "$$QT_VERSION" +# QML_PAST_MAJOR_VERSIONS = "2" # TARGETPATH = "QtQuick/Controls/macOS" # _REQUIREMENTS = "qtConfig(quickcontrols2-macos)" @@ -57,46 +59,46 @@ set(qml_files "Dial.qml" ) set_source_files_properties(Button.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Slider.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(GroupBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(CheckBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RadioButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SpinBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextField.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Frame.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextArea.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ComboBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollView.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ProgressBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Dial.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) qt6_target_qml_files(qtquickcontrols2macosstyleplugin diff --git a/src/imports/controls/macos/macos.pro b/src/imports/controls/macos/macos.pro index a190a6d2..40f8bb40 100644 --- a/src/imports/controls/macos/macos.pro +++ b/src/imports/controls/macos/macos.pro @@ -3,6 +3,7 @@ TARGETPATH = QtQuick/Controls/macOS QML_IMPORT_NAME = QtQuick.Controls.macOS QML_IMPORT_VERSION = $$QT_VERSION +QML_PAST_MAJOR_VERSIONS = 2 QT += qml quick quickcontrols2 quicktemplates2 QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private diff --git a/src/imports/controls/macos/qmldir b/src/imports/controls/macos/qmldir index 43130514..2d6083de 100644 --- a/src/imports/controls/macos/qmldir +++ b/src/imports/controls/macos/qmldir @@ -3,17 +3,31 @@ plugin qtquickcontrols2macosstyleplugin classname QtQuickControls2MacOSStylePlugin import QtQuick.Controls.Fusion auto +Button 2.0 Button.qml Button 6.0 Button.qml +CheckBox 2.0 CheckBox.qml CheckBox 6.0 CheckBox.qml +RadioButton 2.0 RadioButton.qml RadioButton 6.0 RadioButton.qml +Slider 2.0 Slider.qml Slider 6.0 Slider.qml +GroupBox 2.0 GroupBox.qml GroupBox 6.0 GroupBox.qml +SpinBox 2.0 SpinBox.qml SpinBox 6.0 SpinBox.qml +TextField 2.0 TextField.qml TextField 6.0 TextField.qml +Frame 2.0 Frame.qml Frame 6.0 Frame.qml +TextArea 2.0 TextArea.qml TextArea 6.0 TextArea.qml +ComboBox 2.0 ComboBox.qml ComboBox 6.0 ComboBox.qml +ScrollView 2.0 ScrollView.qml ScrollView 6.0 ScrollView.qml +ScrollBar 2.0 ScrollBar.qml ScrollBar 6.0 ScrollBar.qml +ProgressBar 2.0 ProgressBar.qml ProgressBar 6.0 ProgressBar.qml +Dial 2.0 Dial.qml Dial 6.0 Dial.qml diff --git a/src/imports/controls/windows/.prev_CMakeLists.txt b/src/imports/controls/windows/.prev_CMakeLists.txt index 64e54338..cd0b338a 100644 --- a/src/imports/controls/windows/.prev_CMakeLists.txt +++ b/src/imports/controls/windows/.prev_CMakeLists.txt @@ -10,6 +10,7 @@ qt_internal_add_qml_module(qtquickcontrols2windowsstyleplugin CLASSNAME QtQuickControls2WindowsStylePlugin IMPORTS QtQuick.Controls.Fusion/auto + PAST_MAJOR_VERSIONS 2 GENERATE_QMLTYPES INSTALL_QMLTYPES SOURCES @@ -37,6 +38,7 @@ qt_internal_add_qml_module(qtquickcontrols2windowsstyleplugin # OTHER_FILES = "qmldir" "$$QML_FILES" # QML_IMPORT_NAME = "QtQuick.Controls.Windows" # QML_IMPORT_VERSION = "$$QT_VERSION" +# QML_PAST_MAJOR_VERSIONS = "2" # TARGETPATH = "QtQuick/Controls/Windows" # _REQUIREMENTS = "qtConfig(quickcontrols2-windows)" @@ -56,43 +58,43 @@ set(qml_files "ScrollView.qml" ) set_source_files_properties(Button.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(CheckBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ComboBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Frame.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(GroupBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ProgressBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RadioButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Slider.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SpinBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextArea.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextField.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollView.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) qt6_target_qml_files(qtquickcontrols2windowsstyleplugin diff --git a/src/imports/controls/windows/CMakeLists.txt b/src/imports/controls/windows/CMakeLists.txt index 2ccc3e9e..ef838134 100644 --- a/src/imports/controls/windows/CMakeLists.txt +++ b/src/imports/controls/windows/CMakeLists.txt @@ -10,6 +10,7 @@ qt_internal_add_qml_module(qtquickcontrols2windowsstyleplugin CLASSNAME QtQuickControls2WindowsStylePlugin IMPORTS QtQuick.Controls.Fusion/auto + PAST_MAJOR_VERSIONS 2 GENERATE_QMLTYPES INSTALL_QMLTYPES SOURCES @@ -37,6 +38,7 @@ qt_internal_add_qml_module(qtquickcontrols2windowsstyleplugin # OTHER_FILES = "qmldir" "$$QML_FILES" # QML_IMPORT_NAME = "QtQuick.Controls.Windows" # QML_IMPORT_VERSION = "$$QT_VERSION" +# QML_PAST_MAJOR_VERSIONS = "2" # TARGETPATH = "QtQuick/Controls/Windows" # _REQUIREMENTS = "qtConfig(quickcontrols2-windows)" @@ -56,43 +58,43 @@ set(qml_files "ScrollView.qml" ) set_source_files_properties(Button.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(CheckBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ComboBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Frame.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(GroupBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ProgressBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(RadioButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(Slider.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(SpinBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextArea.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(TextField.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(ScrollView.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) qt6_target_qml_files(qtquickcontrols2windowsstyleplugin diff --git a/src/imports/controls/windows/qmldir b/src/imports/controls/windows/qmldir index bc87455d..dc2c37db 100644 --- a/src/imports/controls/windows/qmldir +++ b/src/imports/controls/windows/qmldir @@ -3,16 +3,29 @@ plugin qtquickcontrols2windowsstyleplugin classname QtQuickControls2WindowsStylePlugin import QtQuick.Controls.Fusion auto +Button 2.0 Button.qml Button 6.0 Button.qml +CheckBox 2.0 CheckBox.qml CheckBox 6.0 CheckBox.qml +RadioButton 2.0 RadioButton.qml RadioButton 6.0 RadioButton.qml +Slider 2.0 Slider.qml Slider 6.0 Slider.qml +GroupBox 2.0 GroupBox.qml GroupBox 6.0 GroupBox.qml +SpinBox 2.0 SpinBox.qml SpinBox 6.0 SpinBox.qml +TextField 2.0 TextField.qml TextField 6.0 TextField.qml +Frame 2.0 Frame.qml Frame 6.0 Frame.qml +TextArea 2.0 TextArea.qml TextArea 6.0 TextArea.qml +ComboBox 2.0 ComboBox.qml ComboBox 6.0 ComboBox.qml +ProgressBar 2.0 ProgressBar.qml ProgressBar 6.0 ProgressBar.qml +ScrollBar 2.0 ScrollBar.qml ScrollBar 6.0 ScrollBar.qml +ScrollView 2.0 ScrollView.qml ScrollView 6.0 ScrollView.qml diff --git a/src/imports/controls/windows/windows.pro b/src/imports/controls/windows/windows.pro index a72397d7..14ce2402 100644 --- a/src/imports/controls/windows/windows.pro +++ b/src/imports/controls/windows/windows.pro @@ -3,6 +3,7 @@ TARGETPATH = QtQuick/Controls/Windows QML_IMPORT_NAME = QtQuick.Controls.Windows QML_IMPORT_VERSION = $$QT_VERSION +QML_PAST_MAJOR_VERSIONS = 2 QT += qml quick quickcontrols2 quicktemplates2 QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private diff --git a/src/imports/nativestyle/CMakeLists.txt b/src/imports/nativestyle/CMakeLists.txt index e7403242..6c7c27fd 100644 --- a/src/imports/nativestyle/CMakeLists.txt +++ b/src/imports/nativestyle/CMakeLists.txt @@ -10,6 +10,7 @@ qt_internal_add_qml_module(qtquickcontrols2nativestyleplugin CLASSNAME QtQuickControls2NativeStylePlugin DEPENDENCIES QtQuick.Controls/2.5 + PAST_MAJOR_VERSIONS 2 GENERATE_QMLTYPES INSTALL_QMLTYPES SOURCES @@ -61,6 +62,7 @@ qt_internal_add_qml_module(qtquickcontrols2nativestyleplugin # OTHER_FILES = "qmldir" "$$QML_FILES" # QML_IMPORT_MAJOR_VERSION = "6" # QML_IMPORT_NAME = "QtQuick.NativeStyle" +# QML_PAST_MAJOR_VERSIONS = "2" # TARGETPATH = "QtQuick/NativeStyle" # _REQUIREMENTS = "qtConfig(quickcontrols2-macos)|qtConfig(quickcontrols2-windows)" @@ -122,43 +124,43 @@ set(qml_files "controls/DefaultDial.qml" ) set_source_files_properties(controls/DefaultButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultSlider.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultGroupBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultCheckBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultRadioButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultSpinBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultTextField.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultFrame.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultTextArea.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultComboBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultScrollBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultProgressBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) set_source_files_properties(controls/DefaultDial.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.0" + QT_QML_SOURCE_VERSION "2.0;6.0" ) qt6_target_qml_files(qtquickcontrols2nativestyleplugin diff --git a/src/imports/nativestyle/nativestyle.pro b/src/imports/nativestyle/nativestyle.pro index c493080a..cf94b0d0 100644 --- a/src/imports/nativestyle/nativestyle.pro +++ b/src/imports/nativestyle/nativestyle.pro @@ -3,6 +3,7 @@ TARGETPATH = QtQuick/NativeStyle QML_IMPORT_NAME = QtQuick.NativeStyle QML_IMPORT_MAJOR_VERSION = 6 +QML_PAST_MAJOR_VERSIONS = 2 QT += qml quick quickcontrols2 quicktemplates2 QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private diff --git a/src/imports/nativestyle/qmldir b/src/imports/nativestyle/qmldir index 3b6ce6c5..4a0f3738 100644 --- a/src/imports/nativestyle/qmldir +++ b/src/imports/nativestyle/qmldir @@ -3,16 +3,29 @@ plugin qtquickcontrols2nativestyleplugin classname QtQuickControls2NativeStylePlugin depends QtQuick.Controls 2.5 +DefaultButton 2.0 controls/DefaultButton.qml DefaultButton 6.0 controls/DefaultButton.qml +DefaultCheckBox 2.0 controls/DefaultCheckBox.qml DefaultCheckBox 6.0 controls/DefaultCheckBox.qml +DefaultRadioButton 2.0 controls/DefaultRadioButton.qml DefaultRadioButton 6.0 controls/DefaultRadioButton.qml +DefaultSlider 2.0 controls/DefaultSlider.qml DefaultSlider 6.0 controls/DefaultSlider.qml +DefaultGroupBox 2.0 controls/DefaultGroupBox.qml DefaultGroupBox 6.0 controls/DefaultGroupBox.qml +DefaultSpinBox 2.0 controls/DefaultSpinBox.qml DefaultSpinBox 6.0 controls/DefaultSpinBox.qml +DefaultTextField 2.0 controls/DefaultTextField.qml DefaultTextField 6.0 controls/DefaultTextField.qml +DefaultFrame 2.0 controls/DefaultFrame.qml DefaultFrame 6.0 controls/DefaultFrame.qml +DefaultTextArea 2.0 controls/DefaultTextArea.qml DefaultTextArea 6.0 controls/DefaultTextArea.qml +DefaultComboBox 2.0 controls/DefaultComboBox.qml DefaultComboBox 6.0 controls/DefaultComboBox.qml +DefaultScrollBar 2.0 controls/DefaultScrollBar.qml DefaultScrollBar 6.0 controls/DefaultScrollBar.qml +DefaultProgressBar 2.0 controls/DefaultProgressBar.qml DefaultProgressBar 6.0 controls/DefaultProgressBar.qml +DefaultDial 2.0 controls/DefaultDial.qml DefaultDial 6.0 controls/DefaultDial.qml |