From b46a0e8e1ddc24636e4d09cb0469db9298ff6ddc Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Mon, 28 Aug 2023 17:25:01 +0200 Subject: [PATCH] QmlDesigner: Fix MCUDefaultStyle usage via wizard Task-number: QDS-10420 Change-Id: Icef96452c1f7c84accc95b67f3e0b2044e8416c4 Reviewed-by: Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Patch Build Bot --- .../application-mcu/MCUDefaultStyle/Button.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/CheckBox.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/DefaultStyle.qml | 4 ++-- .../application-mcu/MCUDefaultStyle/Dial.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/ProgressBar.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/RadioButton.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/Slider.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/SwipeView.qml | 6 +++--- .../application-mcu/MCUDefaultStyle/Switch.qml | 6 +++--- .../projects/application-mcu/MCUDefaultStyle/qmldir | 12 +++++++++++- .../projects/application-mcu/wizard.json | 2 +- 11 files changed, 38 insertions(+), 28 deletions(-) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Button.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Button.qml index 46d69cea6e8..e8be964890e 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Button.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Button.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.Button { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/CheckBox.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/CheckBox.qml index 9fe6da21f88..e86da1c485d 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/CheckBox.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/CheckBox.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.CheckBox { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/DefaultStyle.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/DefaultStyle.qml index d1a753fdfef..08437b53fad 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/DefaultStyle.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/DefaultStyle.qml @@ -1,9 +1,9 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause pragma Singleton -import QtQuick 2.15 +import QtQuick QtObject { readonly property int inset: 5 diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Dial.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Dial.qml index 2ab36330c01..bcb2af25134 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Dial.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Dial.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.Dial { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/ProgressBar.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/ProgressBar.qml index 95d2bda9317..5908f115842 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/ProgressBar.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/ProgressBar.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.ProgressBar { id: root diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/RadioButton.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/RadioButton.qml index 8033332d923..f182a82421a 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/RadioButton.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/RadioButton.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.RadioButton { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Slider.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Slider.qml index eaf58a3804c..db7a8bc8e97 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Slider.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Slider.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.Slider { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/SwipeView.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/SwipeView.qml index ed091e6662f..90065ac0ce5 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/SwipeView.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/SwipeView.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.SwipeView { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Switch.qml b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Switch.qml index 7186b4a7eba..e614c746df5 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Switch.qml +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/Switch.qml @@ -1,8 +1,8 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.15 -import QtQuick.Templates 2.15 as T +import QtQuick +import QtQuick.Templates as T T.Switch { id: control diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/qmldir b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/qmldir index 6992d7ae4a3..b29eb8fbf91 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/qmldir +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/MCUDefaultStyle/qmldir @@ -1,2 +1,12 @@ module QtQuick.Controls.MCUDefaultStyle -singleton DefaultStyle 1.0 DefaultStyle.qml +import QtQuick.Controls.Basic auto +depends QtQuick auto +singleton DefaultStyle 6.0 DefaultStyle.qml +Button 6.0 Button.qml +CheckBox 6.0 CheckBox.qml +Dial 6.0 Dial.qml +ProgressBar 6.0 ProgressBar.qml +RadioButton 6.0 RadioButton.qml +Slider 6.0 Slider.qml +SwipeView 6.0 SwipeView.qml +Switch 6.0 Switch.qml diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json index 959d3f495c2..5c27a294467 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json @@ -183,7 +183,7 @@ }, { "source": "MCUDefaultStyle", - "target": "%{ProjectDirectory}/MCUDefaultStyle" + "target": "%{ProjectDirectory}/imports/MCUDefaultStyle" }, { "isBinary": true,