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

QAction becomes inaccessible if its old parent menu is deleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6.1
    • None
    • All

    Description

      In qaccessiblemenu.cpp,

      QAccessibleInterface *getOrCreateMenu(QWidget *menu, QAction *action)
      {
          QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(action);
          if (!iface) {
              iface = new QAccessibleMenuItem(menu, action);
              QAccessible::registerAccessibleInterface(iface);
          }
          return iface;
      }
      

      getOrCreateMenu doesn't check if iface is still valid, so when a menu is deleted but its actions aren't, and later those actions are added to another menu, the accessible interfaces of those actions will always be invalid.

      Attachments

        For Gerrit Dashboard: QTBUG-122409
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            fusionfuture Yuanzheng Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change