Changeset 769 for trunk/src/gui/widgets/qmenu_symbian.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/widgets/qmenu_symbian.cpp
r651 r769 150 150 151 151 const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut); 152 QString iconText = action->action->iconText(); 153 TPtrC menuItemText = qt_QString2TPtrC( underlineShortCut ? action->action->text() : iconText); 152 QString actionText; 153 if (underlineShortCut) 154 actionText = action->action->text().left(CEikMenuPaneItem::SData::ENominalTextLength); 155 else 156 actionText = action->action->iconText().left(CEikMenuPaneItem::SData::ENominalTextLength); 157 TPtrC menuItemText = qt_QString2TPtrC(actionText); 154 158 if (action->action->menu()) { 155 159 SymbianMenuItem* menuItem = new SymbianMenuItem(); … … 257 261 SymbianMenuItem* menu = qt_symbian_find_menu(id, symbianMenus); 258 262 if (menu) { 263 // Normally first AddMenuItemL call for menuPane will create the item array. 264 // However if we don't have any items, we still need the item array. Otherwise 265 // menupane will crash. That's why we create item array here manually, and 266 // AddMenuItemL will then use the existing array. 267 CEikMenuPane::CItemArray* itemArray = q_check_ptr(new CEikMenuPane::CItemArray); 268 menuPane->SetItemArray(itemArray); 269 menuPane->SetItemArrayOwnedExternally(EFalse); 270 259 271 for (int i = 0; i < menu->children.count(); ++i) 260 272 QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData)); … … 317 329 } 318 330 331 void QMenuBarPrivate::reparentMenuBar(QWidget *oldParent, QWidget *newParent) 332 { 333 if (menubars()->contains(oldParent)) { 334 QMenuBarPrivate *object = menubars()->take(oldParent); 335 menubars()->insert(newParent, object); 336 } 337 } 338 319 339 QMenuBarPrivate::QSymbianMenuBarPrivate::QSymbianMenuBarPrivate(QMenuBarPrivate *menubar) 320 340 {
Note:
See TracChangeset
for help on using the changeset viewer.