Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.6
-
None
Description
In applications with multiple main Windows on macOS, you can still lose Quit, About, and Preferences menus in the QMenuBar Application menu under Qt 5.12.6
This happens because if a user closes the first QMainWindow that lies behind a current QMainWindow by just clicking on the red close button without making that window active, the qtbase/src/plugins/platforms/cocoa/qcocoamenubar.mm in the destructor will not end up calling updateMenuBarImmediately() due to the condition tests in the following "if" (due to recent reparenting?).
I can easily recreate this issue in my app Sigil. And I can enable the built in debug in that file and create traces showing the problem if that would help.
The attached patch fixes this for Qt 5.12.6 for me by moving the call to updateMenuBarImmediately() to be outside the "if" so that the copied main App menu is always properly updated.
Please see the attached patch and let me know if you want me to enable the QDebug statements in qtbase/src/plugins/platforms/cocoa/qcocoamenubar.mm and generate traces that illustrate what is going on.
Attachments
Issue Links
- relates to
-
QTBUG-90335 macOS Application menu: can't have more than one "about" item
- Reported