From 6356a11e07cbda92b3aa78732b34375cd6c9436e Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Wed, 31 Oct 2018 11:13:12 +0200 Subject: Add changes file for Qt 5.12.0 Change-Id: Ia703f49cf0218087a7b51a63d1a86423573ed62d Reviewed-by: Mitch Curtis --- dist/changes-5.12.0 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dist/changes-5.12.0 diff --git a/dist/changes-5.12.0 b/dist/changes-5.12.0 new file mode 100644 index 00000000..0453ff44 --- /dev/null +++ b/dist/changes-5.12.0 @@ -0,0 +1,25 @@ +Qt 5.12 introduces many new features and improvements as well as bugfixes +over the 5.11.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Dialogs * +**************************************************************************** + + - [QTBUG-69095] Add a signal to the Dialog class to allow the client to + intercept the button presses and optionally prevent further processing + of the event. This allows performing some validation on the fields + before dismissing the dialog. -- cgit v1.2.1 From 08a6a6489e12450befcace2659f123e6c1f1be9a Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 9 Nov 2018 11:45:42 +0100 Subject: Doc: Ignore WinRT-specific qml files from the documentation build These files contain no documentation and cause conflicts with documentation sources that actually try to document them. Task-number: QTBUG-71174 Change-Id: I7382a1e05bed2070c45a4234cc3389a02922cdbf Reviewed-by: Paul Wicking Reviewed-by: Mitch Curtis --- src/controls/doc/qtquickcontrols1.qdocconf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controls/doc/qtquickcontrols1.qdocconf b/src/controls/doc/qtquickcontrols1.qdocconf index 29a01ae2..d2ea0c47 100644 --- a/src/controls/doc/qtquickcontrols1.qdocconf +++ b/src/controls/doc/qtquickcontrols1.qdocconf @@ -69,7 +69,9 @@ excludefiles += ../TableView.qml \ excludedirs += ../Styles/Desktop \ ../Styles/Android \ - ../Styles/iOS + ../Styles/iOS \ + ../Styles/WinRT + imagedirs += images \ ../../extras/doc/images -- cgit v1.2.1 From 6b7f91c097f7e47cf2683d08b5838fd061a872bd Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Fri, 16 Nov 2018 09:22:24 +0200 Subject: Add changes file for Qt 5.11.3 + d76117604a9e04a9a66c0279687cc7dc54b9dc68 Doc: Add missing documentation for styleData.role in itemDelegate + cf957e407030fc260bd86882cf2f79724126abdd Bump version Change-Id: I26561264674a30970335d571acd0d8b61f3d8382 Reviewed-by: Frederik Gladhorn --- dist/changes-5.11.3 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dist/changes-5.11.3 diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3 new file mode 100644 index 00000000..f71fa341 --- /dev/null +++ b/dist/changes-5.11.3 @@ -0,0 +1,20 @@ +Qt 5.11.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.2. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. -- cgit v1.2.1 From 7250a5c2f9dbb61e2c8289f1bf28db2300ce43ad Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 9 Nov 2018 15:49:57 +0100 Subject: Fix button menus not opening on the second attempt Assign a parent to the QQmlComponent returned by QQuickControlSettings1::styleComponent() so that it doesn't get garbage collected by the QML engine. This was not an issue until 5.12, but it seems like a good idea regardless. Change-Id: I53265b23afab62e2276fe6e10d976a93a4f12e6f Fixes: QTBUG-71238 Reviewed-by: Frederik Gladhorn Reviewed-by: Shawn Rutledge --- src/controls/Private/qquickcontrolsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp index 95c656b2..d06f931a 100644 --- a/src/controls/Private/qquickcontrolsettings.cpp +++ b/src/controls/Private/qquickcontrolsettings.cpp @@ -161,7 +161,7 @@ QQmlComponent *QQuickControlSettings1::styleComponent(const QUrl &styleDirUrl, c styleFileUrl = makeStyleComponentUrl(controlStyleName, m_styleMap.value(QStringLiteral("Base")).m_styleDirPath); } - return new QQmlComponent(qmlEngine(control), styleFileUrl); + return new QQmlComponent(qmlEngine(control), styleFileUrl, this); } static QString relativeStyleImportPath(QQmlEngine *engine, const QString &styleName) -- cgit v1.2.1 From 80ba7e03afe18cc44715f7cf9a038bedff01f328 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Thu, 15 Nov 2018 00:13:59 +0100 Subject: QQuickTreeModelAdaptor1: fix out of range issue in selectionForRowRange If the index of the "to" row is invalid and the one from the "from" row is good, then the method will try to access an invalid index. This patch fixes that by ensuring that if the "to" row is invalid (when, for example, the mouse cursor goes out of the view while multiple selection is activated), the "to" index used stays valid. [ChangeLog][Controls][QQuickTreeModelAdaptor1] Fixed an issue where an invalid access was done if either extended or multiple selection was in use and the mouse went out of the view on top of the model. Fixes: QTBUG-71789 Change-Id: I32d8a20ee9ffc1c40584f17c27ceb06d48b81ff0 Reviewed-by: Alex Blasche --- src/controls/Private/qquicktreemodeladaptor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp index 495abc9c..d2ed42b2 100644 --- a/src/controls/Private/qquicktreemodeladaptor.cpp +++ b/src/controls/Private/qquicktreemodeladaptor.cpp @@ -283,6 +283,8 @@ QItemSelection QQuickTreeModelAdaptor1::selectionForRowRange(const QModelIndex return QItemSelection(); return QItemSelection(toIndex, toIndex); } + + to = qMax(to, 0); if (from > to) qSwap(from, to); -- cgit v1.2.1 From 8abf15b4ba974576e13f37b09117454fc1e6b1d9 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 6 Dec 2018 22:38:31 +0100 Subject: Static: Install the qmldir for the Styles module Mention qmldir in AUX_QML_FILES to ensure that it is always copied to the build directory. qml_module.prf usually takes care of this by having QML_FILES in qmldir.files with INSTALLS += qmldir, but with CONFIG += builtin_resources (set for static) that's not the case. AUX_QML_FILES is the correct variable though. Task-number: QTBUG-67644 Change-Id: I6cf580586dec0bf7b44c89b95134d7d7f683102e Reviewed-by: Mitch Curtis --- src/controls/Styles/styles.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/Styles/styles.pri b/src/controls/Styles/styles.pri index 67c1ab76..ff3db817 100644 --- a/src/controls/Styles/styles.pri +++ b/src/controls/Styles/styles.pri @@ -108,6 +108,6 @@ STYLES_QML_FILES += \ $$PWD/Base/images/knob.png \ $$PWD/Base/images/needle.png -STYLES_QML_FILES += $$PWD/qmldir +AUX_QML_FILES += $$PWD/qmldir ios:static: include(iOS/iOS.pri) !qtquickcompiler|static: QML_FILES += $$STYLES_QML_FILES -- cgit v1.2.1 From a9436b597916d5619cbbbbd103bc482ddaf4359a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 7 Dec 2018 14:26:07 +0100 Subject: Static: Register the base style qml files so they can be found If the files are not registered then it will look for them on the disk instead because it has no entry for them. This changed at some point in the Qt 5.12.0 release but has technically been wrong for some time as they should always be registered. Change-Id: I8246a4f5fb4d94ebc5f7ca262d1821a409eb6c9f Fixes: QTBUG-72338 Reviewed-by: Mitch Curtis --- src/controls/Styles/styles.pri | 1 + src/controls/controls.pro | 1 + src/controls/plugin.cpp | 49 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/controls/Styles/styles.pri b/src/controls/Styles/styles.pri index ff3db817..c29cebfd 100644 --- a/src/controls/Styles/styles.pri +++ b/src/controls/Styles/styles.pri @@ -109,5 +109,6 @@ STYLES_QML_FILES += \ $$PWD/Base/images/needle.png AUX_QML_FILES += $$PWD/qmldir +static: QML_FILES += $$AUX_QML_FILES ios:static: include(iOS/iOS.pri) !qtquickcompiler|static: QML_FILES += $$STYLES_QML_FILES diff --git a/src/controls/controls.pro b/src/controls/controls.pro index 75871bf0..3119d33d 100644 --- a/src/controls/controls.pro +++ b/src/controls/controls.pro @@ -45,6 +45,7 @@ qtquickcompiler { } else { QML_FILES += $$CONTROLS_QML_FILES !static: CONFIG += qmlcache + else: CONTROLS_QML_FILES += qmldir } SOURCES += $$PWD/plugin.cpp diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp index 8aca0c49..82eef800 100644 --- a/src/controls/plugin.cpp +++ b/src/controls/plugin.cpp @@ -73,10 +73,12 @@ QT_BEGIN_NAMESPACE -static const struct { +struct QmldirStruct { const char *type; int major, minor; -} qmldir [] = { +}; + +static const QmldirStruct qmldir [] = { { "ApplicationWindow", 1, 0 }, { "Button", 1, 0 }, { "Calendar", 1, 2 }, @@ -119,6 +121,43 @@ static const struct { { "Slider", 1, 6 } }; +static const QmldirStruct stylesQmldir [] = { + { "ApplicationWindowStyle", 1, 3 }, + { "ButtonStyle", 1, 0 }, + { "BusyIndicatorStyle", 1, 1 }, + { "CalendarStyle", 1, 1 }, + { "CheckBoxStyle", 1, 0 }, + { "ComboBoxStyle", 1, 0 }, + { "MenuStyle", 1, 2 }, + { "MenuBarStyle", 1, 2 }, + { "ProgressBarStyle", 1, 0 }, + { "RadioButtonStyle", 1, 0 }, + { "ScrollViewStyle", 1, 0 }, + { "SliderStyle", 1, 0 }, + { "SpinBoxStyle", 1, 1 }, + { "SwitchStyle", 1, 1 }, + { "TabViewStyle", 1, 0 }, + { "TableViewStyle", 1, 0 }, + { "TreeViewStyle", 1, 4 }, + { "TextAreaStyle", 1, 1 }, + { "TextFieldStyle", 1, 0 }, + { "ToolBarStyle", 1, 0 }, + { "StatusBarStyle", 1, 0 }, + { "CircularGaugeStyle", 1, 0 }, + { "CircularButtonStyle", 1, 0 }, + { "CircularTickmarkLabelStyle", 1, 0 }, + { "CommonStyleHelper", 1, 0 }, + { "DelayButtonStyle", 1, 0 }, + { "DialStyle", 1, 1 }, + { "GaugeStyle", 1, 0 }, + { "HandleStyle", 1, 0 }, + { "HandleStyleHelper", 1, 0 }, + { "PieMenuStyle", 1, 3 }, + { "StatusIndicatorStyle", 1, 1 }, + { "ToggleButtonStyle", 1, 0 }, + { "TumblerStyle", 1, 2 } +}; + QtQuickControls1Plugin::QtQuickControls1Plugin(QObject *parent) : QQmlExtensionPlugin(parent) { } @@ -172,6 +211,12 @@ void QtQuickControls1Plugin::registerTypes(const char *uri) #ifdef QT_WIDGETS_LIB qmlRegisterType(private_uri, 1, 0, "StyleItem"); #endif + + const char *styles_uri = "QtQuick.Controls.Styles"; + const QString baseStyleLocation = filesLocation + "/Styles/Base"; + for (int i = 0; i < int(sizeof(stylesQmldir)/sizeof(stylesQmldir[0])); i++) + qmlRegisterType(QUrl(baseStyleLocation + "/" + stylesQmldir[i].type + ".qml"), styles_uri, + stylesQmldir[i].major, stylesQmldir[i].minor, stylesQmldir[i].type); } void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *uri) -- cgit v1.2.1 From 69c7e95da101d4d66d25c4850f3591d4ccd2bbc1 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 27 Nov 2018 14:50:42 +0100 Subject: Insert before next item when it exists Something is off about the way the last child of previous item is calculated, but we can work-around that by just using the next element when it exist. In the case there isn't a next element, we will hit the fallback in 'last child of previous' and insert at the end anyway. Fixes: QTBUG-66062 Change-Id: Iced69d52c4587434ffdbb09b08b3441289f34eba Reviewed-by: Frederik Gladhorn --- src/controls/Private/qquicktreemodeladaptor.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp index d2ed42b2..287b388f 100644 --- a/src/controls/Private/qquicktreemodeladaptor.cpp +++ b/src/controls/Private/qquicktreemodeladaptor.cpp @@ -362,8 +362,15 @@ void QQuickTreeModelAdaptor1::showModelChildItems(const TreeItem &parentItem, in if (start == 0) { startIdx = rowIdx; } else { - const QModelIndex &prevSiblingIdx = m_model->index(start - 1, 0, parentIndex); - startIdx = lastChildIndex(prevSiblingIdx) + 1; + // Prefer to insert before next sibling instead of after last child of previous, as + // the latter is potentially buggy, see QTBUG-66062 + const QModelIndex &nextSiblingIdx = m_model->index(end + 1, 0, parentIndex); + if (nextSiblingIdx.isValid()) { + startIdx = itemIndex(nextSiblingIdx); + } else { + const QModelIndex &prevSiblingIdx = m_model->index(start - 1, 0, parentIndex); + startIdx = lastChildIndex(prevSiblingIdx) + 1; + } } int rowDepth = rowIdx == 0 ? 0 : parentItem.depth + 1; -- cgit v1.2.1