diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-08 15:08:26 (GMT) |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-08 15:08:26 (GMT) |
commit | 46cb3a09f4eedb2d4c612a6d73e9e0f14237350c (patch) | |
tree | d318fadf80d53e6bdf5f9c546417122785d1c9a4 /src/gui/widgets/qmenu_symbian.cpp | |
parent | fb8dccabd68a854c50adfc3f1e77badc3ff50ec8 (diff) | |
download | Qt-46cb3a09f4eedb2d4c612a6d73e9e0f14237350c.zip Qt-46cb3a09f4eedb2d4c612a6d73e9e0f14237350c.tar.gz Qt-46cb3a09f4eedb2d4c612a6d73e9e0f14237350c.tar.bz2 |
Fixes from code review
Diffstat (limited to 'src/gui/widgets/qmenu_symbian.cpp')
-rw-r--r-- | src/gui/widgets/qmenu_symbian.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index ed2ea46..49bcc21 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -40,8 +40,6 @@ #include "qmenu.h" #include "qapplication.h" -#include "qmainwindow.h" -#include "qtoolbar.h" #include "qevent.h" #include "qstyle.h" #include "qdebug.h" @@ -221,13 +219,12 @@ static void rebuildMenu() widgetWithContextMenu = 0; QMenuBarPrivate *mb = 0; QWidget *w = qApp->activeWindow(); - QMainWindow *mainWindow = qobject_cast<QMainWindow*>(w); QWidget* focusWidget = QApplication::focusWidget(); if (focusWidget) { if (hasContextMenu(focusWidget)) widgetWithContextMenu = focusWidget; } - + if (w) { mb = menubars()->value(w); qt_symbian_menu_static_cmd_id = QT_FIRST_MENU_ITEM; @@ -389,7 +386,7 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::removeAction(QSymbianMenuAction *a rebuild(); } -void QMenuBarPrivate::QSymbianMenuBarPrivate::InsertNativeMenuItems(const QList<QAction*> &actions) +void QMenuBarPrivate::QSymbianMenuBarPrivate::insertNativeMenuItems(const QList<QAction*> &actions) { for (int i = 0; i <actions.size(); ++i) { QSymbianMenuAction *symbianActionTopLevel = new QSymbianMenuAction; @@ -408,14 +405,14 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::rebuild() qt_symbian_menu_static_cmd_id = QT_FIRST_MENU_ITEM; deleteAll( &symbianMenus ); if (d) - InsertNativeMenuItems(d->actions); + insertNativeMenuItems(d->actions); contextMenuActionList.clear(); if (widgetWithContextMenu) { contexMenuCommand = qt_symbian_menu_static_cmd_id; contextAction.setText(QString("Actions")); contextMenuActionList.append(&contextAction); - InsertNativeMenuItems(contextMenuActionList); + insertNativeMenuItems(contextMenuActionList); } } |