summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_symbian.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2010-03-12 11:32:38 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2010-03-12 11:36:11 (GMT)
commit7829fe1507741c7196fe3904d90ea10178625393 (patch)
tree2062721f23dc7e8bb0c9d234058c6bb3602a1855 /src/gui/widgets/qmenu_symbian.cpp
parent76c0bc4f95fce3c5fd9f77b778180d1b50b2b095 (diff)
downloadQt-7829fe1507741c7196fe3904d90ea10178625393.zip
Qt-7829fe1507741c7196fe3904d90ea10178625393.tar.gz
Qt-7829fe1507741c7196fe3904d90ea10178625393.tar.bz2
Moved softkey "Options" action handling from QMainWindow to QMenuBar.
This change is done to enable QMenuBar usage and related "Options" softkey also on other than QMainWindow objects. For example with this change it is possible to create menubar and set it to QLayout by using setMenuBar, and it will then be usable via "Options" softkey. This functionality makes it easy to use different menus for different views in QStackedWidget. Task-number: QT-2275 (Not yet finished, but related) Reviewed-by: Sami Merila Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui/widgets/qmenu_symbian.cpp')
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index e46688c..7224768 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -324,6 +324,14 @@ void QMenuBarPrivate::symbianDestroyMenuBar()
symbian_menubar = 0;
}
+void QMenuBarPrivate::reparentMenuBar(QWidget *oldParent, QWidget *newParent)
+{
+ if (menubars()->contains(oldParent)) {
+ QMenuBarPrivate *object = menubars()->take(oldParent);
+ menubars()->insert(newParent, object);
+ }
+}
+
QMenuBarPrivate::QSymbianMenuBarPrivate::QSymbianMenuBarPrivate(QMenuBarPrivate *menubar)
{
d = menubar;