src/gui/widgets/qmainwindow.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
  1372                 static_cast<QStatusTipEvent*>(event)->ignore();
  1372                 static_cast<QStatusTipEvent*>(event)->ignore();
  1373             return true;
  1373             return true;
  1374 #endif // QT_NO_STATUSTIP
  1374 #endif // QT_NO_STATUSTIP
  1375 
  1375 
  1376         case QEvent::StyleChange:
  1376         case QEvent::StyleChange:
       
  1377 #ifndef QT_NO_DOCKWIDGET
       
  1378             d->layout->layoutState.dockAreaLayout.styleChangedEvent();
       
  1379 #endif
  1377             if (!d->explicitIconSize)
  1380             if (!d->explicitIconSize)
  1378                 setIconSize(QSize());
  1381                 setIconSize(QSize());
  1379             break;
  1382             break;
  1380 #ifdef Q_WS_MAC
  1383 #ifdef Q_WS_MAC
  1381         case QEvent::Show:
  1384         case QEvent::Show:
  1451     Q_D(QMainWindow);
  1454     Q_D(QMainWindow);
  1452     if (!isWindow() || d->useHIToolBar == set || QSysInfo::MacintoshVersion < QSysInfo::MV_10_3)
  1455     if (!isWindow() || d->useHIToolBar == set || QSysInfo::MacintoshVersion < QSysInfo::MV_10_3)
  1453         return;
  1456         return;
  1454 
  1457 
  1455     // ### Disable the unified toolbar when using anything but the native graphics system.
  1458     // ### Disable the unified toolbar when using anything but the native graphics system.
  1456     if (windowSurface())
  1459     // ### Disable when using alien widgets as well
       
  1460     if (windowSurface() || testAttribute(Qt::WA_NativeWindow) == false)
  1457         return;
  1461         return;
  1458 
  1462 
  1459     d->useHIToolBar = set;
  1463     d->useHIToolBar = set;
  1460     createWinId(); // We need the hiview for down below.
  1464     createWinId(); // We need the hiview for down below.
  1461 
  1465 
  1533     if (child == this)
  1537     if (child == this)
  1534         return;
  1538         return;
  1535 
  1539 
  1536 #ifndef QT_NO_MENU
  1540 #ifndef QT_NO_MENU
  1537     QMenu *popup = createPopupMenu();
  1541     QMenu *popup = createPopupMenu();
  1538     if (popup && !popup->isEmpty()) {
  1542     if (popup) {
  1539         popup->exec(event->globalPos());
  1543         if (!popup->isEmpty()) {
  1540         event->accept();
  1544             popup->setAttribute(Qt::WA_DeleteOnClose);
  1541     }
  1545             popup->popup(event->globalPos());
  1542     delete popup;
  1546             event->accept();
       
  1547         } else {
       
  1548             delete popup;
       
  1549         }
       
  1550     }
  1543 #endif
  1551 #endif
  1544 }
  1552 }
  1545 #endif // QT_NO_CONTEXTMENU
  1553 #endif // QT_NO_CONTEXTMENU
  1546 
  1554 
  1547 #ifndef QT_NO_MENU
  1555 #ifndef QT_NO_MENU