qt6-bb10/tests/auto/widgets/widgets
J-P Nurmi 063997f44f QMenu: don't force platform instance creation on construction
There's a conflict between QGtk3Menu and QDbusPlatformMenuBar. The
problem is that on Unity the type of the platform menu instance must
be different depending on whether the menu is in the global menubar or
a standalone context menu.

Since QMenu creates a platform menu instance at construction time, it
does not yet know whether it will be added into a menubar. QMenuBar
checks that the QMenu already has a platform menu instance, and passes
it to the platform menubar. As a result, a QGtk3Menu instance is passed
to QDbusPlatformMenuBar.

Currently, a standalone QMenu does not use the native platform menu
instance. Only menus that are added to a QMenuBar do. Therefore we
don't need to create the platform instance when QMenu is constructed,
but only after it is added to QMenuBar. The platform menu instance
creation is implemented in QMenuBarPrivate::getPlatformMenu(), and
QMenu::setPlatformMenu() calls syncPlatformMenu() to take care of
syncing the QMenu properties and actions to the new platform menu
instance.

The macOS-specific methods QMenu::toNSMenu() and QMenu::setAsDockMenu()
rely on the platform menu instance, and must therefore create it on
demand.

This is a hot fix for the release blocker, not a long term solution.
In the future, if standalone QMenus are made to use native platform
menu instances, the instance must be created lazily when the menu is
about to be made visible.

Task-number: QTBUG-56526
Change-Id: I044933cabb1639406fe47908dfc4b1903af214d1
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-16 14:10:29 +00:00
..
qabstractbutton Updated license headers 2016-01-21 18:55:18 +00:00
qabstractscrollarea Updated license headers 2016-01-21 18:55:18 +00:00
qabstractslider Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-01 22:15:55 +02:00
qabstractspinbox Updated license headers 2016-01-21 18:55:18 +00:00
qbuttongroup Updated license headers 2016-01-21 18:55:18 +00:00
qcalendarwidget Updated license headers 2016-01-21 18:55:18 +00:00
qcheckbox Updated license headers 2016-01-21 18:55:18 +00:00
qcombobox Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
qcommandlinkbutton Updated license headers 2016-01-21 18:55:18 +00:00
qdatetimeedit Merge remote-tracking branch 'origin/5.7' into 5.8 2016-09-29 00:38:01 +02:00
qdial Updated license headers 2016-01-21 18:55:18 +00:00
qdialogbuttonbox Updated license headers 2016-01-21 18:55:18 +00:00
qdockwidget Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-21 09:02:57 +01:00
qdoublespinbox Updated license headers 2016-01-21 18:55:18 +00:00
qfocusframe Updated license headers 2016-01-21 18:55:18 +00:00
qfontcombobox Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-13 06:55:37 +02:00
qframe Updated license headers 2016-01-21 18:55:18 +00:00
qgroupbox Updated license headers 2016-01-21 18:55:18 +00:00
qkeysequenceedit Updated license headers 2016-01-21 18:55:18 +00:00
qlabel Updated license headers 2016-01-21 18:55:18 +00:00
qlcdnumber Updated license headers 2016-01-21 18:55:18 +00:00
qlineedit Remove tests/auto/qtest-config.h. 2016-04-12 14:56:49 +00:00
qmainwindow Add signal QMainWindow::tabifiedDockWidgetActivated 2016-06-24 13:26:00 +00:00
qmdiarea Change confusing Q_DEAD_CODE_FROM_QT4_FOO define 2016-10-14 08:19:29 +00:00
qmdisubwindow Change confusing Q_DEAD_CODE_FROM_QT4_FOO define 2016-10-14 08:19:29 +00:00
qmenu Merge remote-tracking branch 'origin/5.7' into dev 2016-06-13 12:46:46 +02:00
qmenubar QMenu: don't force platform instance creation on construction 2016-10-16 14:10:29 +00:00
qopenglwidget Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-06 09:04:55 +02:00
qplaintextedit Merge remote-tracking branch 'origin/5.7' into dev 2016-06-13 12:46:46 +02:00
qprogressbar Updated license headers 2016-01-21 18:55:18 +00:00
qpushbutton QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
qradiobutton Updated license headers 2016-01-21 18:55:18 +00:00
qscrollarea Updated license headers 2016-01-21 18:55:18 +00:00
qscrollbar Updated license headers 2016-01-21 18:55:18 +00:00
qsizegrip Updated license headers 2016-01-21 18:55:18 +00:00
qslider Updated license headers 2016-01-21 18:55:18 +00:00
qspinbox Merge remote-tracking branch 'origin/5.6' into 5.7 2016-08-29 08:13:40 +02:00
qsplashscreen Updated license headers 2016-01-21 18:55:18 +00:00
qsplitter Updated license headers 2016-01-21 18:55:18 +00:00
qstackedwidget Merge remote-tracking branch 'origin/5.6' into 5.7 2016-10-08 17:15:55 +02:00
qstatusbar Updated license headers 2016-01-21 18:55:18 +00:00
qtabbar Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-21 09:02:57 +01:00
qtabwidget QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
qtextbrowser Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-24 20:37:33 +01:00
qtextedit Merge remote-tracking branch 'origin/5.7' into dev 2016-06-13 12:46:46 +02:00
qtoolbar Updated license headers 2016-01-21 18:55:18 +00:00
qtoolbox Updated license headers 2016-01-21 18:55:18 +00:00
qtoolbutton Updated license headers 2016-01-21 18:55:18 +00:00
widgets.pro Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00