diff --git a/src/plugins/platforms/cocoa/qcocoamessagedialog.mm b/src/plugins/platforms/cocoa/qcocoamessagedialog.mm index 82a4c90c236..993e645a67e 100644 --- a/src/plugins/platforms/cocoa/qcocoamessagedialog.mm +++ b/src/plugins/platforms/cocoa/qcocoamessagedialog.mm @@ -151,6 +151,8 @@ bool QCocoaMessageDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality w // button). If an explicit default or escape button has been set, we respect these, // and otherwise we fall back to role-based default and escape buttons. + qCDebug(lcQpaDialogs).verbosity(0) << "Adding button" << title << "with" << role; + if (!defaultButton && role == AcceptRole) defaultButton = tag; @@ -186,19 +188,63 @@ bool QCocoaMessageDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality w button.tag = tag; }; + // Resolve all dialog buttons from the options, both standard and custom + + struct Button { QString title; int identifier; ButtonRole role; }; + std::vector