Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.5.1
-
None
-
Mac OS X
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()).