This was created by checking out qtquickcontrols2 and checking out the kf5
patches from kde.  For more details of those, see
https://dot.kde.org/2021/04/06/announcing-kdes-qt-5-patch-collection

from kde:
 git clone https://invent.kde.org/qt/qt/qtquickcontrols2
 cd qtquickcontrols2
 git checkout -t origin/5.15
 git format-patch origin/5.15.2..origin/kde/5.15

To update for new patches, git pull and then rerun git format-patch.

Last updated: 2021-01-25

Following patches commented:
01-Bump-version.patch bumps the version to 5.15.3, unwanted
02-Add-changes-file-for-Qt-5.15.2.patch already applied

#From 2e32d0975eb058c2076597c03b07c67b7ce9027f Mon Sep 17 00:00:00 2001
#From: Jani Heikkinen <jani.heikkinen@qt.io>
#Date: Tue, 27 Oct 2020 07:49:32 +0200
#Subject: [PATCH 1/8] Bump version
#
#Change-Id: I00ff69d1b2b36efd64ba21d8cf89b2caad71ff33
#---
# .qmake.conf | 2 +-
# 1 file changed, 1 insertion(+), 1 deletion(-)
#
#diff --git a/.qmake.conf b/.qmake.conf
#index 4d40e4272..25b262d67 100644
#--- a/.qmake.conf
#+++ b/.qmake.conf
#@@ -5,4 +5,4 @@ DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST
# 
# QQC2_SOURCE_TREE = $$PWD
# 
#-MODULE_VERSION = 5.15.2
#+MODULE_VERSION = 5.15.3
#-- 
#2.33.0
#
#From 5122e1faeff59a03fa1ebf0926ba75204cb4cc39 Mon Sep 17 00:00:00 2001
#From: Antti Kokko <antti.kokko@qt.io>
#Date: Tue, 27 Oct 2020 10:02:10 +0200
#Subject: [PATCH 2/8] Add changes file for Qt 5.15.2
#
#- 6822a725cffd20a21475c57d7195465c59f5903b tst_qquickpopup: fix setOverlayParentToNull test
#- 2abdd399bf359e2459e4ae7c6456736087aa1c32 Add changes file for Qt 5.15.1
#+ 1740afc07950fb0ae3aca0aad2534191805ff672 Material: fix binding loops when binding between attached properties
#+ 454ca2f441ae3d400255471a7ebe850c6779ad0e Update the text when the inputted value is out of range
#+ 50f3c1b5551228d932f302a06580c70a3a77c336 Unregister the accessible observer before deleting the private object
#+ 59aaf903cc54a7cfba00ec3859ca59292f4cbf4a Allow the preparation of the exit transition even if it did have focus
#+ 1e8d3ffa5fb95699d18af5639ffeb90054b71856 Don't trigger a close due to a release if we did not get a press
#+ f2c5b91201bd3df8de9f47fe71a9d0f2f5b76882 Bump version
#+ 68a916d8ec4ff964bb1310b4065494e9e041499e QQuickMenu: fix contentModel memory leak
#+ 43c9cc30a26f7fb482248115eec418128a1add0f QQuickMenu: fix heap-use-after-free
#+ b6280dd207746f32092f5cb2b55b8c5f8ffa44b9 Add setAcceptTouchEvents() in controls that handle touch events
#+ 88bdce23e260cce2d3a163997d9032c3e6fac858 Specify the QtQuick dependency of templates also in qmldir
#+ 51a57c7ea852151235b692475f08915edb16bb90 Only add a shortcut if the sequence is not empty
#+ c9e58c2168450fd3b1fe3aca3dd143d5fd0db8c5 ScrollView: document how you can make ScrollView scroll in only one direction
#+ a1b0f708e6a22297bdd8af2cf8c461de5da7a16e Add changes file for Qt 5.12.10
#+ 1a3d27b017fae0471a82870b28e1e808bc2aac33 QQuickAbstractButton: don't accept key release if we're not pressed
#+ a0899012f44806957d0254c8e76cca97adb624f6 Remove qtxmlpatterns from requirements
#
#Change-Id: Ic01c73f9d43154a59a41589d4eea185d072cc9f8
#Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
#(cherry picked from commit 16f27dfa3588c2bf377568ce00bf534af48c9558)
#Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
#---
# dist/changes-5.15.2 | 42 ++++++++++++++++++++++++++++++++++++++++++
# 1 file changed, 42 insertions(+)
# create mode 100644 dist/changes-5.15.2
#
#diff --git a/dist/changes-5.15.2 b/dist/changes-5.15.2
#new file mode 100644
#index 000000000..e71e2bf35
#--- /dev/null
#+++ b/dist/changes-5.15.2
#@@ -0,0 +1,42 @@
#+Qt 5.15.2 is a bug-fix release. It maintains both forward and backward
#+compatibility (source and binary) with Qt 5.15.1.
#+
#+For more details, refer to the online documentation included in this
#+distribution. The documentation is also available online:
#+
#+  https://doc.qt.io/qt-5.15/index.html
#+
#+The Qt version 5.15 series is binary compatible with the 5.14.x series.
#+Applications compiled for 5.14 will continue to run with 5.15.
#+
#+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.
#+
#+****************************************************************************
#+*                               Controls                                   *
#+****************************************************************************
#+
#+ - [QTBUG-83698] Fixed issue where a menu opened by pressing enter (handled
#+   via attached Keys property) would instantly trigger the first menu
#+   item.
#+ - [QTBUG-86851] QQuickMenu: fixed memory leak due to contentModel not being
#+   deleted. Also fixed a heap-use-after-free that was exposed by the
#+   previously mentioned fix.
#+ - [QTBUG-85884] Fixed expected item not getting focus when a dialog closes.
#+ - [QTBUG-85719] Fixed SpinBox failing to validate input correctly after
#+   previous input was out of range.
#+
#+****************************************************************************
#+*                                Styles                                    *
#+****************************************************************************
#+
#+Material
#+--------
#+
#+ - [QTBUG-85699] Fixed binding loops when binding between attached
#+   properties.
#-- 
#2.33.0
#
From 65194cf47a809f1694237e5163e3704b720d87cb Mon Sep 17 00:00:00 2001
From: Mitch Curtis <mitch.curtis@qt.io>
Date: Thu, 5 Nov 2020 11:38:42 +0100
Subject: [PATCH 3/8] Doc: fix SplitView's inheritance

It inherits Container.

Fixes: QTBUG-88184
Change-Id: Ic4878c2b240dad2294569a48c4f39e82d377133a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c357974b4e1a3400d8036039c15dddac3b863046)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/quicktemplates2/qquicksplitview.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/quicktemplates2/qquicksplitview.cpp b/src/quicktemplates2/qquicksplitview.cpp
index a3566c560..a06c8d310 100644
--- a/src/quicktemplates2/qquicksplitview.cpp
+++ b/src/quicktemplates2/qquicksplitview.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
 
 /*!
     \qmltype SplitView
-    \inherits Control
+    \inherits Container
 //!     \instantiates QQuickSplitView
     \inqmlmodule QtQuick.Controls
     \since 5.13
-- 
2.33.0

From 551841db557c1d726fc2b3987d93a71a4a346cae Mon Sep 17 00:00:00 2001
From: Volker Hilsheimer <volker.hilsheimer@qt.io>
Date: Wed, 4 Nov 2020 12:34:56 +0100
Subject: [PATCH 4/8] Fix QQuickHeaderView models to pass model tester

Following 72e0d699cec09458ca9325035d477d4899e8e47b in qtbase, the model
tester exercises additional code paths to verify correct row/columnCount
implementations for flat models.

This revealed a few bugs in the models used in QQuickHeaderView and the
unit test:

* neither QHeaderDataProxyModel nor the test models handled a valid
parent index for calls to row/columnCount
* QHeaderDataProxyModel::sibling passed the index on as parent

Change-Id: I612e18030d837275614d61ce8987c93fff7f20a9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit bdc14837191dc81452fa7fbba20ba0a29e5fbebd)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
---
 src/quicktemplates2/qquickheaderview.cpp             | 11 ++++++++---
 tests/auto/qquickheaderview/tst_qquickheaderview.cpp |  8 ++++++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/quicktemplates2/qquickheaderview.cpp b/src/quicktemplates2/qquickheaderview.cpp
index 85291bcbf..d99c09ebf 100644
--- a/src/quicktemplates2/qquickheaderview.cpp
+++ b/src/quicktemplates2/qquickheaderview.cpp
@@ -364,18 +364,22 @@ QModelIndex QHeaderDataProxyModel::parent(const QModelIndex &child) const
     return QModelIndex();
 }
 
-QModelIndex QHeaderDataProxyModel::sibling(int row, int column, const QModelIndex &idx) const
+QModelIndex QHeaderDataProxyModel::sibling(int row, int column, const QModelIndex &) const
 {
-    return index(row, column, idx);
+    return index(row, column);
 }
 
 int QHeaderDataProxyModel::rowCount(const QModelIndex &parent) const
 {
+    if (parent.isValid())
+        return 0;
     return m_model.isNull() ? -1 : (m_orientation == Qt::Horizontal ? 1 : m_model->rowCount(parent));
 }
 
 int QHeaderDataProxyModel::columnCount(const QModelIndex &parent) const
 {
+    if (parent.isValid())
+        return 0;
     return m_model.isNull() ? -1 : (m_orientation == Qt::Vertical ? 1 : m_model->columnCount(parent));
 }
 
@@ -401,7 +405,8 @@ bool QHeaderDataProxyModel::setData(const QModelIndex &index, const QVariant &va
 
 bool QHeaderDataProxyModel::hasChildren(const QModelIndex &parent) const
 {
-    Q_UNUSED(parent)
+    if (!parent.isValid())
+        return rowCount(parent) > 0 && columnCount(parent) > 0;
     return false;
 }
 
diff --git a/tests/auto/qquickheaderview/tst_qquickheaderview.cpp b/tests/auto/qquickheaderview/tst_qquickheaderview.cpp
index 611e39cb4..f335aa869 100644
--- a/tests/auto/qquickheaderview/tst_qquickheaderview.cpp
+++ b/tests/auto/qquickheaderview/tst_qquickheaderview.cpp
@@ -58,8 +58,10 @@ public:
     {
     }
 
-    int rowCount(const QModelIndex & = QModelIndex()) const override
+    int rowCount(const QModelIndex &index = QModelIndex()) const override
     {
+        if (index.isValid())
+            return 0;
         return m_rows;
     }
     virtual void setRowCount(int count)
@@ -70,8 +72,10 @@ public:
         endResetModel();
     }
 
-    int columnCount(const QModelIndex & = QModelIndex()) const override
+    int columnCount(const QModelIndex &index = QModelIndex()) const override
     {
+        if (index.isValid())
+            return 0;
         return m_cols;
     }
     virtual void setColumnCount(int count)
-- 
2.33.0

From eb819a15c8636b84bcb7e51a174a3a02ebe05f85 Mon Sep 17 00:00:00 2001
From: Mitch Curtis <mitch.curtis@qt.io>
Date: Fri, 6 Nov 2020 10:43:49 +0100
Subject: [PATCH 5/8] Doc: fix Qt Labs Platform Menu icon documentation

It was probably copy-pasted from MenuItem.

Change-Id: I20f7e107252346f52bf8c061fe18e1ca6a0bf150
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 7174714f77fd803bb7b79dea3dda046acc7d1dee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/imports/platform/qquickplatformmenu.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/imports/platform/qquickplatformmenu.cpp b/src/imports/platform/qquickplatformmenu.cpp
index 1f5f52d78..f28696620 100644
--- a/src/imports/platform/qquickplatformmenu.cpp
+++ b/src/imports/platform/qquickplatformmenu.cpp
@@ -610,10 +610,10 @@ 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
+    \qmlpropertygroup Qt.labs.platform::Menu::icon
+    \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.
 */
-- 
2.33.0

From c4242c05d0bc1a833487214497df93382293bc36 Mon Sep 17 00:00:00 2001
From: Mitch Curtis <mitch.curtis@qt.io>
Date: Fri, 6 Nov 2020 10:45:58 +0100
Subject: [PATCH 6/8] Doc: remove all instances of \qmlpropertygroup

This is apparently no longer necessary.

Change-Id: I0f45a84ced5118d248ffab4e745c4e2f2ce5738f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 08477f64d8b1a7161ad884551c84cffab0e7d5be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/imports/platform/qquickplatformfiledialog.cpp     | 1 -
 src/imports/platform/qquickplatformmenu.cpp           | 1 -
 src/imports/platform/qquickplatformmenuitem.cpp       | 1 -
 src/imports/platform/qquickplatformsystemtrayicon.cpp | 1 -
 src/quicktemplates2/qquickabstractbutton.cpp          | 1 -
 src/quicktemplates2/qquickaction.cpp                  | 1 -
 src/quicktemplates2/qquickpopup.cpp                   | 1 -
 src/quicktemplates2/qquickrangeslider.cpp             | 2 --
 src/quicktemplates2/qquickspinbox.cpp                 | 2 --
 src/quicktemplates2/qquickswipedelegate.cpp           | 1 -
 10 files changed, 12 deletions(-)

diff --git a/src/imports/platform/qquickplatformfiledialog.cpp b/src/imports/platform/qquickplatformfiledialog.cpp
index 2ef08ef63..81b851a5b 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
diff --git a/src/imports/platform/qquickplatformmenu.cpp b/src/imports/platform/qquickplatformmenu.cpp
index f28696620..b5289f333 100644
--- a/src/imports/platform/qquickplatformmenu.cpp
+++ b/src/imports/platform/qquickplatformmenu.cpp
@@ -610,7 +610,6 @@ void QQuickPlatformMenu::setFont(const QFont& font)
 
 /*!
     \since Qt.labs.platform 1.1 (Qt 5.12)
-    \qmlpropertygroup Qt.labs.platform::Menu::icon
     \qmlproperty url Qt.labs.platform::Menu::icon.source
     \qmlproperty string Qt.labs.platform::Menu::icon.name
     \qmlproperty bool Qt.labs.platform::Menu::icon.mask
diff --git a/src/imports/platform/qquickplatformmenuitem.cpp b/src/imports/platform/qquickplatformmenuitem.cpp
index 72ad7d5d4..5a8b3798d 100644
--- a/src/imports/platform/qquickplatformmenuitem.cpp
+++ b/src/imports/platform/qquickplatformmenuitem.cpp
@@ -592,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/qquickplatformsystemtrayicon.cpp b/src/imports/platform/qquickplatformsystemtrayicon.cpp
index da4838229..442da0373 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/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp
index fc37b6f60..950e4e099 100644
--- a/src/quicktemplates2/qquickabstractbutton.cpp
+++ b/src/quicktemplates2/qquickabstractbutton.cpp
@@ -736,7 +736,6 @@ void QQuickAbstractButton::setIndicator(QQuickItem *indicator)
 }
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::AbstractButton::icon
     \qmlproperty string QtQuick.Controls::AbstractButton::icon.name
     \qmlproperty url QtQuick.Controls::AbstractButton::icon.source
     \qmlproperty int QtQuick.Controls::AbstractButton::icon.width
diff --git a/src/quicktemplates2/qquickaction.cpp b/src/quicktemplates2/qquickaction.cpp
index 0dab3b978..2041e7741 100644
--- a/src/quicktemplates2/qquickaction.cpp
+++ b/src/quicktemplates2/qquickaction.cpp
@@ -381,7 +381,6 @@ void QQuickAction::setText(const QString &text)
 }
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::Action::icon
     \qmlproperty string QtQuick.Controls::Action::icon.name
     \qmlproperty url QtQuick.Controls::Action::icon.source
     \qmlproperty int QtQuick.Controls::Action::icon.width
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 1a7731f4c..7130d2ea5 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -575,7 +575,6 @@ void QQuickPopupPrivate::setBottomMargin(qreal value, bool reset)
 
 /*!
     \since QtQuick.Controls 2.5 (Qt 5.12)
-    \qmlpropertygroup QtQuick.Controls::Popup::anchors
     \qmlproperty Object QtQuick.Controls::Popup::anchors.centerIn
 
     Anchors provide a way to position an item by specifying its
diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp
index 3702c9719..eb9c1bb1c 100644
--- a/src/quicktemplates2/qquickrangeslider.cpp
+++ b/src/quicktemplates2/qquickrangeslider.cpp
@@ -746,7 +746,6 @@ qreal QQuickRangeSlider::valueAt(qreal position) const
 }
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::RangeSlider::first
     \qmlproperty real QtQuick.Controls::RangeSlider::first.value
     \qmlproperty real QtQuick.Controls::RangeSlider::first.position
     \qmlproperty real QtQuick.Controls::RangeSlider::first.visualPosition
@@ -825,7 +824,6 @@ QQuickRangeSliderNode *QQuickRangeSlider::first() const
 */
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::RangeSlider::second
     \qmlproperty real QtQuick.Controls::RangeSlider::second.value
     \qmlproperty real QtQuick.Controls::RangeSlider::second.position
     \qmlproperty real QtQuick.Controls::RangeSlider::second.visualPosition
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index f04ceff88..a3a73472f 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -726,7 +726,6 @@ void QQuickSpinBox::setValueFromText(const QJSValue &callback)
 }
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::SpinBox::up
     \qmlproperty bool QtQuick.Controls::SpinBox::up.pressed
     \qmlproperty Item QtQuick.Controls::SpinBox::up.indicator
     \qmlproperty bool QtQuick.Controls::SpinBox::up.hovered
@@ -747,7 +746,6 @@ QQuickSpinButton *QQuickSpinBox::up() const
 }
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::SpinBox::down
     \qmlproperty bool QtQuick.Controls::SpinBox::down.pressed
     \qmlproperty Item QtQuick.Controls::SpinBox::down.indicator
     \qmlproperty bool QtQuick.Controls::SpinBox::down.hovered
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp
index c62142430..018768a2f 100644
--- a/src/quicktemplates2/qquickswipedelegate.cpp
+++ b/src/quicktemplates2/qquickswipedelegate.cpp
@@ -1025,7 +1025,6 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent)
 */
 
 /*!
-    \qmlpropertygroup QtQuick.Controls::SwipeDelegate::swipe
     \qmlproperty real QtQuick.Controls::SwipeDelegate::swipe.position
     \qmlproperty bool QtQuick.Controls::SwipeDelegate::swipe.complete
     \qmlproperty bool QtQuick.Controls::SwipeDelegate::swipe.enabled
-- 
2.33.0

From a2593ff9cf5d0af885c20c2e9f9faa6ca4f1c1a3 Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <thomas.hartmann@qt.io>
Date: Tue, 10 Nov 2020 12:00:44 +0100
Subject: [PATCH 7/8] QmlDesigner: Remove duplicate of repeat

The autoRepeat property is already part of AbstractButton.
I renamed "Repeat" to "Auto Repeat"

Change-Id: I4f22ebc18a2094e67c8f48263f84ab9eb7d497b6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit abb8f124e11ab056be6dc0221d7fdae485febd04)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../controls/designer/AbstractButtonSection.qml      |  4 ++--
 src/imports/controls/designer/ButtonSection.qml      | 12 +-----------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/imports/controls/designer/AbstractButtonSection.qml b/src/imports/controls/designer/AbstractButtonSection.qml
index e8aa39c2a..35fad2abc 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 fef460715..951c8cf41 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.")
-- 
2.33.0

From be66bf9a5618c745d2a6ee2262967af6307b3b07 Mon Sep 17 00:00:00 2001
From: David Redondo <qt@david-redondo.de>
Date: Mon, 19 Jul 2021 10:06:17 +0200
Subject: [PATCH 8/8] Unset mouseGrabberPopup if it's removed from children

The mouseGrabberPopup is supposed to be unset in handleRelease, however
when the exit transition of the mouseGrabberPopup (that closed itself on
button press) finishes before the release event is delivered, it
unparents itself from the overlay (see
QQuickPopupPrivate::finalizeExitTransition) and the overlay sets itself
invisible if there is nothing else visible in it. Because the overlay
is not visible it handles no events anymore and the release is missed
and the grabber is never unset. When opening another non-modal popup
the overlay then will continue forwarding the events to now invisible
popup.
So when the overlay loses the currently grabbing popup as a child we need
to reset mouseGrabberPopup.

Fixes: QTBUG-95259
Change-Id: I3c832d47f3cee216b81ef1b5cb7dd77bf4149991
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(adapted from commit d07ee1345acd8100fa5cbb7f05c0aaf5f87f4cae)

(cherry picked from commit 1a59ef4218658ffc476909ef4fca13d6cf86d04b)
---
 src/quicktemplates2/qquickoverlay.cpp         |  5 +-
 .../data/releaseAfterExitTransition.qml       | 78 +++++++++++++++++++
 tests/auto/qquickpopup/tst_qquickpopup.cpp    | 29 +++++++
 3 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 tests/auto/qquickpopup/data/releaseAfterExitTransition.qml

diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp
index b8d417f29..c8cd142ae 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -399,8 +399,11 @@ void QQuickOverlay::itemChange(ItemChange change, const ItemChangeData &data)
     Q_D(QQuickOverlay);
     QQuickItem::itemChange(change, data);
 
-    if (change == ItemChildAddedChange || change == ItemChildRemovedChange)
+    if (change == ItemChildAddedChange || change == ItemChildRemovedChange) {
         setVisible(!d->allDrawers.isEmpty() || !childItems().isEmpty());
+        if (data.item->parent() == d->mouseGrabberPopup)
+            d->setMouseGrabberPopup(nullptr);
+    }
 }
 
 void QQuickOverlay::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
diff --git a/tests/auto/qquickpopup/data/releaseAfterExitTransition.qml b/tests/auto/qquickpopup/data/releaseAfterExitTransition.qml
new file mode 100644
index 000000000..9e4598b9f
--- /dev/null
+++ b/tests/auto/qquickpopup/data/releaseAfterExitTransition.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of The Qt Company Ltd nor the names of its
+**     contributors may be used to endorse or promote products derived
+**     from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+ApplicationWindow {
+    id: window
+    width: 400
+    height: 400
+    title: "releaseAfterExitTransition"
+
+    property alias popup: popup
+    property alias modalPopup: modalPopup
+
+    Popup {
+        id: popup
+        y: parent.height - height
+        width: 50
+        height: 50
+    }
+
+    Popup {
+        id: modalPopup
+        modal: true
+        y: parent.height - height
+        width: 50
+        height: 50
+        exit:  Transition { PauseAnimation { duration: 100 } }
+    }
+}
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index 41955d7d0..38936620d 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -96,6 +96,7 @@ private slots:
     void tabFence();
     void invisibleToolTipOpen();
     void centerInOverlayWithinStackViewItem();
+    void releaseAfterExitTransition();
 };
 
 void tst_QQuickPopup::initTestCase()
@@ -1429,6 +1430,34 @@ void tst_QQuickPopup::centerInOverlayWithinStackViewItem()
     // Shouldn't crash on exit.
 }
 
+
+void tst_QQuickPopup::releaseAfterExitTransition()
+{
+    QQuickApplicationHelper helper(this, "releaseAfterExitTransition.qml");
+    QVERIFY2(helper.ready, helper.failureMessage());
+
+    QQuickWindow *window = helper.window;
+    window->show();
+    QVERIFY(QTest::qWaitForWindowActive(window));
+
+    QQuickOverlay *overlay = QQuickOverlay::overlay(window);
+    QQuickPopup *modalPopup = window->property("modalPopup").value<QQuickPopup *>();
+    QQuickPopup *popup = window->property("popup").value<QQuickPopup *>();
+
+    modalPopup->open();
+    QTRY_VERIFY(modalPopup->isOpened());
+
+    QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
+    // wait until the transition is finished and the overlay hides itself
+    QTRY_VERIFY(!overlay->isVisible());
+    QTest::mouseRelease(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
+
+    popup->open();
+    QTRY_VERIFY(popup->isOpened());
+    QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
+    QTRY_VERIFY(!popup->isOpened());
+}
+
 QTEST_QUICKCONTROLS_MAIN(tst_QQuickPopup)
 
 #include "tst_qquickpopup.moc"
-- 
2.33.0

From 0129dd7bfe7abb01a3eea5be2424789e1b5fbd3a Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 4 Jan 2022 16:34:16 +0100
Subject: [PATCH 09/10] Ensure we don't crash when changing sizes after cleanup

This addresses the problems I've seen during destruction. Only
encountered it when using complex layouts on a DialogButtonBox.

Pick-to: 6.2 6.3
Change-Id: I54528c8a2b57b4798d90f7e2021e3127f8404762
(cherry picked from commit 8b24d2bf1655e8491bdd74013579e09cd009e8fc in
qtdeclarative)
---
 src/quicktemplates2/qquickcontainer.cpp       | 5 +++--
 src/quicktemplates2/qquickdialogbuttonbox.cpp | 8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp
index f38c2b09c..6eed2a024 100644
--- a/src/quicktemplates2/qquickcontainer.cpp
+++ b/src/quicktemplates2/qquickcontainer.cpp
@@ -225,6 +225,7 @@ void QQuickContainerPrivate::cleanup()
     QObject::disconnect(contentModel, &QQmlObjectModel::countChanged, q, &QQuickContainer::countChanged);
     QObject::disconnect(contentModel, &QQmlObjectModel::childrenChanged, q, &QQuickContainer::contentChildrenChanged);
     delete contentModel;
+    contentModel = nullptr;
 }
 
 QQuickItem *QQuickContainerPrivate::itemAt(int index) const
@@ -436,7 +437,7 @@ void QQuickContainerPrivate::contentChildren_clear(QQmlListProperty<QQuickItem>
 void QQuickContainerPrivate::updateContentWidth()
 {
     Q_Q(QQuickContainer);
-    if (hasContentWidth || qFuzzyCompare(contentWidth, implicitContentWidth))
+    if (hasContentWidth || qFuzzyCompare(contentWidth, implicitContentWidth) || !contentModel)
         return;
 
     contentWidth = implicitContentWidth;
@@ -446,7 +447,7 @@ void QQuickContainerPrivate::updateContentWidth()
 void QQuickContainerPrivate::updateContentHeight()
 {
     Q_Q(QQuickContainer);
-    if (hasContentHeight || qFuzzyCompare(contentHeight, implicitContentHeight))
+    if (hasContentHeight || qFuzzyCompare(contentHeight, implicitContentHeight) || !contentModel)
         return;
 
     contentHeight = implicitContentHeight;
diff --git a/src/quicktemplates2/qquickdialogbuttonbox.cpp b/src/quicktemplates2/qquickdialogbuttonbox.cpp
index e6db14eb5..6197d1547 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox.cpp
+++ b/src/quicktemplates2/qquickdialogbuttonbox.cpp
@@ -237,7 +237,7 @@ static QRectF alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment
 void QQuickDialogButtonBoxPrivate::resizeContent()
 {
     Q_Q(QQuickDialogButtonBox);
-    if (!contentItem)
+    if (!contentItem || !contentModel)
         return;
 
     QRectF geometry = q->boundingRect().adjusted(q->leftPadding(), q->topPadding(), -q->rightPadding(), -q->bottomPadding());
@@ -322,6 +322,9 @@ void QQuickDialogButtonBoxPrivate::updateLayout()
 qreal QQuickDialogButtonBoxPrivate::getContentWidth() const
 {
     Q_Q(const QQuickDialogButtonBox);
+    if (!contentModel)
+        return 0;
+
     const int count = contentModel->count();
     const qreal totalSpacing = qMax(0, count - 1) * spacing;
     qreal totalWidth = totalSpacing;
@@ -341,6 +344,9 @@ qreal QQuickDialogButtonBoxPrivate::getContentWidth() const
 qreal QQuickDialogButtonBoxPrivate::getContentHeight() const
 {
     Q_Q(const QQuickDialogButtonBox);
+    if (!contentModel)
+        return 0;
+
     const int count = contentModel->count();
     qreal maxHeight = 0;
     for (int i = 0; i < count; ++i) {
-- 
2.33.0

From b092b19a18d14e70beae6afebc6bde5d83e9eed7 Mon Sep 17 00:00:00 2001
From: Oliver Eftevaag <oliver.eftevaag@qt.io>
Date: Wed, 19 Jan 2022 22:09:56 +0100
Subject: [PATCH 10/10] QQuickAction: don't grab the same shortcut multiple
 times

If the entry for the QQuickItem that the QQuickAction is set on has
already grabbed the shortcut, then m_shortcutId is no longer 0 and we
must not overwrite the value. Otherwise, the QQuickItem removing itself
from the action might not remove the correct entry from Qt's shortcut
map, leaving a dangling pointer behind.

Multiple calls to QQuickActionPrivate::ShortcutEntry::grab are possible,
because we grab the shortcut whenever the shortcut changes, or when an
item representing the action becomes visible.

The test case added reproduces this scenario by adding the action to a
menu item and then making the menu explicitly visible, resulting in two
calls to grab() which should be idempotent.

Fixes: QTBUG-96551
Fixes: QTBUG-96561
Pick-to: 6.2
Change-Id: I7d42a4f4c04f7d8759f2d0f24a133720f10e4c47
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>

(cherry picked from commit 45af5ef2f63704adc515e29260ad8c6aaf51f08e in
qtdeclarative)
---
 src/quicktemplates2/qquickaction.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/quicktemplates2/qquickaction.cpp b/src/quicktemplates2/qquickaction.cpp
index 2041e7741..8610cdfae 100644
--- a/src/quicktemplates2/qquickaction.cpp
+++ b/src/quicktemplates2/qquickaction.cpp
@@ -145,7 +145,7 @@ int QQuickActionPrivate::ShortcutEntry::shortcutId() const
 
 void QQuickActionPrivate::ShortcutEntry::grab(const QKeySequence &shortcut, bool enabled)
 {
-    if (shortcut.isEmpty())
+    if (shortcut.isEmpty() || m_shortcutId)
         return;
 
     Qt::ShortcutContext context = Qt::WindowShortcut; // TODO
-- 
2.33.0

