summaryrefslogtreecommitdiff
path: root/src/controls/Private
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-11-09 15:49:57 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-11-27 05:41:44 +0000
commit7250a5c2f9dbb61e2c8289f1bf28db2300ce43ad (patch)
tree4157646b0234465c546ad3d1f7453268f57fd683 /src/controls/Private
parent08a6a6489e12450befcace2659f123e6c1f1be9a (diff)
downloadqtquickcontrols-7250a5c2f9dbb61e2c8289f1bf28db2300ce43ad.tar.gz
Fix button menus not opening on the second attemptv5.12.0-rc2v5.12.05.12.0
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 <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/controls/Private')
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp2
1 files changed, 1 insertions, 1 deletions
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)