Fix build with -no-feature-menu
Change-Id: If207eac9a237986d51de4665b2f6749fb4e8e2d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
d5dbafca1f
commit
92a9df5d05
@ -2817,6 +2817,7 @@ bool QMessageBoxPrivate::canBeNativeDialog() const
|
||||
if (strcmp(QMessageBox::staticMetaObject.className(), q->metaObject()->className()) != 0)
|
||||
return false;
|
||||
|
||||
#if QT_CONFIG(menu)
|
||||
for (auto *customButton : buttonBox->buttons()) {
|
||||
if (QPushButton *pushButton = qobject_cast<QPushButton *>(customButton)) {
|
||||
// We can't support buttons with menus in native dialogs (yet)
|
||||
@ -2824,6 +2825,7 @@ bool QMessageBoxPrivate::canBeNativeDialog() const
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return QDialogPrivate::canBeNativeDialog();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user