Changeset 769 for trunk/src/gui/widgets/qmenubar.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/qmenubar.cpp
r651 r769 72 72 #endif 73 73 74 #ifdef QT_SOFTKEYS_ENABLED 75 #include <private/qsoftkeymanager_p.h> 76 #endif 77 74 78 QT_BEGIN_NAMESPACE 75 79 … … 741 745 } 742 746 #endif 743 #ifdef Q_WS_S60744 symbianCreateMenuBar(q->parentWidget());745 if(symbian_menubar)746 q->hide();747 #endif748 749 747 q->setBackgroundRole(QPalette::Button); 750 748 oldWindow = oldParent = 0; 751 749 #ifdef QT3_SUPPORT 752 750 doAutoResize = false; 751 #endif 752 #ifdef QT_SOFTKEYS_ENABLED 753 menuBarAction = 0; 753 754 #endif 754 755 handleReparent(); … … 1385 1386 #endif 1386 1387 #ifdef Q_WS_S60 1387 if (symbian_menubar) 1388 1389 // Construct symbian_menubar when this code path is entered first time 1390 // and when newParent != NULL 1391 if (!symbian_menubar) 1392 symbianCreateMenuBar(newParent); 1393 1394 // Reparent and rebuild menubar when parent is changed 1395 if (symbian_menubar) { 1396 if (oldParent != newParent) 1397 reparentMenuBar(oldParent, newParent); 1398 q->hide(); 1388 1399 symbian_menubar->rebuild(); 1389 #endif 1390 1400 } 1401 1402 #ifdef QT_SOFTKEYS_ENABLED 1403 // Constuct menuBarAction when this code path is entered first time 1404 if (!menuBarAction) { 1405 if (newParent) { 1406 menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, newParent); 1407 newParent->addAction(menuBarAction); 1408 } 1409 } else { 1410 // If reparenting i.e. we already have menuBarAction, remove it from old parent 1411 // and add for a new parent 1412 if (oldParent) 1413 oldParent->removeAction(menuBarAction); 1414 if (newParent) 1415 newParent->addAction(menuBarAction); 1416 } 1417 #endif // QT_SOFTKEYS_ENABLED 1418 #endif // Q_WS_S60 1391 1419 } 1392 1420 … … 1441 1469 d->itemsDirty = true; 1442 1470 d->updateGeometries(); 1443 } 1471 #ifdef QT_SOFTKEYS_ENABLED 1472 } else if (e->type() == QEvent::LanguageChange) { 1473 if (d->menuBarAction) 1474 d->menuBarAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::MenuSoftKey)); 1475 #endif 1476 } 1477 1444 1478 QWidget::changeEvent(e); 1445 1479 } … … 1924 1958 1925 1959 Currently there is only support for the default action on Windows 1926 Mobile. All other platforms ignore the default action.1960 Mobile. On all other platforms this method is not available. 1927 1961 1928 1962 \sa defaultAction()
Note:
See TracChangeset
for help on using the changeset viewer.