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

QCocoaMenuBar crash when adding shared menu

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.1.0 RC1
    • 5.1.0 Beta 1
    • None
    • OS X 10.8, Qt 5.1.0
    • 119882714f87ffeb6945fdb2d02997ae125ff50c

      When i try to add same QMenu object to a 2 different QMenuBar objects, i get NSException throwing which says "Item to be inserted into menu already is in another menu". This leads to application crash.

      It seems to be a regression from Qt4.
      This happens because each QCocoaMenu stores associated NSMenuItem, which can be added only to one NSMenu object. It seems, that menu should store multiple NSMenuItems, one for each menu bar, which menu is added to.

      Or, if adding same QMenu to different menu bars is no longer supported, that should be properly documented and should not lead to crash.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            rperier Romain Perier
            arch Ivan Komissarov
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes