aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-02-15 09:45:03 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-02-17 09:34:16 +0100
commitb9db5246bc99d9438aa88142cb9144bda9e97bf3 (patch)
treeaf2f3603537642fcbe2ee26386e4a67bee6003eb
parent483ab4d7d69fc8c5d69803be7316d27c7494b9cc (diff)
Drop useless extra QQmlContext from QQuickDialogButtonBoxPrivate
The standard buttons won't do anything meaningful with the context anyway. Task-number: QTBUG-110934 Change-Id: Ic1affa98904f06a3172a271ba268595a9b53f1a2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 6dcaaca3a759c9af9e9fcdd204bc1300eae812c0) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/quicktemplates2/qquickdialogbuttonbox.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickdialogbuttonbox.cpp b/src/quicktemplates2/qquickdialogbuttonbox.cpp
index 9b39f9e1ab..abcd56c98a 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox.cpp
+++ b/src/quicktemplates2/qquickdialogbuttonbox.cpp
@@ -383,10 +383,8 @@ QQuickAbstractButton *QQuickDialogButtonBoxPrivate::createStandardButton(QPlatfo
QQmlContext *creationContext = delegate->creationContext();
if (!creationContext)
creationContext = qmlContext(q);
- QQmlContext *context = new QQmlContext(creationContext, q);
- context->setContextObject(q);
- QObject *object = delegate->beginCreate(context);
+ QObject *object = delegate->beginCreate(creationContext);
QQuickAbstractButton *button = qobject_cast<QQuickAbstractButton*>(object);
if (button) {
QQuickDialogButtonBoxAttached *attached = qobject_cast<QQuickDialogButtonBoxAttached *>(qmlAttachedPropertiesObject<QQuickDialogButtonBox>(button, true));