diff options
Diffstat (limited to 'src/imports')
48 files changed, 412 insertions, 308 deletions
diff --git a/src/imports/controls/ApplicationWindow.qml b/src/imports/controls/ApplicationWindow.qml index 85dfd279..235ebf13 100644 --- a/src/imports/controls/ApplicationWindow.qml +++ b/src/imports/controls/ApplicationWindow.qml @@ -44,12 +44,4 @@ T.ApplicationWindow { id: window color: window.palette.window - - overlay.modal: Rectangle { - color: Color.transparent(window.palette.shadow, 0.5) - } - - overlay.modeless: Rectangle { - color: Color.transparent(window.palette.shadow, 0.12) - } } 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..2324a66f 100644 --- a/src/imports/controls/designer/RangeSliderSpecifics.qml +++ b/src/imports/controls/designer/RangeSliderSpecifics.qml @@ -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/qtquickcontrols.qdocconf b/src/imports/controls/doc/qtquickcontrols.qdocconf index d52aceb8..604b4b7d 100644 --- a/src/imports/controls/doc/qtquickcontrols.qdocconf +++ b/src/imports/controls/doc/qtquickcontrols.qdocconf @@ -33,7 +33,7 @@ qhp.QtQuickControls.subprojects.examples.title = Examples qhp.QtQuickControls.subprojects.examples.indexTitle = Qt Quick Controls Examples qhp.QtQuickControls.subprojects.examples.selectors = fake:example -depends = qtcore qtgui qtdoc qtqml qtqmlmodels qtquick qtquickdialogs qtquickcontrols1 qtquickextras qmake qtsql qtwidgets qtlabscalendar qtlabsplatform qtgraphicaleffects +depends = qtcore qtgui qtdoc qtqml qtqmlmodels qtquick qtquickdialogs qtquickcontrols1 qtquickextras qtsql qtwidgets qtlabscalendar qtlabsplatform qtgraphicaleffects qmake qtcmake # Specify the install path under QT_INSTALL_EXAMPLES # Note: paths passed to \example command must contain the parent directory, e.g. diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-overview.cmake b/src/imports/controls/doc/snippets/qtquickcontrols2-overview.cmake new file mode 100644 index 00000000..2e9d2f3f --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-overview.cmake @@ -0,0 +1,4 @@ +#! [0] +find_package(Qt6 COMPONENTS QuickControls2 REQUIRED) +target_link_libraries(mytarget Qt::QuickControls2) +#! [0] 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-cppclasses.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc index 4a8ecfea..a9147086 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc @@ -31,6 +31,7 @@ \title Qt Quick Controls C++ Classes \keyword Qt Quick Controls 2 C++ Classes \ingroup modules + \qtcmakepackage QuickControls2 \qtvariable quickcontrols2 \brief Provides classes for setting up the controls from C++. diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc index 5901663a..938b8d42 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc @@ -488,9 +488,7 @@ \section2 Customizing ApplicationWindow ApplicationWindow consists of one visual item: - \l {ApplicationWindow::background}{background}. It is also possible - to customize the \l {ApplicationWindow::overlay}{modal} and - \l {ApplicationWindow::overlay}{modeless} items. + \l {ApplicationWindow::background}{background}. \code \QtMinorVersion import QtQuick 2.\1 @@ -505,14 +503,6 @@ GradientStop { position: 1; color: "#c1bbf9" } } } - - overlay.modal: Rectangle { - color: "#8f28282a" - } - - overlay.modeless: Rectangle { - color: "#2f28282a" - } } \endcode 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/doc/src/qtquickcontrols2-imagine.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc index ac2e9cc1..bca826fd 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc @@ -87,11 +87,6 @@ \li active \li .9.png (or .png) \row - \li - \li overlay - \li modal - \li .9.png (or .png) - \row \li \l BusyIndicator \li animation \li disabled, running, mirrored, hovered diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc index fee009e6..c0047c30 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc @@ -41,7 +41,10 @@ Qt Quick Controls comes with a selection customizable styles. See \l {Styling Qt Quick Controls} for more details. - \section1 Prerequisites + + \section1 Using the Module + + \section2 QML API The \l{Qt Quick Controls QML Types}{QML types} can be imported into your application using the following import statement in your \c {.qml} file: @@ -50,22 +53,27 @@ import QtQuick.Controls 2.\1 \endqml - The \l{Qt Quick Controls C++ Classes}{C++ classes} can be included into - your application using the following include statement: + \section2 C++ API - \code - #include <QtQuickControls2> - \endcode + Using the \l{Qt Quick Controls C++ Classes}{C++ API} requires linking against the module library, + either directly or through other dependencies. + Several build tools have dedicated support for this, including CMake and qmake. - To link against the corresponding C++ libraries, add the following to your - qmake project file: + \section3 Building with CMake + Use the \c find_package() command to locate the needed module components in the Qt6 package: + + \snippet qtquickcontrols2-overview.cmake 0 + + See also the \l{Build with CMake} overview. + + \section3 Building with qmake + To configure the module for building with qmake, + add the module as a value of the QT variable in the project's .pro file: \code QT += quickcontrols2 \endcode - For more details, see \l {Getting Started with Qt Quick Controls}. - \section2 Building From Source When building from source, ensure that the \l {Qt Graphical Effects} module @@ -145,6 +153,7 @@ \section1 Topics \list + \li \l{Getting Started with Qt Quick Controls}{Getting Started} \li \l{Qt Quick Controls Guidelines}{Guidelines} \li \l{Styling Qt Quick Controls}{Styling} \li \l{Icons in Qt Quick Controls}{Icons} diff --git a/src/imports/controls/fusion/ApplicationWindow.qml b/src/imports/controls/fusion/ApplicationWindow.qml index 30c921cb..26dfbbdf 100644 --- a/src/imports/controls/fusion/ApplicationWindow.qml +++ b/src/imports/controls/fusion/ApplicationWindow.qml @@ -44,12 +44,4 @@ T.ApplicationWindow { id: window color: window.palette.window - - overlay.modal: Rectangle { - color: Fusion.topShadow - } - - overlay.modeless: Rectangle { - color: Fusion.topShadow - } } 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/ApplicationWindow.qml b/src/imports/controls/imagine/ApplicationWindow.qml index 7bfcc3f9..092da1f6 100644 --- a/src/imports/controls/imagine/ApplicationWindow.qml +++ b/src/imports/controls/imagine/ApplicationWindow.qml @@ -43,26 +43,6 @@ import QtQuick.Controls.Imagine.impl 2.12 T.ApplicationWindow { id: window - // ### remove? - overlay.modal: NinePatchImage { - source: Imagine.url + "applicationwindow-overlay" - NinePatchImageSelector on source { - states: [ - {"modal": true} - ] - } - } - - // ### remove? - overlay.modeless: NinePatchImage { - source: Imagine.url + "applicationwindow-overlay" - NinePatchImageSelector on source { - states: [ - {"modal": false} - ] - } - } - background: NinePatchImage { width: window.width height: window.height diff --git a/src/imports/controls/imagine/Drawer.qml b/src/imports/controls/imagine/Drawer.qml index 2c93ba75..8f278621 100644 --- a/src/imports/controls/imagine/Drawer.qml +++ b/src/imports/controls/imagine/Drawer.qml @@ -42,7 +42,7 @@ import QtQuick.Controls.Imagine.impl 2.12 T.Drawer { id: control - parent: T.ApplicationWindow.overlay + parent: T.Overlay.overlay implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) 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..1d6d60dd 100644 --- a/src/imports/controls/imagine/qquickninepatchimage.cpp +++ b/src/imports/controls/imagine/qquickninepatchimage.cpp @@ -46,22 +46,22 @@ QT_BEGIN_NAMESPACE struct QQuickNinePatchData { - QVector<qreal> coordsForSize(qreal count) const; + QList<qreal> coordsForSize(qreal count) const; inline bool isNull() const { return data.isEmpty(); } inline int count() const { return data.size(); } inline qreal at(int index) const { return data.at(index); } inline qreal size() const { return data.last(); } - void fill(const QVector<qreal> &coords, qreal count); + void fill(const QList<qreal> &coords, qreal count); void clear(); private: bool inverted = false; - QVector<qreal> data; + QList<qreal> data; }; -QVector<qreal> QQuickNinePatchData::coordsForSize(qreal size) const +QList<qreal> QQuickNinePatchData::coordsForSize(qreal size) const { // n = number of stretchable sections // We have to compensate when adding 0 and/or @@ -70,7 +70,7 @@ QVector<qreal> QQuickNinePatchData::coordsForSize(qreal size) const const int n = (inverted ? l - 1 : l) / 2; const qreal stretch = (size - data.last()) / n; - QVector<qreal> coords; + QList<qreal> coords; coords.reserve(l); coords.append(0); @@ -87,7 +87,7 @@ QVector<qreal> QQuickNinePatchData::coordsForSize(qreal size) const return coords; } -void QQuickNinePatchData::fill(const QVector<qreal> &coords, qreal size) +void QQuickNinePatchData::fill(const QList<qreal> &coords, qreal size) { data.clear(); inverted = coords.isEmpty() || coords.first() != 0; @@ -151,8 +151,8 @@ void QQuickNinePatchNode::initialize(QSGTexture *texture, const QSizeF &targetSi m_geometry.allocate(xlen * ylen, verticesPerQuad * quads); QSGGeometry::TexturedPoint2D *vertices = m_geometry.vertexDataAsTexturedPoint2D(); - QVector<qreal> xCoords = xDivs.coordsForSize(targetSize.width()); - QVector<qreal> yCoords = yDivs.coordsForSize(targetSize.height()); + QList<qreal> xCoords = xDivs.coordsForSize(targetSize.width()); + QList<qreal> yCoords = yDivs.coordsForSize(targetSize.height()); for (int y = 0; y < ylen; ++y) { for (int x = 0; x < xlen; ++x, ++vertices) @@ -189,8 +189,8 @@ class QQuickNinePatchImagePrivate : public QQuickImagePrivate public: void updatePatches(); - void updatePaddings(const QSizeF &size, const QVector<qreal> &horizontal, const QVector<qreal> &vertical); - void updateInsets(const QVector<qreal> &horizontal, const QVector<qreal> &vertical); + void updatePaddings(const QSizeF &size, const QList<qreal> &horizontal, const QList<qreal> &vertical); + void updateInsets(const QList<qreal> &horizontal, const QList<qreal> &vertical); bool resetNode = false; qreal topPadding = 0; @@ -207,10 +207,10 @@ public: QQuickNinePatchData yDivs; }; -static QVector<qreal> readCoords(const QRgb *data, int from, int count, int offset, QRgb color) +static QList<qreal> readCoords(const QRgb *data, int from, int count, int offset, QRgb color) { int p1 = -1; - QVector<qreal> coords; + QList<qreal> coords; for (int i = 0; i < count; ++i) { int p2 = from + i * offset; if (data[p2] == color) { @@ -243,17 +243,17 @@ void QQuickNinePatchImagePrivate::updatePatches() xDivs.fill(readCoords(data, 1, w - 1, 1, black), w - 2); // top left -> top right yDivs.fill(readCoords(data, w, h - 1, w, black), h - 2); // top left -> bottom left - QVector<qreal> hInsets = readCoords(data, (h - 1) * w + 1, w - 1, 1, red); // bottom left -> bottom right - QVector<qreal> vInsets = readCoords(data, 2 * w - 1, h - 1, w, red); // top right -> bottom right + QList<qreal> hInsets = readCoords(data, (h - 1) * w + 1, w - 1, 1, red); // bottom left -> bottom right + QList<qreal> vInsets = readCoords(data, 2 * w - 1, h - 1, w, red); // top right -> bottom right updateInsets(hInsets, vInsets); const QSizeF sz(w - leftInset - rightInset, h - topInset - bottomInset); - QVector<qreal> hPaddings = readCoords(data, (h - 1) * w + leftInset + 1, sz.width() - 2, 1, black); // bottom left -> bottom right - QVector<qreal> vPaddings = readCoords(data, (2 + topInset) * w - 1, sz.height() - 2, w, black); // top right -> bottom right + QList<qreal> hPaddings = readCoords(data, (h - 1) * w + leftInset + 1, sz.width() - 2, 1, black); // bottom left -> bottom right + QList<qreal> vPaddings = readCoords(data, (2 + topInset) * w - 1, sz.height() - 2, w, black); // top right -> bottom right updatePaddings(sz, hPaddings, vPaddings); } -void QQuickNinePatchImagePrivate::updatePaddings(const QSizeF &size, const QVector<qreal> &horizontal, const QVector<qreal> &vertical) +void QQuickNinePatchImagePrivate::updatePaddings(const QSizeF &size, const QList<qreal> &horizontal, const QList<qreal> &vertical) { Q_Q(QQuickNinePatchImage); qreal oldTopPadding = topPadding; @@ -287,7 +287,7 @@ void QQuickNinePatchImagePrivate::updatePaddings(const QSizeF &size, const QVect emit q->rightPaddingChanged(); } -void QQuickNinePatchImagePrivate::updateInsets(const QVector<qreal> &horizontal, const QVector<qreal> &vertical) +void QQuickNinePatchImagePrivate::updateInsets(const QList<qreal> &horizontal, const QList<qreal> &vertical) { Q_Q(QQuickNinePatchImage); qreal oldTopInset = topInset; diff --git a/src/imports/controls/material/ApplicationWindow.qml b/src/imports/controls/material/ApplicationWindow.qml index 6a10ed7f..5b8cefac 100644 --- a/src/imports/controls/material/ApplicationWindow.qml +++ b/src/imports/controls/material/ApplicationWindow.qml @@ -43,14 +43,4 @@ T.ApplicationWindow { id: window color: Material.backgroundColor - - overlay.modal: Rectangle { - color: window.Material.backgroundDimColor - Behavior on opacity { NumberAnimation { duration: 150 } } - } - - overlay.modeless: Rectangle { - color: window.Material.backgroundDimColor - Behavior on opacity { NumberAnimation { duration: 150 } } - } } diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index e4e5f935..a9bdd934 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -65,7 +65,7 @@ T.ComboBox { delegate: MenuItem { 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 } 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/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp index 35afeb00..08f47990 100644 --- a/src/imports/controls/material/qquickmaterialstyle.cpp +++ b/src/imports/controls/material/qquickmaterialstyle.cpp @@ -661,6 +661,7 @@ void QQuickMaterialStyle::setForeground(const QVariant &var) m_foreground = foreground; propagateForeground(); emit foregroundChanged(); + emit paletteChanged(); } void QQuickMaterialStyle::inheritForeground(uint foreground, bool custom, bool has) 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/ApplicationWindow.qml b/src/imports/controls/universal/ApplicationWindow.qml index 153b9e8e..80cda477 100644 --- a/src/imports/controls/universal/ApplicationWindow.qml +++ b/src/imports/controls/universal/ApplicationWindow.qml @@ -45,14 +45,6 @@ T.ApplicationWindow { color: Universal.background - overlay.modal: Rectangle { - color: window.Universal.baseLowColor - } - - overlay.modeless: Rectangle { - color: window.Universal.baseLowColor - } - FocusRectangle { parent: window.activeFocusControl width: parent ? parent.width : 0 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/controls/universal/qquickuniversalfocusrectangle.cpp b/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp index 88b78e10..51508c6f 100644 --- a/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp +++ b/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp @@ -72,7 +72,7 @@ void QQuickUniversalFocusRectangle::paint(QPainter *painter) p.drawRect(bounds); pen.setColor(Qt::black); - pen.setDashPattern(QVector<qreal>(2, 1)); + pen.setDashPattern(QList<qreal>(2, 1)); p.setPen(pen); p.drawRect(bounds); diff --git a/src/imports/platform/qquickplatformfiledialog.cpp b/src/imports/platform/qquickplatformfiledialog.cpp index 2ef08ef6..3b9ceab2 100644 --- a/src/imports/platform/qquickplatformfiledialog.cpp +++ b/src/imports/platform/qquickplatformfiledialog.cpp @@ -36,7 +36,7 @@ #include "qquickplatformfiledialog_p.h" -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -86,7 +86,6 @@ QT_BEGIN_NAMESPACE \li Linux (when running with the GTK+ platform theme) \li macOS \li Windows - \li WinRT \endlist \input includes/widgets.qdocinc 1 @@ -611,21 +610,21 @@ static QString extractName(const QString &filter) return filter.left(filter.indexOf(QLatin1Char('(')) - 1); } -static QString extractExtension(const QString &filter) +static QString extractExtension(QStringView filter) { - return filter.mid(filter.indexOf(QLatin1Char('.')) + 1); + return filter.mid(filter.indexOf(QLatin1Char('.')) + 1).toString(); } -static QStringList extractExtensions(const QString &filter) +static QStringList extractExtensions(QStringView filter) { QStringList extensions; const int from = filter.indexOf(QLatin1Char('(')); const int to = filter.lastIndexOf(QLatin1Char(')')) - 1; if (from >= 0 && from < to) { - const QStringRef ref = filter.midRef(from + 1, to - from); - const QVector<QStringRef> exts = ref.split(QLatin1Char(' '), Qt::SkipEmptyParts); - for (const QStringRef &ref : exts) - extensions += extractExtension(ref.toString()); + const QStringView ref = filter.mid(from + 1, to - from); + const QList<QStringView> exts = ref.split(QLatin1Char(' '), Qt::SkipEmptyParts); + for (const QStringView &ref : exts) + extensions += extractExtension(ref); } return extensions; diff --git a/src/imports/platform/qquickplatformfolderdialog.cpp b/src/imports/platform/qquickplatformfolderdialog.cpp index 4ae6341e..a28dc828 100644 --- a/src/imports/platform/qquickplatformfolderdialog.cpp +++ b/src/imports/platform/qquickplatformfolderdialog.cpp @@ -83,7 +83,6 @@ QT_BEGIN_NAMESPACE \li Linux (when running with the GTK+ platform theme) \li macOS \li Windows - \li WinRT \endlist \input includes/widgets.qdocinc 1 diff --git a/src/imports/platform/qquickplatformmenu.cpp b/src/imports/platform/qquickplatformmenu.cpp index 8954d439..7219ef54 100644 --- a/src/imports/platform/qquickplatformmenu.cpp +++ b/src/imports/platform/qquickplatformmenu.cpp @@ -419,8 +419,7 @@ QQuickPlatformMenuItem *QQuickPlatformMenu::menuItem() const m_menuItem = new QQuickPlatformMenuItem(that); m_menuItem->setSubMenu(that); m_menuItem->setText(m_title); - m_menuItem->setIconName(iconName()); - m_menuItem->setIconSource(iconSource()); + m_menuItem->setIcon(icon()); m_menuItem->setVisible(m_visible); m_menuItem->setEnabled(m_enabled); m_menuItem->componentComplete(); @@ -542,51 +541,6 @@ void QQuickPlatformMenu::setTitle(const QString &title) } /*! - \qmlproperty url Qt.labs.platform::Menu::iconSource - \deprecated Use icon.source instead -*/ -QUrl QQuickPlatformMenu::iconSource() const -{ - return icon().source(); -} - -void QQuickPlatformMenu::setIconSource(const QUrl& source) -{ - QQuickPlatformIcon newIcon = icon(); - if (source == newIcon.source()) - return; - - if (m_menuItem) - m_menuItem->setIconSource(source); - - newIcon.setSource(source); - iconLoader()->setIcon(newIcon); - emit iconSourceChanged(); -} - -/*! - \qmlproperty string Qt.labs.platform::Menu::iconName - \deprecated Use icon.name instead -*/ -QString QQuickPlatformMenu::iconName() const -{ - return icon().name(); -} - -void QQuickPlatformMenu::setIconName(const QString& name) -{ - QQuickPlatformIcon newIcon = icon(); - if (name == newIcon.name()) - return; - - if (m_menuItem) - m_menuItem->setIconName(name); - - newIcon.setName(name); - iconLoader()->setIcon(newIcon); - emit iconNameChanged();} - -/*! \qmlproperty font Qt.labs.platform::Menu::font This property holds the menu's font. diff --git a/src/imports/platform/qquickplatformmenu_p.h b/src/imports/platform/qquickplatformmenu_p.h index eb18f66b..089e1f89 100644 --- a/src/imports/platform/qquickplatformmenu_p.h +++ b/src/imports/platform/qquickplatformmenu_p.h @@ -85,8 +85,6 @@ class QQuickPlatformMenu : public QObject, public QQmlParserStatus Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged FINAL) Q_PROPERTY(QPlatformMenu::MenuType type READ type WRITE setType NOTIFY typeChanged FINAL) Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) - Q_PROPERTY(QUrl iconSource READ iconSource WRITE setIconSource NOTIFY iconSourceChanged FINAL) - Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged FINAL) Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL) Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 1) Q_ENUMS(QPlatformMenu::MenuType) @@ -130,12 +128,6 @@ public: QString title() const; void setTitle(const QString &title); - QUrl iconSource() const; - void setIconSource(const QUrl &source); - - QString iconName() const; - void setIconName(const QString &name); - QFont font() const; void setFont(const QFont &font); @@ -165,8 +157,6 @@ Q_SIGNALS: void parentMenuChanged(); void systemTrayIconChanged(); void titleChanged(); - void iconSourceChanged(); - void iconNameChanged(); void enabledChanged(); void visibleChanged(); void minimumWidthChanged(); diff --git a/src/imports/platform/qquickplatformmenuitem.cpp b/src/imports/platform/qquickplatformmenuitem.cpp index b63f7202..11cf98b4 100644 --- a/src/imports/platform/qquickplatformmenuitem.cpp +++ b/src/imports/platform/qquickplatformmenuitem.cpp @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE \image qtlabsplatform-menu.png - A menu item consists of an \l {iconSource}{icon}, \l text, and \l shortcut. + A menu item consists of an \l icon, \l text, and \l shortcut. \code Menu { @@ -458,46 +458,6 @@ void QQuickPlatformMenuItem::setText(const QString &text) } /*! - \qmlproperty url Qt.labs.platform::MenuItem::iconSource - \deprecated Use icon.source instead -*/ -QUrl QQuickPlatformMenuItem::iconSource() const -{ - return icon().source(); -} - -void QQuickPlatformMenuItem::setIconSource(const QUrl& source) -{ - QQuickPlatformIcon newIcon = icon(); - if (source == newIcon.source()) - return; - - newIcon.setSource(source); - iconLoader()->setIcon(newIcon); - emit iconSourceChanged(); -} - -/*! - \qmlproperty string Qt.labs.platform::MenuItem::iconName - \deprecated Use icon.name instead -*/ -QString QQuickPlatformMenuItem::iconName() const -{ - return icon().name(); -} - -void QQuickPlatformMenuItem::setIconName(const QString& name) -{ - QQuickPlatformIcon newIcon = icon(); - if (name == newIcon.name()) - return; - - newIcon.setName(name); - iconLoader()->setIcon(newIcon); - emit iconNameChanged(); -} - -/*! \qmlproperty keysequence Qt.labs.platform::MenuItem::shortcut This property holds the menu item's shortcut. diff --git a/src/imports/platform/qquickplatformmenuitem_p.h b/src/imports/platform/qquickplatformmenuitem_p.h index e3d5258a..c1e6cc30 100644 --- a/src/imports/platform/qquickplatformmenuitem_p.h +++ b/src/imports/platform/qquickplatformmenuitem_p.h @@ -78,8 +78,6 @@ class QQuickPlatformMenuItem : public QObject, public QQmlParserStatus Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL) Q_PROPERTY(QPlatformMenuItem::MenuRole role READ role WRITE setRole NOTIFY roleChanged FINAL) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) - Q_PROPERTY(QUrl iconSource READ iconSource WRITE setIconSource NOTIFY iconSourceChanged FINAL) - Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged FINAL) Q_PROPERTY(QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL) Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL) Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION 1) @@ -123,12 +121,6 @@ public: QString text() const; void setText(const QString &text); - QUrl iconSource() const; - void setIconSource(const QUrl &source); - - QString iconName() const; - void setIconName(const QString &name); - QVariant shortcut() const; void setShortcut(const QVariant& shortcut); @@ -155,8 +147,6 @@ Q_SIGNALS: void checkedChanged(); void roleChanged(); void textChanged(); - void iconSourceChanged(); - void iconNameChanged(); void shortcutChanged(); void fontChanged(); Q_REVISION(1) void iconChanged(); diff --git a/src/imports/platform/qquickplatformmenuitemgroup_p.h b/src/imports/platform/qquickplatformmenuitemgroup_p.h index 8b3531d9..57499347 100644 --- a/src/imports/platform/qquickplatformmenuitemgroup_p.h +++ b/src/imports/platform/qquickplatformmenuitemgroup_p.h @@ -49,7 +49,7 @@ // #include <QtCore/qobject.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> #include <QtQml/qqml.h> QT_BEGIN_NAMESPACE @@ -113,7 +113,7 @@ private: bool m_visible; bool m_exclusive; QQuickPlatformMenuItem *m_checkedItem; - QVector<QQuickPlatformMenuItem*> m_items; + QList<QQuickPlatformMenuItem*> m_items; }; QT_END_NAMESPACE diff --git a/src/imports/platform/qquickplatformmessagedialog.cpp b/src/imports/platform/qquickplatformmessagedialog.cpp index 075b4d62..f2e0970c 100644 --- a/src/imports/platform/qquickplatformmessagedialog.cpp +++ b/src/imports/platform/qquickplatformmessagedialog.cpp @@ -99,7 +99,6 @@ QT_BEGIN_NAMESPACE \list \li iOS \li Android - \li WinRT \endlist \input includes/widgets.qdocinc 1 diff --git a/src/imports/platform/qquickplatformsystemtrayicon.cpp b/src/imports/platform/qquickplatformsystemtrayicon.cpp index 4a96b38f..1631e449 100644 --- a/src/imports/platform/qquickplatformsystemtrayicon.cpp +++ b/src/imports/platform/qquickplatformsystemtrayicon.cpp @@ -253,48 +253,6 @@ void QQuickPlatformSystemTrayIcon::setVisible(bool visible) } /*! - \qmlproperty url Qt.labs.platform::SystemTrayIcon::iconSource - \deprecated Use icon.source instead. - \sa icon -*/ -QUrl QQuickPlatformSystemTrayIcon::iconSource() const -{ - return icon().source(); -} - -void QQuickPlatformSystemTrayIcon::setIconSource(const QUrl& source) -{ - QQuickPlatformIcon newIcon = icon(); - if (source == newIcon.source()) - return; - - newIcon.setSource(source); - iconLoader()->setIcon(newIcon); - emit iconSourceChanged(); -} - -/*! - \qmlproperty string Qt.labs.platform::SystemTrayIcon::iconName - \deprecated Use icon.name instead. - \sa icon -*/ -QString QQuickPlatformSystemTrayIcon::iconName() const -{ - return icon().name(); -} - -void QQuickPlatformSystemTrayIcon::setIconName(const QString& name) -{ - QQuickPlatformIcon newIcon = icon(); - if (name == newIcon.name()) - return; - - newIcon.setName(name); - iconLoader()->setIcon(newIcon); - emit iconNameChanged(); -} - -/*! \qmlproperty string Qt.labs.platform::SystemTrayIcon::tooltip This property holds the tooltip of the system tray icon. diff --git a/src/imports/platform/qquickplatformsystemtrayicon_p.h b/src/imports/platform/qquickplatformsystemtrayicon_p.h index e43366cb..0216aee3 100644 --- a/src/imports/platform/qquickplatformsystemtrayicon_p.h +++ b/src/imports/platform/qquickplatformsystemtrayicon_p.h @@ -70,8 +70,6 @@ class QQuickPlatformSystemTrayIcon : public QObject, public QQmlParserStatus Q_PROPERTY(bool available READ isAvailable CONSTANT FINAL) Q_PROPERTY(bool supportsMessages READ supportsMessages CONSTANT FINAL) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) - Q_PROPERTY(QUrl iconSource READ iconSource WRITE setIconSource NOTIFY iconSourceChanged FINAL) - Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged FINAL) Q_PROPERTY(QString tooltip READ tooltip WRITE setTooltip NOTIFY tooltipChanged FINAL) Q_PROPERTY(QQuickPlatformMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL) Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged FINAL REVISION 1) @@ -90,12 +88,6 @@ public: bool isVisible() const; void setVisible(bool visible); - QUrl iconSource() const; - void setIconSource(const QUrl &source); - - QString iconName() const; - void setIconName(const QString &name); - QString tooltip() const; void setTooltip(const QString &tooltip); @@ -118,8 +110,6 @@ Q_SIGNALS: void activated(QPlatformSystemTrayIcon::ActivationReason reason); void messageClicked(); void visibleChanged(); - void iconSourceChanged(); - void iconNameChanged(); void tooltipChanged(); void menuChanged(); Q_REVISION(1) void geometryChanged(); diff --git a/src/imports/platform/widgets/qwidgetplatform_p.h b/src/imports/platform/widgets/qwidgetplatform_p.h index c203406c..cbdaa24a 100644 --- a/src/imports/platform/widgets/qwidgetplatform_p.h +++ b/src/imports/platform/widgets/qwidgetplatform_p.h @@ -111,8 +111,8 @@ namespace QWidgetPlatform if (available) return new T(parent); #else - Q_UNUSED(parent) - Q_UNUSED(available) + Q_UNUSED(parent); + Q_UNUSED(available); #endif return nullptr; } diff --git a/src/imports/platform/widgets/qwidgetplatformmenu_p.h b/src/imports/platform/widgets/qwidgetplatformmenu_p.h index 4d58f528..9d1ef57e 100644 --- a/src/imports/platform/widgets/qwidgetplatformmenu_p.h +++ b/src/imports/platform/widgets/qwidgetplatformmenu_p.h @@ -90,7 +90,7 @@ public: private: QScopedPointer<QMenu> m_menu; - QVector<QWidgetPlatformMenuItem *> m_items; + QList<QWidgetPlatformMenuItem *> m_items; }; QT_END_NAMESPACE 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" } } |