From 7fb0c2bbf9af7956e6b8a0b1906792437aa40517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 24 Oct 2023 23:03:25 +0200 Subject: [PATCH] QMessageBox: Opt out of native dialog if standard buttons have menu Amends 2d59f2e8caed71d4eceb1abe3ce17b7befb40559, which only checked this for custom buttons, but standard buttons can also be customized. Pick-to: 6.5 6.6 Change-Id: Ie8bafcf5007a0b4789b2d0ee1ddbc660a952fee4 Reviewed-by: Richard Moe Gustavsen --- src/widgets/dialogs/qmessagebox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 5d0c84e9d4..ca7af90c15 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -2824,7 +2824,7 @@ bool QMessageBoxPrivate::canBeNativeDialog() const if (strcmp(QMessageBox::staticMetaObject.className(), q->metaObject()->className()) != 0) return false; - for (auto *customButton : customButtonList) { + for (auto *customButton : buttonBox->buttons()) { if (QPushButton *pushButton = qobject_cast(customButton)) { // We can't support buttons with menus in native dialogs (yet) if (pushButton->menu())