aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/ComboBox.qml2
-rw-r--r--src/imports/controls/DialogButtonBox.qml1
-rw-r--r--src/imports/controls/designer/AbstractButtonSection.qml4
-rw-r--r--src/imports/controls/designer/ButtonSection.qml12
-rw-r--r--src/imports/controls/designer/ControlSection.qml4
-rw-r--r--src/imports/controls/designer/DialSpecifics.qml14
-rw-r--r--src/imports/controls/designer/InsetSection.qml119
-rw-r--r--src/imports/controls/designer/LabelSpecifics.qml4
-rw-r--r--src/imports/controls/designer/PageIndicatorSpecifics.qml16
-rw-r--r--src/imports/controls/designer/RangeSliderSpecifics.qml16
-rw-r--r--src/imports/controls/designer/RoundButtonSpecifics.qml5
-rw-r--r--src/imports/controls/designer/SliderSpecifics.qml14
-rw-r--r--src/imports/controls/designer/SpinBoxSpecifics.qml12
-rw-r--r--src/imports/controls/designer/TextAreaSpecifics.qml27
-rw-r--r--src/imports/controls/designer/TextFieldSpecifics.qml27
-rw-r--r--src/imports/controls/designer/designer.pri1
-rw-r--r--src/imports/controls/doc/src/includes/qquickicon.qdocinc2
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc1
-rw-r--r--src/imports/controls/fusion/ComboBox.qml2
-rw-r--r--src/imports/controls/fusion/DialogButtonBox.qml1
-rw-r--r--src/imports/controls/fusion/plugins.qmltypes2
-rw-r--r--src/imports/controls/imagine/ComboBox.qml2
-rw-r--r--src/imports/controls/imagine/DialogButtonBox.qml1
-rw-r--r--src/imports/controls/imagine/GroupBox.qml3
-rw-r--r--src/imports/controls/imagine/plugins.qmltypes14
-rw-r--r--src/imports/controls/imagine/qquickninepatchimage.cpp16
-rw-r--r--src/imports/controls/material/ComboBox.qml12
-rw-r--r--src/imports/controls/material/DialogButtonBox.qml1
-rw-r--r--src/imports/controls/material/material.pro2
-rw-r--r--src/imports/controls/material/plugins.qmltypes3
-rw-r--r--src/imports/controls/material/qmldir2
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp92
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h80
-rw-r--r--src/imports/controls/plugins.qmltypes18
-rw-r--r--src/imports/controls/universal/ComboBox.qml2
-rw-r--r--src/imports/controls/universal/DialogButtonBox.qml1
-rw-r--r--src/imports/controls/universal/plugins.qmltypes2
-rw-r--r--src/imports/platform/platform.pro4
-rw-r--r--src/imports/platform/plugins.qmltypes9
-rw-r--r--src/imports/platform/qquickplatformfiledialog.cpp9
-rw-r--r--src/imports/platform/qquickplatformmenu.cpp7
-rw-r--r--src/imports/platform/qquickplatformmenubar.cpp1
-rw-r--r--src/imports/platform/qquickplatformmenuitem.cpp58
-rw-r--r--src/imports/platform/qquickplatformmenuitem_p.h2
-rw-r--r--src/imports/platform/qquickplatformsystemtrayicon.cpp1
-rw-r--r--src/imports/platform/qtlabsplatformplugin.cpp1
-rw-r--r--src/imports/templates/plugins.qmltypes80
-rw-r--r--src/imports/templates/qmldir1
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp2
49 files changed, 580 insertions, 132 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index b30293f5..e9f93d66 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -53,7 +53,7 @@ T.ComboBox {
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
delegate: ItemDelegate {
- width: parent.width
+ width: ListView.view.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
palette.text: control.palette.text
palette.highlightedText: control.palette.highlightedText
diff --git a/src/imports/controls/DialogButtonBox.qml b/src/imports/controls/DialogButtonBox.qml
index 3c9d5b48..cc148ac4 100644
--- a/src/imports/controls/DialogButtonBox.qml
+++ b/src/imports/controls/DialogButtonBox.qml
@@ -55,6 +55,7 @@ T.DialogButtonBox {
}
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
diff --git a/src/imports/controls/designer/AbstractButtonSection.qml b/src/imports/controls/designer/AbstractButtonSection.qml
index e8aa39c2..35fad2ab 100644
--- a/src/imports/controls/designer/AbstractButtonSection.qml
+++ b/src/imports/controls/designer/AbstractButtonSection.qml
@@ -104,8 +104,8 @@ Section {
}
Label {
- text: qsTr("Repeat")
- tooltip: qsTr("Whether the button repeats while pressed and held down.")
+ text: qsTr("Auto-Repeat")
+ tooltip: qsTr("Whether the button repeats pressed(), released() and clicked() signals while the button is pressed and held down.")
}
SecondColumnLayout {
CheckBox {
diff --git a/src/imports/controls/designer/ButtonSection.qml b/src/imports/controls/designer/ButtonSection.qml
index fef46071..951c8cf4 100644
--- a/src/imports/controls/designer/ButtonSection.qml
+++ b/src/imports/controls/designer/ButtonSection.qml
@@ -43,17 +43,7 @@ Section {
caption: qsTr("Button")
SectionLayout {
- Label {
- text: qsTr("AutoRepeat")
- tooltip: qsTr("Whether the button repeats pressed(), released() and clicked() signals while the button is pressed and held down.")
- }
- SecondColumnLayout {
- CheckBox {
- text: backendValues.autoRepeat.valueToString
- backendValue: backendValues.autoRepeat
- Layout.fillWidth: true
- }
- }
+
Label {
text: qsTr("Flat")
tooltip: qsTr("Whether the button is flat.")
diff --git a/src/imports/controls/designer/ControlSection.qml b/src/imports/controls/designer/ControlSection.qml
index 7c53ac73..3446c08f 100644
--- a/src/imports/controls/designer/ControlSection.qml
+++ b/src/imports/controls/designer/ControlSection.qml
@@ -69,7 +69,7 @@ Section {
Label {
text: qsTr("Hover")
- tooltip: qsTr("Whether control accepts hover evets.")
+ tooltip: qsTr("Whether control accepts hover events.")
}
SecondColumnLayout {
CheckBox {
@@ -95,7 +95,7 @@ Section {
Label {
text: qsTr("Wheel")
- tooltip: qsTr("Whether control accepts wheel evets.")
+ tooltip: qsTr("Whether control accepts wheel events.")
}
SecondColumnLayout {
CheckBox {
diff --git a/src/imports/controls/designer/DialSpecifics.qml b/src/imports/controls/designer/DialSpecifics.qml
index fc5b5e83..a0df81ef 100644
--- a/src/imports/controls/designer/DialSpecifics.qml
+++ b/src/imports/controls/designer/DialSpecifics.qml
@@ -112,7 +112,7 @@ Column {
}
SecondColumnLayout {
ComboBox {
- backendValue: backendValues.orientation
+ backendValue: backendValues.snapMode
model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ]
scope: "Dial"
Layout.fillWidth: true
@@ -143,6 +143,18 @@ Column {
Layout.fillWidth: true
}
}
+
+ Label {
+ text: qsTr("Wrap")
+ tooltip: qsTr("Whether the dial wraps when dragged.")
+ }
+ SecondColumnLayout {
+ CheckBox {
+ text: backendValues.wrap.valueToString
+ backendValue: backendValues.wrap
+ Layout.fillWidth: true
+ }
+ }
}
}
diff --git a/src/imports/controls/designer/InsetSection.qml b/src/imports/controls/designer/InsetSection.qml
new file mode 100644
index 00000000..4253b170
--- /dev/null
+++ b/src/imports/controls/designer/InsetSection.qml
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.12
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.12
+
+Section {
+ caption: qsTr("Inset")
+
+ SectionLayout {
+ Label {
+ text: qsTr("Vertical")
+ }
+ SecondColumnLayout {
+ Label {
+ text: qsTr("Top")
+ tooltip: qsTr("Top inset for the background.")
+ width: 42
+ }
+ SpinBox {
+ maximumValue: 10000
+ minimumValue: -10000
+ realDragRange: 5000
+ decimals: 0
+ backendValue: backendValues.topInset
+ Layout.fillWidth: true
+ }
+ Item {
+ width: 4
+ height: 4
+ }
+
+ Label {
+ text: qsTr("Bottom")
+ tooltip: qsTr("Bottom inset for the background.")
+ width: 42
+ }
+ SpinBox {
+ maximumValue: 10000
+ minimumValue: -10000
+ realDragRange: 5000
+ decimals: 0
+ backendValue: backendValues.bottomInset
+ Layout.fillWidth: true
+ }
+ }
+
+ Label {
+ text: qsTr("Horizontal")
+ }
+ SecondColumnLayout {
+ Label {
+ text: qsTr("Left")
+ tooltip: qsTr("Left inset for the background.")
+ width: 42
+ }
+ SpinBox {
+ maximumValue: 10000
+ minimumValue: -10000
+ realDragRange: 5000
+ decimals: 0
+ backendValue: backendValues.leftInset
+ Layout.fillWidth: true
+ }
+ Item {
+ width: 4
+ height: 4
+ }
+
+ Label {
+ text: qsTr("Right")
+ tooltip: qsTr("Right inset for the background.")
+ width: 42
+ }
+ SpinBox {
+ maximumValue: 10000
+ minimumValue: -10000
+ realDragRange: 5000
+ decimals: 0
+ backendValue: backendValues.rightInset
+ Layout.fillWidth: true
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/designer/LabelSpecifics.qml b/src/imports/controls/designer/LabelSpecifics.qml
index c832f894..e5d5e04f 100644
--- a/src/imports/controls/designer/LabelSpecifics.qml
+++ b/src/imports/controls/designer/LabelSpecifics.qml
@@ -79,4 +79,8 @@ Column {
PaddingSection {
width: parent.width
}
+
+ InsetSection {
+ width: parent.width
+ }
}
diff --git a/src/imports/controls/designer/PageIndicatorSpecifics.qml b/src/imports/controls/designer/PageIndicatorSpecifics.qml
index 042672a9..20aa8577 100644
--- a/src/imports/controls/designer/PageIndicatorSpecifics.qml
+++ b/src/imports/controls/designer/PageIndicatorSpecifics.qml
@@ -73,6 +73,18 @@ Column {
Layout.fillWidth: true
}
}
+
+ Label {
+ text: qsTr("Interactive")
+ tooltip: qsTr("Whether the control is interactive.")
+ }
+ SecondColumnLayout {
+ CheckBox {
+ text: backendValues.interactive.valueToString
+ backendValue: backendValues.interactive
+ Layout.fillWidth: true
+ }
+ }
}
}
@@ -80,10 +92,6 @@ Column {
width: parent.width
}
- FontSection {
- width: parent.width
- }
-
PaddingSection {
width: parent.width
}
diff --git a/src/imports/controls/designer/RangeSliderSpecifics.qml b/src/imports/controls/designer/RangeSliderSpecifics.qml
index 79d2404f..9372a4ff 100644
--- a/src/imports/controls/designer/RangeSliderSpecifics.qml
+++ b/src/imports/controls/designer/RangeSliderSpecifics.qml
@@ -127,7 +127,7 @@ Column {
}
SecondColumnLayout {
ComboBox {
- backendValue: backendValues.orientation
+ backendValue: backendValues.snapMode
model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ]
scope: "RangeSlider"
Layout.fillWidth: true
@@ -158,6 +158,20 @@ Column {
Layout.fillWidth: true
}
}
+
+ Label {
+ text: qsTr("Touch drag threshold")
+ tooltip: qsTr("The threshold (in logical pixels) at which a touch drag event will be initiated.")
+ }
+ SecondColumnLayout {
+ SpinBox {
+ minimumValue: 0
+ maximumValue: 10000
+ decimals: 0
+ backendValue: backendValues.touchDragThreshold
+ Layout.fillWidth: true
+ }
+ }
}
}
diff --git a/src/imports/controls/designer/RoundButtonSpecifics.qml b/src/imports/controls/designer/RoundButtonSpecifics.qml
index 2da4cda6..af4ab5d0 100644
--- a/src/imports/controls/designer/RoundButtonSpecifics.qml
+++ b/src/imports/controls/designer/RoundButtonSpecifics.qml
@@ -42,6 +42,7 @@ Column {
width: parent.width
Section {
+ width: parent.width
caption: qsTr("RoundButton")
SectionLayout {
@@ -51,8 +52,8 @@ Column {
}
SecondColumnLayout {
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: 0
+ maximumValue: 10000
decimals: 0
backendValue: backendValues.radius
Layout.fillWidth: true
diff --git a/src/imports/controls/designer/SliderSpecifics.qml b/src/imports/controls/designer/SliderSpecifics.qml
index 076d8a1c..d126dd06 100644
--- a/src/imports/controls/designer/SliderSpecifics.qml
+++ b/src/imports/controls/designer/SliderSpecifics.qml
@@ -143,6 +143,20 @@ Column {
Layout.fillWidth: true
}
}
+
+ Label {
+ text: qsTr("Touch drag threshold")
+ tooltip: qsTr("The threshold (in logical pixels) at which a touch drag event will be initiated.")
+ }
+ SecondColumnLayout {
+ SpinBox {
+ minimumValue: 0
+ maximumValue: 10000
+ decimals: 0
+ backendValue: backendValues.touchDragThreshold
+ Layout.fillWidth: true
+ }
+ }
}
}
diff --git a/src/imports/controls/designer/SpinBoxSpecifics.qml b/src/imports/controls/designer/SpinBoxSpecifics.qml
index d6375d7c..db59f074 100644
--- a/src/imports/controls/designer/SpinBoxSpecifics.qml
+++ b/src/imports/controls/designer/SpinBoxSpecifics.qml
@@ -113,6 +113,18 @@ Column {
Layout.fillWidth: true
}
}
+
+ Label {
+ text: qsTr("Wrap")
+ tooltip: qsTr("Whether the spinbox wraps.")
+ }
+ SecondColumnLayout {
+ CheckBox {
+ text: backendValues.wrap.valueToString
+ backendValue: backendValues.wrap
+ Layout.fillWidth: true
+ }
+ }
}
}
diff --git a/src/imports/controls/designer/TextAreaSpecifics.qml b/src/imports/controls/designer/TextAreaSpecifics.qml
index a14584e7..f8cf92e8 100644
--- a/src/imports/controls/designer/TextAreaSpecifics.qml
+++ b/src/imports/controls/designer/TextAreaSpecifics.qml
@@ -57,6 +57,29 @@ Column {
}
}
+
+ Label {
+ text: qsTr("Hover")
+ tooltip: qsTr("Whether text area accepts hover events.")
+ }
+ SecondColumnLayout {
+ CheckBox {
+ text: backendValues.hoverEnabled.valueToString
+ backendValue: backendValues.hoverEnabled
+ Layout.fillWidth: true
+ }
+ }
+ }
+ }
+
+ Section {
+ width: parent.width
+ caption: qsTr("Placeholder Text Color")
+
+ ColorEditor {
+ caption: qsTr("Placeholder Text Color")
+ backendValue: backendValues.placeholderTextColor
+ supportGradient: false
}
}
@@ -74,4 +97,8 @@ Column {
PaddingSection {
width: parent.width
}
+
+ InsetSection {
+ width: parent.width
+ }
}
diff --git a/src/imports/controls/designer/TextFieldSpecifics.qml b/src/imports/controls/designer/TextFieldSpecifics.qml
index 67a63ec4..f95f282c 100644
--- a/src/imports/controls/designer/TextFieldSpecifics.qml
+++ b/src/imports/controls/designer/TextFieldSpecifics.qml
@@ -57,6 +57,29 @@ Column {
}
}
+
+ Label {
+ text: qsTr("Hover")
+ tooltip: qsTr("Whether text field accepts hover events.")
+ }
+ SecondColumnLayout {
+ CheckBox {
+ text: backendValues.hoverEnabled.valueToString
+ backendValue: backendValues.hoverEnabled
+ Layout.fillWidth: true
+ }
+ }
+ }
+ }
+
+ Section {
+ width: parent.width
+ caption: qsTr("Placeholder Text Color")
+
+ ColorEditor {
+ caption: qsTr("Placeholder Text Color")
+ backendValue: backendValues.placeholderTextColor
+ supportGradient: false
}
}
@@ -71,4 +94,8 @@ Column {
PaddingSection {
width: parent.width
}
+
+ InsetSection {
+ width: parent.width
+ }
}
diff --git a/src/imports/controls/designer/designer.pri b/src/imports/controls/designer/designer.pri
index 3ad99df7..6692b203 100644
--- a/src/imports/controls/designer/designer.pri
+++ b/src/imports/controls/designer/designer.pri
@@ -17,6 +17,7 @@ AUX_QML_FILES += \
$$PWD/DialSpecifics.qml \
$$PWD/FrameSpecifics.qml \
$$PWD/GroupBoxSpecifics.qml \
+ $$PWD/InsetSection.qml \
$$PWD/ItemDelegateSection.qml \
$$PWD/ItemDelegateSpecifics.qml \
$$PWD/LabelSpecifics.qml \
diff --git a/src/imports/controls/doc/src/includes/qquickicon.qdocinc b/src/imports/controls/doc/src/includes/qquickicon.qdocinc
index ba7cede9..beef5624 100644
--- a/src/imports/controls/doc/src/includes/qquickicon.qdocinc
+++ b/src/imports/controls/doc/src/includes/qquickicon.qdocinc
@@ -44,5 +44,7 @@
\li This property specifies whether the icon should be cached.
The default value is true.
+
+ This property was introduced in QtQuick.Controls 2.13.
\endtable
//! [grouped-properties]
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc
index f8cb1f52..190aafd9 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-icons.qdoc
@@ -44,6 +44,7 @@
\li \c icon.width
\li \c icon.height
\li \c icon.color
+ \li \c icon.cache
\endlist
Theme icons are referenced by a name, and regular icons by a source URL. Both
diff --git a/src/imports/controls/fusion/ComboBox.qml b/src/imports/controls/fusion/ComboBox.qml
index d8ef1888..5e26f90e 100644
--- a/src/imports/controls/fusion/ComboBox.qml
+++ b/src/imports/controls/fusion/ComboBox.qml
@@ -55,7 +55,7 @@ T.ComboBox {
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
delegate: MenuItem {
- width: parent.width
+ width: ListView.view.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
diff --git a/src/imports/controls/fusion/DialogButtonBox.qml b/src/imports/controls/fusion/DialogButtonBox.qml
index a0b0f243..4673e421 100644
--- a/src/imports/controls/fusion/DialogButtonBox.qml
+++ b/src/imports/controls/fusion/DialogButtonBox.qml
@@ -56,6 +56,7 @@ T.DialogButtonBox {
delegate: Button { }
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
diff --git a/src/imports/controls/fusion/plugins.qmltypes b/src/imports/controls/fusion/plugins.qmltypes
index 5140d1e8..681b8b90 100644
--- a/src/imports/controls/fusion/plugins.qmltypes
+++ b/src/imports/controls/fusion/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Fusion 2.14'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Fusion 2.15'
Module {
dependencies: ["QtQuick.Controls 2.0"]
diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml
index 92937826..d657e734 100644
--- a/src/imports/controls/imagine/ComboBox.qml
+++ b/src/imports/controls/imagine/ComboBox.qml
@@ -59,7 +59,7 @@ T.ComboBox {
bottomInset: background ? -background.bottomInset || 0 : 0
delegate: ItemDelegate {
- width: parent.width
+ width: ListView.view.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
diff --git a/src/imports/controls/imagine/DialogButtonBox.qml b/src/imports/controls/imagine/DialogButtonBox.qml
index c24b29fc..fd27a876 100644
--- a/src/imports/controls/imagine/DialogButtonBox.qml
+++ b/src/imports/controls/imagine/DialogButtonBox.qml
@@ -66,6 +66,7 @@ T.DialogButtonBox {
}
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml
index 7abdb6f0..46f9c98a 100644
--- a/src/imports/controls/imagine/GroupBox.qml
+++ b/src/imports/controls/imagine/GroupBox.qml
@@ -53,7 +53,6 @@ T.GroupBox {
leftPadding: background ? background.leftPadding : 0
rightPadding: background ? background.rightPadding : 0
bottomPadding: background ? background.bottomPadding : 0
- padding: 12
label: Label {
width: control.width
@@ -88,7 +87,7 @@ T.GroupBox {
x: -leftInset
y: control.topPadding - control.bottomPadding - topInset
width: control.width + leftInset + rightInset
- height: control.height + topInset + bottomInset - control.topPadding + control.padding
+ height: control.height + topInset + bottomInset - control.topPadding + control.bottomPadding
source: Imagine.url + "groupbox-background"
NinePatchImageSelector on source {
diff --git a/src/imports/controls/imagine/plugins.qmltypes b/src/imports/controls/imagine/plugins.qmltypes
index 191807ae..785b6dba 100644
--- a/src/imports/controls/imagine/plugins.qmltypes
+++ b/src/imports/controls/imagine/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Imagine 2.14'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Imagine 2.15'
Module {
dependencies: ["QtQuick.Controls 2.0"]
@@ -54,6 +54,7 @@ Module {
Property { name: "verticalAlignment"; type: "VAlignment" }
Property { name: "mipmap"; revision: 3; type: "bool" }
Property { name: "autoTransform"; revision: 5; type: "bool" }
+ Property { name: "sourceClipRect"; revision: 15; type: "QRectF" }
Signal { name: "paintedGeometryChanged" }
Signal {
name: "horizontalAlignmentChanged"
@@ -75,6 +76,14 @@ Module {
defaultProperty: "data"
prototype: "QQuickImplicitSizeItem"
Enum {
+ name: "LoadPixmapOptions"
+ values: {
+ "NoOption": 0,
+ "HandleDPR": 1,
+ "UseProviderOptions": 2
+ }
+ }
+ Enum {
name: "Status"
values: {
"Null": 0,
@@ -92,6 +101,7 @@ Module {
Property { name: "mirror"; type: "bool" }
Property { name: "currentFrame"; revision: 14; type: "int" }
Property { name: "frameCount"; revision: 14; type: "int"; isReadonly: true }
+ Property { name: "colorSpace"; revision: 15; type: "QColorSpace" }
Signal {
name: "sourceChanged"
Parameter { type: "QUrl" }
@@ -106,6 +116,8 @@ Module {
}
Signal { name: "currentFrameChanged"; revision: 14 }
Signal { name: "frameCountChanged"; revision: 14 }
+ Signal { name: "sourceClipRectChanged"; revision: 15 }
+ Signal { name: "colorSpaceChanged"; revision: 15 }
}
Component {
name: "QQuickImageSelector"
diff --git a/src/imports/controls/imagine/qquickninepatchimage.cpp b/src/imports/controls/imagine/qquickninepatchimage.cpp
index 7d5e4f71..ed388ec1 100644
--- a/src/imports/controls/imagine/qquickninepatchimage.cpp
+++ b/src/imports/controls/imagine/qquickninepatchimage.cpp
@@ -386,7 +386,12 @@ void QQuickNinePatchImage::pixmapChange()
{
Q_D(QQuickNinePatchImage);
if (QFileInfo(d->url.fileName()).completeSuffix().toLower() == QLatin1String("9.png")) {
- d->resetNode = d->ninePatch.isNull();
+ // Keep resetNode if it is already set, we do not want to miss an
+ // ImageNode->NinePatchNode change. Without this there's a chance one gets
+ // an incorrect cast on oldNode every once in a while with source changes.
+ if (!d->resetNode)
+ d->resetNode = d->ninePatch.isNull();
+
d->ninePatch = d->pix.image();
if (d->ninePatch.depth() != 32)
d->ninePatch = d->ninePatch.convertToFormat(QImage::Format_ARGB32);
@@ -434,6 +439,8 @@ QSGNode *QQuickNinePatchImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNode
QSizeF sz = size();
QImage image = d->pix.image();
if (!sz.isValid() || image.isNull()) {
+ if (d->provider)
+ d->provider->updateTexture(nullptr);
delete oldNode;
return nullptr;
}
@@ -449,6 +456,13 @@ QSGNode *QQuickNinePatchImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNode
qsgnode_set_description(patchNode, QString::fromLatin1("QQuickNinePatchImage: '%1'").arg(d->url.toString()));
#endif
+ // The image may wrap non-owned data (due to pixmapChange). Ensure we never
+ // pass such an image to the scenegraph, because with a separate render
+ // thread the data may become invalid (in a subsequent pixmapChange on the
+ // gui thread) by the time the renderer gets to do something with the QImage
+ // passed in here.
+ image.detach();
+
QSGTexture *texture = window()->createTextureFromImage(image);
patchNode->initialize(texture, sz * d->devicePixelRatio, image.size(), d->xDivs, d->yDivs, d->devicePixelRatio);
return patchNode;
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index e4ee332b..6aada8c5 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -63,9 +63,9 @@ T.ComboBox {
Material.foreground: flat ? undefined : Material.primaryTextColor
delegate: MenuItem {
- width: parent.width
+ width: ListView.view.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
- Material.foreground: control.currentIndex === index ? parent.Material.accent : parent.Material.foreground
+ Material.foreground: control.currentIndex === index ? ListView.view.contentItem.Material.accent : ListView.view.contentItem.Material.foreground
highlighted: control.highlightedIndex === index
hoverEnabled: control.hoverEnabled
}
@@ -147,14 +147,14 @@ T.ComboBox {
enter: Transition {
// grow_fade_in
- NumberAnimation { property: "scale"; from: 0.9; to: 1.0; easing.type: Easing.OutQuint; duration: 220 }
- NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutCubic; duration: 150 }
+ NumberAnimation { property: "scale"; from: 0.9; easing.type: Easing.OutQuint; duration: 220 }
+ NumberAnimation { property: "opacity"; from: 0.0; easing.type: Easing.OutCubic; duration: 150 }
}
exit: Transition {
// shrink_fade_out
- NumberAnimation { property: "scale"; from: 1.0; to: 0.9; easing.type: Easing.OutQuint; duration: 220 }
- NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
+ NumberAnimation { property: "scale"; to: 0.9; easing.type: Easing.OutQuint; duration: 220 }
+ NumberAnimation { property: "opacity"; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
}
contentItem: ListView {
diff --git a/src/imports/controls/material/DialogButtonBox.qml b/src/imports/controls/material/DialogButtonBox.qml
index c53b8210..d148fb24 100644
--- a/src/imports/controls/material/DialogButtonBox.qml
+++ b/src/imports/controls/material/DialogButtonBox.qml
@@ -60,6 +60,7 @@ T.DialogButtonBox {
delegate: Button { flat: true }
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
diff --git a/src/imports/controls/material/material.pro b/src/imports/controls/material/material.pro
index cf08b925..ea74d277 100644
--- a/src/imports/controls/material/material.pro
+++ b/src/imports/controls/material/material.pro
@@ -1,4 +1,4 @@
-TARGET = qtquickcontrols2materialstyleplugin
+TARGET = qqc2materialstyleplugin
TARGETPATH = QtQuick/Controls.2/Material
IMPORT_NAME = QtQuick.Controls.Material
diff --git a/src/imports/controls/material/plugins.qmltypes b/src/imports/controls/material/plugins.qmltypes
index 7546a7b0..e290e0ea 100644
--- a/src/imports/controls/material/plugins.qmltypes
+++ b/src/imports/controls/material/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Material 2.14'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Material 2.15'
Module {
dependencies: ["QtQuick.Controls 2.0"]
@@ -328,6 +328,7 @@ Module {
Property { name: "toolBarColor"; type: "QColor"; isReadonly: true }
Property { name: "toolTextColor"; type: "QColor"; isReadonly: true }
Property { name: "spinBoxDisabledIconColor"; type: "QColor"; isReadonly: true }
+ Property { name: "sliderDisabledColor"; revision: 15; type: "QColor"; isReadonly: true }
Property { name: "touchTarget"; type: "int"; isReadonly: true }
Property { name: "buttonHeight"; type: "int"; isReadonly: true }
Property { name: "delegateHeight"; type: "int"; isReadonly: true }
diff --git a/src/imports/controls/material/qmldir b/src/imports/controls/material/qmldir
index 870a0382..d48b7b12 100644
--- a/src/imports/controls/material/qmldir
+++ b/src/imports/controls/material/qmldir
@@ -1,4 +1,4 @@
module QtQuick.Controls.Material
-plugin qtquickcontrols2materialstyleplugin
+plugin qqc2materialstyleplugin
classname QtQuickControls2MaterialStylePlugin
depends QtQuick.Controls 2.5
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index 35afeb00..d343f2f5 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -469,14 +469,13 @@ void QQuickMaterialStyle::setTheme(Theme theme)
m_theme = theme;
propagateTheme();
- emit themeChanged();
- emit paletteChanged();
+ themeChange();
if (!m_customAccent)
- emit accentChanged();
+ accentChange();
if (!m_hasBackground)
- emit backgroundChanged();
+ backgroundChange();
if (!m_hasForeground)
- emit foregroundChanged();
+ foregroundChange();
}
void QQuickMaterialStyle::inheritTheme(Theme theme)
@@ -486,14 +485,13 @@ void QQuickMaterialStyle::inheritTheme(Theme theme)
m_theme = theme;
propagateTheme();
- emit themeChanged();
- emit paletteChanged();
+ themeChange();
if (!m_customAccent)
- emit accentChanged();
+ accentChange();
if (!m_hasBackground)
- emit backgroundChanged();
+ backgroundChange();
if (!m_hasForeground)
- emit foregroundChanged();
+ foregroundChange();
}
void QQuickMaterialStyle::propagateTheme()
@@ -516,6 +514,19 @@ void QQuickMaterialStyle::resetTheme()
inheritTheme(material ? material->theme() : globalTheme);
}
+void QQuickMaterialStyle::themeChange()
+{
+ emit themeChanged();
+ emit themeOrAccentChanged();
+ emit primaryHighlightedTextColor();
+ emit buttonColorChanged();
+ emit buttonDisabledColorChanged();
+ emit dialogColorChanged();
+ emit tooltipColorChanged();
+ emit toolBarColorChanged();
+ emit toolTextColorChanged();
+}
+
QVariant QQuickMaterialStyle::primary() const
{
return primaryColor();
@@ -535,8 +546,7 @@ void QQuickMaterialStyle::setPrimary(const QVariant &var)
m_customPrimary = custom;
m_primary = primary;
propagatePrimary();
- emit primaryChanged();
- emit paletteChanged();
+ primaryChange();
}
void QQuickMaterialStyle::inheritPrimary(uint primary, bool custom)
@@ -547,8 +557,7 @@ void QQuickMaterialStyle::inheritPrimary(uint primary, bool custom)
m_customPrimary = custom;
m_primary = primary;
propagatePrimary();
- emit primaryChanged();
- emit paletteChanged();
+ primaryChange();
}
void QQuickMaterialStyle::propagatePrimary()
@@ -575,6 +584,13 @@ void QQuickMaterialStyle::resetPrimary()
inheritPrimary(globalPrimary, false);
}
+void QQuickMaterialStyle::primaryChange()
+{
+ emit primaryChanged();
+ emit toolBarColorChanged();
+ emit toolTextColorChanged();
+}
+
QVariant QQuickMaterialStyle::accent() const
{
return accentColor();
@@ -594,8 +610,7 @@ void QQuickMaterialStyle::setAccent(const QVariant &var)
m_customAccent = custom;
m_accent = accent;
propagateAccent();
- emit accentChanged();
- emit paletteChanged();
+ accentChange();
}
void QQuickMaterialStyle::inheritAccent(uint accent, bool custom)
@@ -606,8 +621,7 @@ void QQuickMaterialStyle::inheritAccent(uint accent, bool custom)
m_customAccent = custom;
m_accent = accent;
propagateAccent();
- emit accentChanged();
- emit paletteChanged();
+ accentChange();
}
void QQuickMaterialStyle::propagateAccent()
@@ -634,6 +648,13 @@ void QQuickMaterialStyle::resetAccent()
inheritAccent(globalAccent, false);
}
+void QQuickMaterialStyle::accentChange()
+{
+ emit accentChanged();
+ emit themeOrAccentChanged();
+ emit buttonColorChanged();
+}
+
QVariant QQuickMaterialStyle::foreground() const
{
if (!m_hasForeground)
@@ -660,7 +681,7 @@ void QQuickMaterialStyle::setForeground(const QVariant &var)
m_customForeground = custom;
m_foreground = foreground;
propagateForeground();
- emit foregroundChanged();
+ foregroundChange();
}
void QQuickMaterialStyle::inheritForeground(uint foreground, bool custom, bool has)
@@ -672,7 +693,7 @@ void QQuickMaterialStyle::inheritForeground(uint foreground, bool custom, bool h
m_customForeground = custom;
m_foreground = foreground;
propagateForeground();
- emit foregroundChanged();
+ foregroundChange();
}
void QQuickMaterialStyle::propagateForeground()
@@ -697,6 +718,14 @@ void QQuickMaterialStyle::resetForeground()
inheritForeground(material ? material->m_foreground : globalForeground, true, material ? material->m_hasForeground : false);
}
+void QQuickMaterialStyle::foregroundChange()
+{
+ emit foregroundChanged();
+ emit primaryHighlightedTextColorChanged();
+ // TODO: This causes a binding loop: see QTBUG-85699 and the comments on its fix
+// emit toolTextColorChanged();
+}
+
QVariant QQuickMaterialStyle::background() const
{
return backgroundColor();
@@ -717,8 +746,7 @@ void QQuickMaterialStyle::setBackground(const QVariant &var)
m_customBackground = custom;
m_background = background;
propagateBackground();
- emit backgroundChanged();
- emit paletteChanged();
+ backgroundChange();
}
void QQuickMaterialStyle::inheritBackground(uint background, bool custom, bool has)
@@ -730,8 +758,7 @@ void QQuickMaterialStyle::inheritBackground(uint background, bool custom, bool h
m_customBackground = custom;
m_background = background;
propagateBackground();
- emit backgroundChanged();
- emit paletteChanged();
+ backgroundChange();
}
void QQuickMaterialStyle::propagateBackground()
@@ -756,6 +783,15 @@ void QQuickMaterialStyle::resetBackground()
inheritBackground(material ? material->m_background : globalBackground, true, material ? material->m_hasBackground : false);
}
+void QQuickMaterialStyle::backgroundChange()
+{
+ emit backgroundChanged();
+ emit buttonColorChanged();
+ emit dialogColorChanged();
+ emit tooltipColorChanged();
+ emit toolBarColorChanged();
+}
+
int QQuickMaterialStyle::elevation() const
{
return m_elevation;
@@ -767,7 +803,7 @@ void QQuickMaterialStyle::setElevation(int elevation)
return;
m_elevation = elevation;
- emit elevationChanged();
+ elevationChange();
}
void QQuickMaterialStyle::resetElevation()
@@ -775,6 +811,12 @@ void QQuickMaterialStyle::resetElevation()
setElevation(0);
}
+void QQuickMaterialStyle::elevationChange()
+{
+ emit elevationChanged();
+ emit buttonDisabledColorChanged();
+}
+
QColor QQuickMaterialStyle::primaryColor() const
{
if (m_customPrimary)
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index d2a89761..1207e9cc 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -66,38 +66,38 @@ class QQuickMaterialStyle : public QQuickAttachedObject
Q_PROPERTY(QColor primaryColor READ primaryColor NOTIFY primaryChanged FINAL) // TODO: remove?
Q_PROPERTY(QColor accentColor READ accentColor NOTIFY accentChanged FINAL) // TODO: remove?
Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY backgroundChanged FINAL)
- Q_PROPERTY(QColor primaryTextColor READ primaryTextColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor primaryHighlightedTextColor READ primaryHighlightedTextColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor secondaryTextColor READ secondaryTextColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor hintTextColor READ hintTextColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor textSelectionColor READ textSelectionColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor dropShadowColor READ dropShadowColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor dividerColor READ dividerColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor iconColor READ iconColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor iconDisabledColor READ iconDisabledColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor buttonColor READ buttonColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor buttonDisabledColor READ buttonDisabledColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor highlightedButtonColor READ highlightedButtonColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor frameColor READ frameColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor rippleColor READ rippleColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor highlightedRippleColor READ highlightedRippleColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor switchUncheckedTrackColor READ switchUncheckedTrackColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor switchCheckedTrackColor READ switchCheckedTrackColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor switchUncheckedHandleColor READ switchUncheckedHandleColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor switchCheckedHandleColor READ switchCheckedHandleColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor switchDisabledTrackColor READ switchDisabledTrackColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor switchDisabledHandleColor READ switchDisabledHandleColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor scrollBarColor READ scrollBarColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor scrollBarHoveredColor READ scrollBarHoveredColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor dialogColor READ dialogColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor backgroundDimColor READ backgroundDimColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor listHighlightColor READ listHighlightColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor tooltipColor READ tooltipColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor toolBarColor READ toolBarColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor toolTextColor READ toolTextColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor spinBoxDisabledIconColor READ spinBoxDisabledIconColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor sliderDisabledColor READ sliderDisabledColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor primaryTextColor READ primaryTextColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor primaryHighlightedTextColor READ primaryHighlightedTextColor NOTIFY primaryHighlightedTextColorChanged FINAL)
+ Q_PROPERTY(QColor secondaryTextColor READ secondaryTextColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor hintTextColor READ hintTextColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor textSelectionColor READ textSelectionColor NOTIFY themeOrAccentChanged FINAL)
+ Q_PROPERTY(QColor dropShadowColor READ dropShadowColor CONSTANT FINAL)
+ Q_PROPERTY(QColor dividerColor READ dividerColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor iconColor READ iconColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor iconDisabledColor READ iconDisabledColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor buttonColor READ buttonColor NOTIFY buttonColorChanged FINAL)
+ Q_PROPERTY(QColor buttonDisabledColor READ buttonDisabledColor NOTIFY buttonDisabledColorChanged FINAL)
+ Q_PROPERTY(QColor highlightedButtonColor READ highlightedButtonColor NOTIFY buttonColorChanged FINAL)
+ Q_PROPERTY(QColor frameColor READ frameColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor rippleColor READ rippleColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor highlightedRippleColor READ highlightedRippleColor NOTIFY themeOrAccentChanged FINAL)
+ Q_PROPERTY(QColor switchUncheckedTrackColor READ switchUncheckedTrackColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor switchCheckedTrackColor READ switchCheckedTrackColor NOTIFY themeOrAccentChanged FINAL)
+ Q_PROPERTY(QColor switchUncheckedHandleColor READ switchUncheckedHandleColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor switchCheckedHandleColor READ switchCheckedHandleColor NOTIFY themeOrAccentChanged FINAL)
+ Q_PROPERTY(QColor switchDisabledTrackColor READ switchDisabledTrackColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor switchDisabledHandleColor READ switchDisabledHandleColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor scrollBarColor READ scrollBarColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor scrollBarHoveredColor READ scrollBarHoveredColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor dialogColor READ dialogColor NOTIFY dialogColorChanged FINAL)
+ Q_PROPERTY(QColor backgroundDimColor READ backgroundDimColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor listHighlightColor READ listHighlightColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor tooltipColor READ tooltipColor NOTIFY tooltipColorChanged FINAL)
+ Q_PROPERTY(QColor toolBarColor READ toolBarColor NOTIFY toolBarColorChanged FINAL)
+ Q_PROPERTY(QColor toolTextColor READ toolTextColor NOTIFY toolTextColorChanged FINAL)
+ Q_PROPERTY(QColor spinBoxDisabledIconColor READ spinBoxDisabledIconColor NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QColor sliderDisabledColor READ sliderDisabledColor NOTIFY themeChanged FINAL REVISION 15)
Q_PROPERTY(int touchTarget READ touchTarget CONSTANT FINAL)
Q_PROPERTY(int buttonHeight READ buttonHeight CONSTANT FINAL)
@@ -174,34 +174,40 @@ public:
void inheritTheme(Theme theme);
void propagateTheme();
void resetTheme();
+ void themeChange();
QVariant primary() const;
void setPrimary(const QVariant &accent);
void inheritPrimary(uint primary, bool custom);
void propagatePrimary();
void resetPrimary();
+ void primaryChange();
QVariant accent() const;
void setAccent(const QVariant &accent);
void inheritAccent(uint accent, bool custom);
void propagateAccent();
void resetAccent();
+ void accentChange();
QVariant foreground() const;
void setForeground(const QVariant &foreground);
void inheritForeground(uint foreground, bool custom, bool has);
void propagateForeground();
void resetForeground();
+ void foregroundChange();
QVariant background() const;
void setBackground(const QVariant &background);
void inheritBackground(uint background, bool custom, bool has);
void propagateBackground();
void resetBackground();
+ void backgroundChange();
int elevation() const;
void setElevation(int elevation);
void resetElevation();
+ void elevationChange();
QColor primaryColor() const;
QColor accentColor() const;
@@ -265,7 +271,15 @@ Q_SIGNALS:
void backgroundChanged();
void elevationChanged();
- void paletteChanged();
+ void themeOrAccentChanged();
+
+ void primaryHighlightedTextColorChanged();
+ void buttonColorChanged();
+ void buttonDisabledColorChanged();
+ void dialogColorChanged();
+ void tooltipColorChanged();
+ void toolBarColorChanged();
+ void toolTextColorChanged();
protected:
void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent) override;
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index c3e53431..e8212c55 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls 2.14'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls 2.15'
Module {
dependencies: [
@@ -589,6 +589,14 @@ Module {
defaultProperty: "contentData"
}
Component {
+ prototype: "QQuickHorizontalHeaderView"
+ name: "QtQuick.Controls/HorizontalHeaderView 2.15"
+ exports: ["QtQuick.Controls/HorizontalHeaderView 2.15"]
+ exportMetaObjectRevisions: [15]
+ isComposite: true
+ defaultProperty: "flickableData"
+ }
+ Component {
prototype: "QQuickItemDelegate"
name: "QtQuick.Controls/ItemDelegate 2.0"
exports: ["QtQuick.Controls/ItemDelegate 2.0"]
@@ -876,4 +884,12 @@ Module {
isComposite: true
defaultProperty: "data"
}
+ Component {
+ prototype: "QQuickVerticalHeaderView"
+ name: "QtQuick.Controls/VerticalHeaderView 2.15"
+ exports: ["QtQuick.Controls/VerticalHeaderView 2.15"]
+ exportMetaObjectRevisions: [15]
+ isComposite: true
+ defaultProperty: "flickableData"
+ }
}
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index fd2d8935..9b88ccf9 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -56,7 +56,7 @@ T.ComboBox {
Universal.theme: editable && activeFocus ? Universal.Light : undefined
delegate: ItemDelegate {
- width: parent.width
+ width: ListView.view.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
diff --git a/src/imports/controls/universal/DialogButtonBox.qml b/src/imports/controls/universal/DialogButtonBox.qml
index 0458c39d..103b46c2 100644
--- a/src/imports/controls/universal/DialogButtonBox.qml
+++ b/src/imports/controls/universal/DialogButtonBox.qml
@@ -59,6 +59,7 @@ T.DialogButtonBox {
}
contentItem: ListView {
+ implicitWidth: contentWidth
model: control.contentModel
spacing: control.spacing
orientation: ListView.Horizontal
diff --git a/src/imports/controls/universal/plugins.qmltypes b/src/imports/controls/universal/plugins.qmltypes
index 1734c01b..c38e39e1 100644
--- a/src/imports/controls/universal/plugins.qmltypes
+++ b/src/imports/controls/universal/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Universal 2.14'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls.Universal 2.15'
Module {
dependencies: ["QtQuick.Controls 2.0"]
diff --git a/src/imports/platform/platform.pro b/src/imports/platform/platform.pro
index 043b0172..d9bcfcb8 100644
--- a/src/imports/platform/platform.pro
+++ b/src/imports/platform/platform.pro
@@ -1,9 +1,9 @@
TARGET = qtlabsplatformplugin
TARGETPATH = Qt/labs/platform
-IMPORT_VERSION = 1.0
+IMPORT_VERSION = 1.1
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
diff --git a/src/imports/platform/plugins.qmltypes b/src/imports/platform/plugins.qmltypes
index 7b165ef3..e9312047 100644
--- a/src/imports/platform/plugins.qmltypes
+++ b/src/imports/platform/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable Qt.labs.platform 1.0'
+// 'qmlplugindump -nonrelocatable Qt.labs.platform 1.1'
Module {
dependencies: ["QtQuick 2.0"]
@@ -288,8 +288,11 @@ Module {
Component {
name: "QQuickPlatformMenuItem"
prototype: "QObject"
- exports: ["Qt.labs.platform/MenuItem 1.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "Qt.labs.platform/MenuItem 1.0",
+ "Qt.labs.platform/MenuItem 1.1"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Property { name: "menu"; type: "QQuickPlatformMenu"; isReadonly: true; isPointer: true }
Property { name: "subMenu"; type: "QQuickPlatformMenu"; isReadonly: true; isPointer: true }
Property { name: "group"; type: "QQuickPlatformMenuItemGroup"; isPointer: true }
diff --git a/src/imports/platform/qquickplatformfiledialog.cpp b/src/imports/platform/qquickplatformfiledialog.cpp
index 2ef08ef6..af5475fa 100644
--- a/src/imports/platform/qquickplatformfiledialog.cpp
+++ b/src/imports/platform/qquickplatformfiledialog.cpp
@@ -353,7 +353,6 @@ void QQuickPlatformFileDialog::resetNameFilters()
}
/*!
- \qmlpropertygroup Qt.labs.platform::FileDialog::selectedNameFilter
\qmlproperty int Qt.labs.platform::FileDialog::selectedNameFilter.index
\qmlproperty string Qt.labs.platform::FileDialog::selectedNameFilter.name
\qmlproperty list<string> Qt.labs.platform::FileDialog::selectedNameFilter.extensions
@@ -553,8 +552,14 @@ QUrl QQuickPlatformFileDialog::addDefaultSuffix(const QUrl &file) const
QUrl url = file;
const QString path = url.path();
const QString suffix = m_options->defaultSuffix();
- if (!suffix.isEmpty() && !path.endsWith(QLatin1Char('/')) && path.lastIndexOf(QLatin1Char('.')) == -1)
+ // Urls with "content" scheme do not require suffixes. Such schemes are
+ // used on Android.
+ const bool isContentScheme = url.scheme() == QStringLiteral("content");
+ if (!isContentScheme && !suffix.isEmpty() && !path.endsWith(QLatin1Char('/'))
+ && path.lastIndexOf(QLatin1Char('.')) == -1) {
url.setPath(path + QLatin1Char('.') + suffix);
+ }
+
return url;
}
diff --git a/src/imports/platform/qquickplatformmenu.cpp b/src/imports/platform/qquickplatformmenu.cpp
index 1f5f52d7..b5289f33 100644
--- a/src/imports/platform/qquickplatformmenu.cpp
+++ b/src/imports/platform/qquickplatformmenu.cpp
@@ -610,10 +610,9 @@ void QQuickPlatformMenu::setFont(const QFont& font)
/*!
\since Qt.labs.platform 1.1 (Qt 5.12)
- \qmlpropertygroup Qt.labs.platform::MenuItem::icon
- \qmlproperty url Qt.labs.platform::MenuItem::icon.source
- \qmlproperty string Qt.labs.platform::MenuItem::icon.name
- \qmlproperty bool Qt.labs.platform::MenuItem::icon.mask
+ \qmlproperty url Qt.labs.platform::Menu::icon.source
+ \qmlproperty string Qt.labs.platform::Menu::icon.name
+ \qmlproperty bool Qt.labs.platform::Menu::icon.mask
This property holds the menu item's icon.
*/
diff --git a/src/imports/platform/qquickplatformmenubar.cpp b/src/imports/platform/qquickplatformmenubar.cpp
index 99757829..f7199083 100644
--- a/src/imports/platform/qquickplatformmenubar.cpp
+++ b/src/imports/platform/qquickplatformmenubar.cpp
@@ -205,6 +205,7 @@ void QQuickPlatformMenuBar::insertMenu(int index, QQuickPlatformMenu *menu)
menu->setMenuBar(this);
if (m_handle)
m_handle->insertMenu(menu->create(), before ? before->handle() : nullptr);
+ menu->sync();
emit menusChanged();
}
diff --git a/src/imports/platform/qquickplatformmenuitem.cpp b/src/imports/platform/qquickplatformmenuitem.cpp
index fa3fdafb..5a8b3798 100644
--- a/src/imports/platform/qquickplatformmenuitem.cpp
+++ b/src/imports/platform/qquickplatformmenuitem.cpp
@@ -43,6 +43,7 @@
#include <QtGui/qkeysequence.h>
#include <QtGui/qpa/qplatformtheme.h>
#include <QtGui/private/qguiapplication_p.h>
+#include <QtQuickTemplates2/private/qquickshortcutcontext_p_p.h>
#include "widgets/qwidgetplatform_p.h"
@@ -120,6 +121,16 @@ QQuickPlatformMenuItem::~QQuickPlatformMenuItem()
m_menu->removeItem(this);
if (m_group)
m_group->removeItem(this);
+#if QT_CONFIG(shortcut)
+ if (m_shortcutId != -1) {
+ QKeySequence sequence;
+ if (m_shortcut.type() == QVariant::Int)
+ sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt()));
+ else
+ sequence = QKeySequence::fromString(m_shortcut.toString());
+ QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(m_shortcutId, this, sequence);
+ }
+#endif
delete m_iconLoader;
m_iconLoader = nullptr;
delete m_handle;
@@ -165,8 +176,13 @@ void QQuickPlatformMenuItem::sync()
m_handle->setText(m_text);
m_handle->setFont(m_font);
m_handle->setHasExclusiveGroup(m_group && m_group->isExclusive());
- if (m_subMenu && m_subMenu->handle())
- m_handle->setMenu(m_subMenu->handle());
+ if (m_subMenu) {
+ // Sync first as dynamically created menus may need to get the
+ // handle recreated
+ m_subMenu->sync();
+ if (m_subMenu->handle())
+ m_handle->setMenu(m_subMenu->handle());
+ }
#if QT_CONFIG(shortcut)
QKeySequence sequence;
@@ -505,13 +521,50 @@ QVariant QQuickPlatformMenuItem::shortcut() const
return m_shortcut;
}
+bool QQuickPlatformMenuItem::event(QEvent *e)
+{
+#if QT_CONFIG(shortcut)
+ if (e->type() == QEvent::Shortcut) {
+ QShortcutEvent *se = static_cast<QShortcutEvent *>(e);
+ if (se->shortcutId() == m_shortcutId) {
+ activate();
+ return true;
+ }
+ }
+#endif
+ return QObject::event(e);
+}
+
void QQuickPlatformMenuItem::setShortcut(const QVariant& shortcut)
{
if (m_shortcut == shortcut)
return;
+#if QT_CONFIG(shortcut)
+ if (m_shortcutId != -1) {
+ QKeySequence sequence;
+ if (m_shortcut.type() == QVariant::Int)
+ sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt()));
+ else
+ sequence = QKeySequence::fromString(m_shortcut.toString());
+ QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(m_shortcutId, this, sequence);
+ }
+#endif
m_shortcut = shortcut;
sync();
+#if QT_CONFIG(shortcut)
+ QKeySequence sequence;
+ if (m_shortcut.type() == QVariant::Int)
+ sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt()));
+ else
+ sequence = QKeySequence::fromString(m_shortcut.toString());
+ if (!sequence.isEmpty()) {
+ m_shortcutId = QGuiApplicationPrivate::instance()->shortcutMap.addShortcut(this, sequence,
+ Qt::WindowShortcut, QQuickShortcutContext::matcher);
+ } else {
+ m_shortcutId = -1;
+ }
+#endif
emit shortcutChanged();
}
@@ -539,7 +592,6 @@ void QQuickPlatformMenuItem::setFont(const QFont& font)
/*!
\since Qt.labs.platform 1.1 (Qt 5.12)
- \qmlpropertygroup Qt.labs.platform::MenuItem::icon
\qmlproperty url Qt.labs.platform::MenuItem::icon.source
\qmlproperty string Qt.labs.platform::MenuItem::icon.name
\qmlproperty bool Qt.labs.platform::MenuItem::icon.mask
diff --git a/src/imports/platform/qquickplatformmenuitem_p.h b/src/imports/platform/qquickplatformmenuitem_p.h
index f1143e64..e3d5258a 100644
--- a/src/imports/platform/qquickplatformmenuitem_p.h
+++ b/src/imports/platform/qquickplatformmenuitem_p.h
@@ -167,6 +167,7 @@ protected:
QQuickPlatformIconLoader *iconLoader() const;
+ bool event(QEvent *e) override;
private Q_SLOTS:
void activate();
void updateIcon();
@@ -187,6 +188,7 @@ private:
QQuickPlatformMenuItemGroup *m_group;
mutable QQuickPlatformIconLoader *m_iconLoader;
QPlatformMenuItem *m_handle;
+ int m_shortcutId = -1;
friend class QQuickPlatformMenu;
friend class QQuickPlatformMenuItemGroup;
diff --git a/src/imports/platform/qquickplatformsystemtrayicon.cpp b/src/imports/platform/qquickplatformsystemtrayicon.cpp
index da483822..442da037 100644
--- a/src/imports/platform/qquickplatformsystemtrayicon.cpp
+++ b/src/imports/platform/qquickplatformsystemtrayicon.cpp
@@ -356,7 +356,6 @@ QRect QQuickPlatformSystemTrayIcon::geometry() const
/*!
\since Qt.labs.platform 1.1 (Qt 5.12)
- \qmlpropertygroup Qt.labs.platform::SystemTrayIcon::icon
\qmlproperty url Qt.labs.platform::SystemTrayIcon::icon.source
\qmlproperty string Qt.labs.platform::SystemTrayIcon::icon.name
\qmlproperty bool Qt.labs.platform::SystemTrayIcon::icon.mask
diff --git a/src/imports/platform/qtlabsplatformplugin.cpp b/src/imports/platform/qtlabsplatformplugin.cpp
index 98d5dcc4..90bdb121 100644
--- a/src/imports/platform/qtlabsplatformplugin.cpp
+++ b/src/imports/platform/qtlabsplatformplugin.cpp
@@ -91,6 +91,7 @@ void QtLabsPlatformPlugin::registerTypes(const char *uri)
qmlRegisterType<QQuickPlatformMenu>(uri, 1, 0, "Menu");
qmlRegisterType<QQuickPlatformMenuBar>(uri, 1, 0, "MenuBar");
qmlRegisterType<QQuickPlatformMenuItem>(uri, 1, 0, "MenuItem");
+ qmlRegisterType<QQuickPlatformMenuItem, 1>(uri, 1, 1, "MenuItem");
qmlRegisterType<QQuickPlatformMenuItemGroup>(uri, 1, 0, "MenuItemGroup");
qmlRegisterType<QQuickPlatformMenuSeparator>(uri, 1, 0, "MenuSeparator");
qRegisterMetaType<QPlatformMenu::MenuType>();
diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes
index da81e095..42c04c80 100644
--- a/src/imports/templates/plugins.qmltypes
+++ b/src/imports/templates/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Templates 2.14'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Templates 2.15'
Module {
dependencies: ["QtQuick 2.9", "QtQuick.Window 2.2"]
@@ -273,10 +273,11 @@ Module {
"QtQuick.Templates/ComboBox 2.0",
"QtQuick.Templates/ComboBox 2.1",
"QtQuick.Templates/ComboBox 2.14",
+ "QtQuick.Templates/ComboBox 2.15",
"QtQuick.Templates/ComboBox 2.2",
"QtQuick.Templates/ComboBox 2.5"
]
- exportMetaObjectRevisions: [0, 1, 14, 2, 5]
+ exportMetaObjectRevisions: [0, 1, 14, 15, 2, 5]
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "model"; type: "QVariant" }
Property { name: "delegateModel"; type: "QQmlInstanceModel"; isReadonly: true; isPointer: true }
@@ -301,6 +302,7 @@ Module {
Property { name: "implicitIndicatorHeight"; revision: 5; type: "double"; isReadonly: true }
Property { name: "currentValue"; revision: 14; type: "QVariant"; isReadonly: true }
Property { name: "valueRole"; revision: 14; type: "string" }
+ Property { name: "selectTextByMouse"; revision: 15; type: "bool" }
Signal {
name: "activated"
Parameter { name: "index"; type: "int" }
@@ -322,6 +324,7 @@ Module {
Signal { name: "implicitIndicatorHeightChanged"; revision: 5 }
Signal { name: "valueRoleChanged"; revision: 14 }
Signal { name: "currentValueChanged"; revision: 14 }
+ Signal { name: "selectTextByMouseChanged"; revision: 15 }
Method { name: "incrementCurrentIndex" }
Method { name: "decrementCurrentIndex" }
Method { name: "selectAll"; revision: 2 }
@@ -651,6 +654,20 @@ Module {
Signal { name: "implicitLabelHeightChanged"; revision: 5 }
}
Component {
+ name: "QQuickHeaderViewBase"
+ defaultProperty: "flickableData"
+ prototype: "QQuickTableView"
+ Property { name: "textRole"; type: "string" }
+ }
+ Component {
+ name: "QQuickHorizontalHeaderView"
+ defaultProperty: "flickableData"
+ prototype: "QQuickHeaderViewBase"
+ exports: ["QtQuick.Templates/HorizontalHeaderView 2.15"]
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickTableViewAttached"
+ }
+ Component {
name: "QQuickIcon"
Property { name: "name"; type: "string" }
Property { name: "source"; type: "QUrl" }
@@ -1265,7 +1282,6 @@ Module {
prototype: "QObject"
Property { name: "centerIn"; type: "QQuickItem"; isPointer: true }
}
- Component { name: "QQuickPopupItem"; defaultProperty: "contentData"; prototype: "QQuickPage" }
Component {
name: "QQuickProgressBar"
defaultProperty: "data"
@@ -1355,19 +1371,6 @@ Module {
Method { name: "decrease" }
}
Component {
- name: "QQuickRootItem"
- defaultProperty: "data"
- prototype: "QQuickItem"
- Method {
- name: "setWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "h"; type: "int" }
- }
- }
- Component {
name: "QQuickRoundButton"
defaultProperty: "data"
prototype: "QQuickButton"
@@ -1852,6 +1855,37 @@ Module {
exportMetaObjectRevisions: [0]
}
Component {
+ name: "QQuickTableView"
+ defaultProperty: "flickableData"
+ prototype: "QQuickFlickable"
+ exports: ["QtQuick.Templates/__TableView__ 2.15"]
+ exportMetaObjectRevisions: [15]
+ attachedType: "QQuickTableViewAttached"
+ Property { name: "rows"; type: "int"; isReadonly: true }
+ Property { name: "columns"; type: "int"; isReadonly: true }
+ Property { name: "rowSpacing"; type: "double" }
+ Property { name: "columnSpacing"; type: "double" }
+ Property { name: "rowHeightProvider"; type: "QJSValue" }
+ Property { name: "columnWidthProvider"; type: "QJSValue" }
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "reuseItems"; type: "bool" }
+ Property { name: "contentWidth"; type: "double" }
+ Property { name: "contentHeight"; type: "double" }
+ Property { name: "syncView"; revision: 14; type: "QQuickTableView"; isPointer: true }
+ Property { name: "syncDirection"; revision: 14; type: "Qt::Orientations" }
+ Signal { name: "syncViewChanged"; revision: 14 }
+ Signal { name: "syncDirectionChanged"; revision: 14 }
+ Method { name: "forceLayout" }
+ }
+ Component {
+ name: "QQuickTableViewAttached"
+ prototype: "QObject"
+ Property { name: "view"; type: "QQuickTableView"; isReadonly: true; isPointer: true }
+ Signal { name: "pooled" }
+ Signal { name: "reused" }
+ }
+ Component {
name: "QQuickText"
defaultProperty: "data"
prototype: "QQuickImplicitSizeItem"
@@ -2794,6 +2828,14 @@ Module {
Property { name: "displacement"; type: "double"; isReadonly: true }
}
Component {
+ name: "QQuickVerticalHeaderView"
+ defaultProperty: "flickableData"
+ prototype: "QQuickHeaderViewBase"
+ exports: ["QtQuick.Templates/VerticalHeaderView 2.15"]
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickTableViewAttached"
+ }
+ Component {
name: "QQuickWindow"
defaultProperty: "data"
prototype: "QWindow"
@@ -3018,6 +3060,12 @@ Module {
Method { name: "raise" }
Method { name: "lower" }
Method {
+ name: "startSystemResize"
+ type: "bool"
+ Parameter { name: "edges"; type: "Qt::Edges" }
+ }
+ Method { name: "startSystemMove"; type: "bool" }
+ Method {
name: "setTitle"
Parameter { type: "string" }
}
diff --git a/src/imports/templates/qmldir b/src/imports/templates/qmldir
index afb94818..9f3773a8 100644
--- a/src/imports/templates/qmldir
+++ b/src/imports/templates/qmldir
@@ -2,3 +2,4 @@ module QtQuick.Templates
plugin qtquicktemplates2plugin
classname QtQuickTemplates2Plugin
depends QtQuick.Window 2.2
+depends QtQuick 2.9
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 3b085c56..cee8e53d 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -142,6 +142,8 @@ private:
QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent)
: QQmlExtensionPlugin(parent), registered(false)
{
+ volatile auto initialization = &QQuickTemplates_initializeModule;
+ Q_UNUSED(initialization)
#if QT_CONFIG(shortcut)
originalContextMatcher = qt_quick_shortcut_context_matcher();
qt_quick_set_shortcut_context_matcher(QQuickShortcutContext::matcher);