Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69496

[REG 5.6->5.9] Actions in the Application Menu in the Native Menubar on macOS Sierra disappear when the app is restarted.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9.6
    • Fix Version/s: 5.11.2
    • Component/s: Widgets: Main Window
    • Labels:
      None
    • Environment:
      XCode 7.2.1, MacOS El Capitan SDK (10.11), Qt Creator 4.3.1, Qt 5.9.6
    • Platform/s:
      macOS
    • Commits:
      4126de887799c61793bf1f9efc8b7ac7b66c8b32

      Description

      The first time the app is started up, the application menu has all the usual menu items and the File menu has the actions defined in the MainWindow class. When the application is restarted using the "Restart" action in the File Menu, the File Menu disappears, all its actions appear in the Application Menu and the original actions in the Application menu are no longer available. I observed this behaviour in Qt 5.9.6. It works okay when using Qt 5.6. I have attached sample code and screen shots.

      menus.tgz - simple example demonstrating the behaviour described.

      FirstTime.png - Screenshot of application menu when the app is first started (built with 5.6 and 5.9.6)

      Restarted-Qt5.6.png - Screenshot after the app (built using Qt 5. 6) is restarted using Restart action in File Menu. The native menu bar is fine.

      Restarted-Qt5.9.6.png - Screenshot after the app (built using Qt 5.9.6) is restarted using Restart action in File Menu. The File Menu is not visible and all its actions are now in the Application menu. None of the original application menu actions are available.

      Does this behaviour have anything to do with making QCocoaMenuLoader a singleton (Change id : Ic4c859d628ab8abd9b469b99c64293582f8e363d in 5.8)?

        Attachments

        1. FirstTime.png
          FirstTime.png
          58 kB
        2. menus.tgz
          4 kB
        3. Restarted-Qt5.6.png
          Restarted-Qt5.6.png
          59 kB
        4. Restarted-Qt5.9.6.png
          Restarted-Qt5.9.6.png
          63 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              asuraparaju Anuradha Suraparaju
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes