From bcdd38074be6828db41396bd3c0ec601993ed59b Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 12 Dec 2019 13:27:02 +0100 Subject: clang-tidy: fix cppcoreguidelines-pro-type-member-init Ensure that all members are initialized and remove an unused member. Change-Id: Ibfb3ea86b7791cd6f8683b68e7cd3bc4256b33f7 Reviewed-by: Shawn Rutledge --- examples/quickcontrols2/texteditor/documenthandler.h | 1 - 1 file changed, 1 deletion(-) (limited to 'examples') diff --git a/examples/quickcontrols2/texteditor/documenthandler.h b/examples/quickcontrols2/texteditor/documenthandler.h index 97e55658..1a34f0e0 100644 --- a/examples/quickcontrols2/texteditor/documenthandler.h +++ b/examples/quickcontrols2/texteditor/documenthandler.h @@ -170,7 +170,6 @@ private: int m_selectionEnd; QFont m_font; - int m_fontSize; QUrl m_fileUrl; }; -- cgit v1.2.3 From 492586930b4edbee5a8ab13de3fead9efa1b3e38 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 9 Jan 2020 11:33:12 +0100 Subject: Gallery example: Add "Help" menu and shortcut Add a property "control" identifying the control to be demo-ed to the page and add a help shortcut and menu item displaying its help. Change-Id: Ic3c7c31f5a44fccd57ee018fd3681dc6bdffee58 Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Paul Wicking Reviewed-by: Venugopal Shivashankar --- examples/quickcontrols2/gallery/gallery.qml | 18 ++++++++++++++++++ .../quickcontrols2/gallery/pages/BusyIndicatorPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/ButtonPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/CheckBoxPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/ComboBoxPage.qml | 2 ++ .../quickcontrols2/gallery/pages/DelayButtonPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/DelegatePage.qml | 2 ++ examples/quickcontrols2/gallery/pages/DialPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/DialogPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/FramePage.qml | 2 ++ examples/quickcontrols2/gallery/pages/GroupBoxPage.qml | 2 ++ .../quickcontrols2/gallery/pages/PageIndicatorPage.qml | 2 ++ .../quickcontrols2/gallery/pages/ProgressBarPage.qml | 2 ++ .../quickcontrols2/gallery/pages/RadioButtonPage.qml | 2 ++ .../quickcontrols2/gallery/pages/RangeSliderPage.qml | 2 ++ .../quickcontrols2/gallery/pages/ScrollBarPage.qml | 2 ++ .../gallery/pages/ScrollIndicatorPage.qml | 2 ++ .../quickcontrols2/gallery/pages/ScrollablePage.qml | 2 ++ examples/quickcontrols2/gallery/pages/SliderPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/SpinBoxPage.qml | 2 ++ .../quickcontrols2/gallery/pages/StackViewPage.qml | 2 ++ .../quickcontrols2/gallery/pages/SwipeViewPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/SwitchPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/TabBarPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/TextAreaPage.qml | 2 ++ .../quickcontrols2/gallery/pages/TextFieldPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/ToolTipPage.qml | 2 ++ examples/quickcontrols2/gallery/pages/TumblerPage.qml | 2 ++ 28 files changed, 72 insertions(+) (limited to 'examples') diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index 44987ada..95fc739f 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -62,6 +62,15 @@ ApplicationWindow { visible: true title: "Qt Quick Controls 2" + function help() + { + var url = "https://doc.qt.io/qt-5/" + + (stackView.depth > 1 + ? "qml-qtquick-controls2-" + stackView.currentItem.control + ".html" + : "qtquick-controls2-qmlmodule.html"); + Qt.openUrlExternally(url) + } + Settings { id: settings property string style: "Default" @@ -73,6 +82,11 @@ ApplicationWindow { onActivated: navigateBackAction.trigger() } + Shortcut { + sequence: StandardKey.HelpContents + onActivated: help() + } + Action { id: navigateBackAction icon.name: stackView.depth > 1 ? "back" : "drawer" @@ -130,6 +144,10 @@ ApplicationWindow { text: "Settings" onTriggered: settingsDialog.open() } + Action { + text: "Help" + onTriggered: help() + } Action { text: "About" onTriggered: aboutDialog.open() diff --git a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml index b0aa6284..504993f2 100644 --- a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "busyindicator" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ButtonPage.qml b/examples/quickcontrols2/gallery/pages/ButtonPage.qml index c77b41e4..dce39203 100644 --- a/examples/quickcontrols2/gallery/pages/ButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/ButtonPage.qml @@ -55,6 +55,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "button" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml index 7795f814..ac1ed4b7 100644 --- a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "checkbox" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml index ec75607c..b194da7f 100644 --- a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "combobox" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml b/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml index 91110567..ea73e6a7 100644 --- a/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + property string control : "delaybutton" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/DelegatePage.qml b/examples/quickcontrols2/gallery/pages/DelegatePage.qml index 30f07be1..4c3f0333 100644 --- a/examples/quickcontrols2/gallery/pages/DelegatePage.qml +++ b/examples/quickcontrols2/gallery/pages/DelegatePage.qml @@ -55,6 +55,8 @@ import QtQuick.Controls 2.12 Pane { padding: 0 + property string control : "swipedelegate" + property var delegateComponentMap: { "ItemDelegate": itemDelegateComponent, "SwipeDelegate": swipeDelegateComponent, diff --git a/examples/quickcontrols2/gallery/pages/DialPage.qml b/examples/quickcontrols2/gallery/pages/DialPage.qml index 3bb3bb28..8372d56f 100644 --- a/examples/quickcontrols2/gallery/pages/DialPage.qml +++ b/examples/quickcontrols2/gallery/pages/DialPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "dial" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/DialogPage.qml b/examples/quickcontrols2/gallery/pages/DialogPage.qml index 9d23e260..167fa186 100644 --- a/examples/quickcontrols2/gallery/pages/DialogPage.qml +++ b/examples/quickcontrols2/gallery/pages/DialogPage.qml @@ -55,6 +55,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "dialog" + readonly property int buttonWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, page.availableWidth / 3)) Column { diff --git a/examples/quickcontrols2/gallery/pages/FramePage.qml b/examples/quickcontrols2/gallery/pages/FramePage.qml index 4834d04d..5d4b2f7b 100644 --- a/examples/quickcontrols2/gallery/pages/FramePage.qml +++ b/examples/quickcontrols2/gallery/pages/FramePage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "frame" + readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 3, page.availableWidth / 3 * 2)) Column { diff --git a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml index 16f8762a..41f115a7 100644 --- a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "groupbox" + readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 3, page.availableWidth / 3 * 2)) Column { diff --git a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml index 4f13ce33..dd0d3e9c 100644 --- a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "pageindicator" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml index 1f3c81b9..89b951ee 100644 --- a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "progressbar" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml index b573731e..9685426e 100644 --- a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "radiobutton" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml index b6c35766..d04e7cb4 100644 --- a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "rangeslider" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml index d9e77fa4..8ebf65ac 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 Flickable { id: flickable + readonly property string control : "scrollbar" + contentHeight: pane.height Pane { diff --git a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml index 2adcbc6b..4aa641a8 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 Flickable { id: flickable + readonly property string control : "scrollindicator" + contentHeight: pane.height Pane { diff --git a/examples/quickcontrols2/gallery/pages/ScrollablePage.qml b/examples/quickcontrols2/gallery/pages/ScrollablePage.qml index afb5ef5c..2d525cf6 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollablePage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollablePage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 Page { id: page + readonly property string control : "flickable" + default property alias content: pane.contentItem Flickable { diff --git a/examples/quickcontrols2/gallery/pages/SliderPage.qml b/examples/quickcontrols2/gallery/pages/SliderPage.qml index 93a1ebb1..9a2f3baf 100644 --- a/examples/quickcontrols2/gallery/pages/SliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/SliderPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "slider" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml index 9e458331..7ad62caa 100644 --- a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/StackViewPage.qml b/examples/quickcontrols2/gallery/pages/StackViewPage.qml index 43ee5684..d52cf85a 100644 --- a/examples/quickcontrols2/gallery/pages/StackViewPage.qml +++ b/examples/quickcontrols2/gallery/pages/StackViewPage.qml @@ -55,6 +55,8 @@ StackView { id: stackView initialItem: page + readonly property string control : "stackview" + Component { id: page diff --git a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml index 3c3bc56c..c55250e4 100644 --- a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 Pane { id: pane + readonly property string control : "swipeview" + SwipeView { id: view currentIndex: 1 diff --git a/examples/quickcontrols2/gallery/pages/SwitchPage.qml b/examples/quickcontrols2/gallery/pages/SwitchPage.qml index 53ee1660..9e3f03f8 100644 --- a/examples/quickcontrols2/gallery/pages/SwitchPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwitchPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "switch" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/TabBarPage.qml b/examples/quickcontrols2/gallery/pages/TabBarPage.qml index 7c3cae44..1bfda1c1 100644 --- a/examples/quickcontrols2/gallery/pages/TabBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/TabBarPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 Page { id: page + readonly property string control : "tabbar" + SwipeView { id: swipeView anchors.fill: parent diff --git a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml index 7ed2b58b..4a6d25e7 100644 --- a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml +++ b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "textarea" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml index 37a5d605..527f7a64 100644 --- a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml +++ b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "textfield" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml index 295ea2c4..fea05551 100644 --- a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml +++ b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "tooltip" + Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/TumblerPage.qml b/examples/quickcontrols2/gallery/pages/TumblerPage.qml index af4caee3..a7c95d21 100644 --- a/examples/quickcontrols2/gallery/pages/TumblerPage.qml +++ b/examples/quickcontrols2/gallery/pages/TumblerPage.qml @@ -54,6 +54,8 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page + readonly property string control : "tumbler" + Column { spacing: 40 width: parent.width -- cgit v1.2.3 From b7bbde88d0e38b8e3635c5dd0ff3cf3075f1047e Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 28 Jan 2020 13:59:11 +0100 Subject: Gallery: simplify the code for the help feature Use existing data from the model rather than adding new properties. Change-Id: I77f9b079d4ceefd1a0b9936b4250c2470c68836e Reviewed-by: Friedemann Kleint --- examples/quickcontrols2/gallery/gallery.qml | 12 +++++++----- examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml | 2 -- examples/quickcontrols2/gallery/pages/ButtonPage.qml | 2 -- examples/quickcontrols2/gallery/pages/CheckBoxPage.qml | 2 -- examples/quickcontrols2/gallery/pages/ComboBoxPage.qml | 2 -- examples/quickcontrols2/gallery/pages/DelayButtonPage.qml | 2 -- examples/quickcontrols2/gallery/pages/DelegatePage.qml | 2 -- examples/quickcontrols2/gallery/pages/DialPage.qml | 2 -- examples/quickcontrols2/gallery/pages/DialogPage.qml | 2 -- examples/quickcontrols2/gallery/pages/FramePage.qml | 2 -- examples/quickcontrols2/gallery/pages/GroupBoxPage.qml | 2 -- examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml | 2 -- examples/quickcontrols2/gallery/pages/ProgressBarPage.qml | 2 -- examples/quickcontrols2/gallery/pages/RadioButtonPage.qml | 2 -- examples/quickcontrols2/gallery/pages/RangeSliderPage.qml | 2 -- examples/quickcontrols2/gallery/pages/ScrollBarPage.qml | 2 -- .../quickcontrols2/gallery/pages/ScrollIndicatorPage.qml | 2 -- examples/quickcontrols2/gallery/pages/ScrollablePage.qml | 2 -- examples/quickcontrols2/gallery/pages/SliderPage.qml | 2 -- examples/quickcontrols2/gallery/pages/SpinBoxPage.qml | 2 -- examples/quickcontrols2/gallery/pages/StackViewPage.qml | 2 -- examples/quickcontrols2/gallery/pages/SwipeViewPage.qml | 2 -- examples/quickcontrols2/gallery/pages/SwitchPage.qml | 2 -- examples/quickcontrols2/gallery/pages/TabBarPage.qml | 2 -- examples/quickcontrols2/gallery/pages/TextAreaPage.qml | 2 -- examples/quickcontrols2/gallery/pages/TextFieldPage.qml | 2 -- examples/quickcontrols2/gallery/pages/ToolTipPage.qml | 2 -- examples/quickcontrols2/gallery/pages/TumblerPage.qml | 2 -- 28 files changed, 7 insertions(+), 59 deletions(-) (limited to 'examples') diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index 95fc739f..44090b8a 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -62,11 +62,13 @@ ApplicationWindow { visible: true title: "Qt Quick Controls 2" - function help() - { - var url = "https://doc.qt.io/qt-5/" - + (stackView.depth > 1 - ? "qml-qtquick-controls2-" + stackView.currentItem.control + ".html" + function help() { + let displayingControl = listView.currentIndex !== -1 + let currentControlName = displayingControl + ? listView.model.get(listView.currentIndex).title.toLowerCase() : "" + let url = "https://doc.qt.io/qt-5/" + + (displayingControl + ? "qml-qtquick-controls2-" + currentControlName + ".html" : "qtquick-controls2-qmlmodule.html"); Qt.openUrlExternally(url) } diff --git a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml index 504993f2..b0aa6284 100644 --- a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "busyindicator" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ButtonPage.qml b/examples/quickcontrols2/gallery/pages/ButtonPage.qml index dce39203..c77b41e4 100644 --- a/examples/quickcontrols2/gallery/pages/ButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/ButtonPage.qml @@ -55,8 +55,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "button" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml index ac1ed4b7..7795f814 100644 --- a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "checkbox" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml index b194da7f..ec75607c 100644 --- a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "combobox" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml b/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml index ea73e6a7..91110567 100644 --- a/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - property string control : "delaybutton" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/DelegatePage.qml b/examples/quickcontrols2/gallery/pages/DelegatePage.qml index 4c3f0333..30f07be1 100644 --- a/examples/quickcontrols2/gallery/pages/DelegatePage.qml +++ b/examples/quickcontrols2/gallery/pages/DelegatePage.qml @@ -55,8 +55,6 @@ import QtQuick.Controls 2.12 Pane { padding: 0 - property string control : "swipedelegate" - property var delegateComponentMap: { "ItemDelegate": itemDelegateComponent, "SwipeDelegate": swipeDelegateComponent, diff --git a/examples/quickcontrols2/gallery/pages/DialPage.qml b/examples/quickcontrols2/gallery/pages/DialPage.qml index 8372d56f..3bb3bb28 100644 --- a/examples/quickcontrols2/gallery/pages/DialPage.qml +++ b/examples/quickcontrols2/gallery/pages/DialPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "dial" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/DialogPage.qml b/examples/quickcontrols2/gallery/pages/DialogPage.qml index 167fa186..9d23e260 100644 --- a/examples/quickcontrols2/gallery/pages/DialogPage.qml +++ b/examples/quickcontrols2/gallery/pages/DialogPage.qml @@ -55,8 +55,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "dialog" - readonly property int buttonWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, page.availableWidth / 3)) Column { diff --git a/examples/quickcontrols2/gallery/pages/FramePage.qml b/examples/quickcontrols2/gallery/pages/FramePage.qml index 5d4b2f7b..4834d04d 100644 --- a/examples/quickcontrols2/gallery/pages/FramePage.qml +++ b/examples/quickcontrols2/gallery/pages/FramePage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "frame" - readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 3, page.availableWidth / 3 * 2)) Column { diff --git a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml index 41f115a7..16f8762a 100644 --- a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "groupbox" - readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 3, page.availableWidth / 3 * 2)) Column { diff --git a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml index dd0d3e9c..4f13ce33 100644 --- a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "pageindicator" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml index 89b951ee..1f3c81b9 100644 --- a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "progressbar" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml index 9685426e..b573731e 100644 --- a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "radiobutton" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml index d04e7cb4..b6c35766 100644 --- a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "rangeslider" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml index 8ebf65ac..d9e77fa4 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 Flickable { id: flickable - readonly property string control : "scrollbar" - contentHeight: pane.height Pane { diff --git a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml index 4aa641a8..2adcbc6b 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 Flickable { id: flickable - readonly property string control : "scrollindicator" - contentHeight: pane.height Pane { diff --git a/examples/quickcontrols2/gallery/pages/ScrollablePage.qml b/examples/quickcontrols2/gallery/pages/ScrollablePage.qml index 2d525cf6..afb5ef5c 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollablePage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollablePage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 Page { id: page - readonly property string control : "flickable" - default property alias content: pane.contentItem Flickable { diff --git a/examples/quickcontrols2/gallery/pages/SliderPage.qml b/examples/quickcontrols2/gallery/pages/SliderPage.qml index 9a2f3baf..93a1ebb1 100644 --- a/examples/quickcontrols2/gallery/pages/SliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/SliderPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "slider" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml index 7ad62caa..9e458331 100644 --- a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/StackViewPage.qml b/examples/quickcontrols2/gallery/pages/StackViewPage.qml index d52cf85a..43ee5684 100644 --- a/examples/quickcontrols2/gallery/pages/StackViewPage.qml +++ b/examples/quickcontrols2/gallery/pages/StackViewPage.qml @@ -55,8 +55,6 @@ StackView { id: stackView initialItem: page - readonly property string control : "stackview" - Component { id: page diff --git a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml index c55250e4..3c3bc56c 100644 --- a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 Pane { id: pane - readonly property string control : "swipeview" - SwipeView { id: view currentIndex: 1 diff --git a/examples/quickcontrols2/gallery/pages/SwitchPage.qml b/examples/quickcontrols2/gallery/pages/SwitchPage.qml index 9e3f03f8..53ee1660 100644 --- a/examples/quickcontrols2/gallery/pages/SwitchPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwitchPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "switch" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/TabBarPage.qml b/examples/quickcontrols2/gallery/pages/TabBarPage.qml index 1bfda1c1..7c3cae44 100644 --- a/examples/quickcontrols2/gallery/pages/TabBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/TabBarPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 Page { id: page - readonly property string control : "tabbar" - SwipeView { id: swipeView anchors.fill: parent diff --git a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml index 4a6d25e7..7ed2b58b 100644 --- a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml +++ b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "textarea" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml index 527f7a64..37a5d605 100644 --- a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml +++ b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "textfield" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml index fea05551..295ea2c4 100644 --- a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml +++ b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "tooltip" - Column { spacing: 40 width: parent.width diff --git a/examples/quickcontrols2/gallery/pages/TumblerPage.qml b/examples/quickcontrols2/gallery/pages/TumblerPage.qml index a7c95d21..af4caee3 100644 --- a/examples/quickcontrols2/gallery/pages/TumblerPage.qml +++ b/examples/quickcontrols2/gallery/pages/TumblerPage.qml @@ -54,8 +54,6 @@ import QtQuick.Controls 2.12 ScrollablePage { id: page - readonly property string control : "tumbler" - Column { spacing: 40 width: parent.width -- cgit v1.2.3 From 92dc998f6d27347842fd57b0a1c6220426eb9ee2 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 10 Mar 2020 10:40:47 +0100 Subject: Fix build failures as a result of QMetaType changes in qtbase moc now stores the QMetaType of properties as a result of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 in qtbase, which requires full type information about the property type inside the moc generated source file. Many of the property types were forward-declared, and this resulted in build errors like "invalid application of 'sizeof' to an incomplete type 'QQuickTransition'" Make sure to explicitly include the moc files inside the counterpart .cpp files, so that full information is available from included headers. Fixes: QTBUG-82774 Change-Id: I5971713864992398daed72ce9f6ab866668cf8e1 Reviewed-by: Simon Hausmann Reviewed-by: Mitch Curtis --- examples/quickcontrols2/texteditor/documenthandler.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples') diff --git a/examples/quickcontrols2/texteditor/documenthandler.cpp b/examples/quickcontrols2/texteditor/documenthandler.cpp index 5def1b61..e840d411 100644 --- a/examples/quickcontrols2/texteditor/documenthandler.cpp +++ b/examples/quickcontrols2/texteditor/documenthandler.cpp @@ -385,3 +385,5 @@ void DocumentHandler::setModified(bool m) if (m_document) m_document->textDocument()->setModified(m); } + +#include "moc_documenthandler.cpp" -- cgit v1.2.3