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

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

    XMLWordPrintable

Details

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

    Description

      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()).

      Attachments

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

        Activity

          People

            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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes