Changeset 651 for trunk/src/gui/widgets/qmenu_symbian.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/widgets/qmenu_symbian.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 82 82 static QPointer<QWidget> widgetWithContextMenu; 83 83 static QList<QAction*> contextMenuActionList; 84 static QWidget* actionMenu = NULL; 84 85 static int contexMenuCommand=0; 85 86 … … 225 226 226 227 #ifdef Q_WS_S60 228 void qt_symbian_next_menu_from_action(QWidget *actionContainer) 229 { 230 actionMenu = actionContainer; 231 } 232 227 233 void qt_symbian_show_toplevel( CEikMenuPane* menuPane) 228 234 { 235 if (actionMenu) { 236 QMenuBarPrivate *mb = 0; 237 mb = menubars()->value(actionMenu); 238 qt_symbian_menu_static_cmd_id = QT_SYMBIAN_FIRST_MENU_ITEM; 239 deleteAll( &symbianMenus ); 240 Q_ASSERT(mb); 241 mb->symbian_menubar->rebuild(); 242 for (int i = 0; i < symbianMenus.count(); ++i) 243 QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData)); 244 actionMenu = NULL; 245 return; 246 } 247 229 248 if (!menuExists()) 230 249 return; … … 272 291 { 273 292 Q_Q(QMenuBar); 274 if (parent && parent->isWindow()){ 275 menubars()->insert(q->window(), this); 276 symbian_menubar = new QSymbianMenuBarPrivate(this); 277 nativeMenuBars.append(q); 293 if (parent) { 294 if(parent->isWindow()) { 295 menubars()->insert(q->window(), this); 296 symbian_menubar = new QSymbianMenuBarPrivate(this); 297 nativeMenuBars.append(q); 298 } else { 299 menubars()->insert(q->parentWidget(), this); 300 symbian_menubar = new QSymbianMenuBarPrivate(this); 301 nativeMenuBars.append(q); 302 } 278 303 } 279 304 } … … 285 310 nativeMenuBars.removeAt(index); 286 311 menubars()->remove(q->window(), this); 312 menubars()->remove(q->parentWidget(), this); 287 313 rebuildMenu(); 288 314 if (symbian_menubar)
Note:
See TracChangeset
for help on using the changeset viewer.