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

QMenu::setAsDockMenu fails to check platformMenu() return value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.5.1
    • None
    • Mac OS X
    • macOS

      The QMenu::setAsDockMenu() function is conceived to work only with the Cocoa platform plugin. It uses dynamic resolution of the required function from the platform plugin, but assumes that that function is safe to call if the resolve succeeded.

      This assumption can fail when a user coerces Qt to load a different platform plugin, say to use a KF5 application with the KdePlatformThemePlugin, leading to a crash.

      QMenu::setAsDockMenu() should check if platformMenu() does not return a nullptr before calling setDockMenu(platformMenu()).

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

            sorvig Morten Sørvig
            rjvbertin René Bertin
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes