diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-10-24 23:03:25 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-10-25 17:41:32 +0200 |
commit | 7fb0c2bbf9af7956e6b8a0b1906792437aa40517 (patch) | |
tree | 66714e094006e79dcdbb6ac7b1b914ddc8e42ed5 /src/widgets/dialogs | |
parent | fd9c567156830a21da3cd9e127a998ae90a8e564 (diff) |
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 <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QPushButton *>(customButton)) { // We can't support buttons with menus in native dialogs (yet) if (pushButton->menu()) |