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

Mac: Warning while destroying a Menu

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.2.1
    • 5.1.0 RC2, 5.1.1
    • Quick: Controls 1
    • None
    • macOS
    • ae380584de53cf927fe4a7bd62ffb41f73b1faa1

    Description

      Destroying a menu causes the following warning:
      "virtual void QCocoaMenu::removeMenuItem(QPlatformMenuItem *) Menu does not contain the item to be removed"

      Warnings are generated when running the QtQuickControls autotests on mac. And this can also be reproduced using the test case:

      1 - click the button once to create the combo box
      2 - click the button a second time to destroy it
      => the warning specified above is generated

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      
      Item {
          id: root
          width: 640
          height: 480
          property bool created: false
          property var combobox;
          Button {
              text: qsTr("click me")
              anchors.centerIn: parent
              onClicked:  {
                  if (!created) {
                      combobox = Qt.createQmlObject('import QtQuick.Controls 1.0 ; ComboBox {}', root, '');
                      created = true
                  } else {
                      combobox.destroy()
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            carochao Caroline Chao (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes