diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-06-06 11:53:36 (GMT) |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-06-06 11:53:36 (GMT) |
commit | 40191387a77552b2ba6df547b87de040e126220a (patch) | |
tree | 465d46701a797a6c8cb19befc355bb197d7a5cce /src/gui/kernel | |
parent | 53d1557f1ef4969bd5c8d68b82a0151ae03f004a (diff) | |
download | Qt-40191387a77552b2ba6df547b87de040e126220a.zip Qt-40191387a77552b2ba6df547b87de040e126220a.tar.gz Qt-40191387a77552b2ba6df547b87de040e126220a.tar.bz2 |
Close context menus during orientation change.
Make non-native QMenus, i.e. context menus, work like in Avkon.
Reviewed-by: Miikka Heikkinen
Reviewed-by: Sami Merila
Task-number: QTBUG-19656
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6d1b96f..d3b0e99 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -2243,6 +2243,7 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent #if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS) case EEventDisplayChanged: #endif + { if (callSymbianEventFilters(symbianEvent)) return 1; if (S60) @@ -2254,6 +2255,12 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent QResizeEvent e(qt_desktopWidget->size(), oldSize); QApplication::sendEvent(qt_desktopWidget, &e); } + // Close non-native QMenus (that should act like context menus, i.e. close + // automatically when the orientation changes). + QMenu *activeMenu = qobject_cast<QMenu *>(QApplication::activePopupWidget()); + if (activeMenu) + activeMenu->close(); + } return 0; // Propagate to CONE case EEventWindowVisibilityChanged: if (controlInMap) { |