QMessageBox: Opt out of native dialog if standard buttons have menu

Amends 2d59f2e8ca, 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>
bb10
Tor Arne Vestbø 2023-10-24 23:03:25 +02:00
parent fd9c567156
commit 7fb0c2bbf9
1 changed files with 1 additions and 1 deletions

View File

@ -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())