summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_symbian.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-10-20 13:15:51 (GMT)
committeraxis <qt-info@nokia.com>2009-10-21 10:56:50 (GMT)
commit5370e5ff5481a64a7d4a7c182155ce893740abe0 (patch)
tree7c10423b6a446ce537d60cbae33e6b9ce8e4c7ae /src/gui/widgets/qmenu_symbian.cpp
parent3ce94323a886abf6047135f188a6e10082a3e28d (diff)
downloadQt-5370e5ff5481a64a7d4a7c182155ce893740abe0.zip
Qt-5370e5ff5481a64a7d4a7c182155ce893740abe0.tar.gz
Qt-5370e5ff5481a64a7d4a7c182155ce893740abe0.tar.bz2
Cleaned up the API of the Symbian event hooks.
The two major points were: - Replacing "s60" with "symbian" in all event handling functions, since there is nothing S60-specific about them. - Replace the Symbian event types with the encapsulating QSymbianEvent container. This allows us to cope with more types of events in the future without having to add new virtual functions. AutoTest: QWidget passed Task: QT-1156 RevBy: Jason Barron RevBy: Shane Kearns RevBy: Sami Merila
Diffstat (limited to 'src/gui/widgets/qmenu_symbian.cpp')
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index d757f98..94c4177 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -243,11 +243,14 @@ void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id)
}
#endif // Q_WS_S60
-void QMenuBarPrivate::symbianCommands(int command)
+int QMenuBarPrivate::symbianCommands(int command)
{
+ int ret = 0;
+
if (command == contexMenuCommand && !widgetWithContextMenu.isNull()) {
QContextMenuEvent* event = new QContextMenuEvent(QContextMenuEvent::Keyboard, QPoint(0,0));
QCoreApplication::postEvent(widgetWithContextMenu, event);
+ ret = 1;
}
int size = nativeMenuBars.size();
@@ -258,8 +261,11 @@ void QMenuBarPrivate::symbianCommands(int command)
emit nativeMenuBars.at(i)->triggered(menu->action);
menu->action->activate(QAction::Trigger);
+ ret = 1;
break;
}
+
+ return ret;
}
void QMenuBarPrivate::symbianCreateMenuBar(QWidget *parent)