diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 22:10:14 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 22:10:14 (GMT) |
commit | 47cd6aa2ca55484c6549aa8d37801fdf7eaf05f7 (patch) | |
tree | b0426841ac3de70f2bfcc59a3a5b5525ab058333 /src/gui/kernel/qwidget.cpp | |
parent | a17339e943f21bb6c6e16884f716dd9ab8f94938 (diff) | |
parent | 2a61c936bab8fb932568338d501d2b360fdb37ea (diff) | |
download | Qt-47cd6aa2ca55484c6549aa8d37801fdf7eaf05f7.zip Qt-47cd6aa2ca55484c6549aa8d37801fdf7eaf05f7.tar.gz Qt-47cd6aa2ca55484c6549aa8d37801fdf7eaf05f7.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fix compilation with QT_NO_TEXTSTREAM
Fix the compilation with QT_NO_TOOLTIP
Add unit tests for a number of QList methods.
Crash while dragging on Mac OS X (Cocoa)
Doc & menubar hidden for QtDemo after switching back from fullscreen
qdoc: Added breadcrumbs for class pages.
QTabWidget documentMode not working correctly on Mac
qdoc: Removed MacRefs for Xcode documentation stuff.
Slight QList documentation fix.
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index b59824c..20d1d30 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -220,6 +220,11 @@ QWidgetPrivate::QWidgetPrivate(int version) isWidget = true; memset(high_attributes, 0, sizeof(high_attributes)); +#if QT_MAC_USE_COCOA + drawRectOriginalAdded = false; + originalDrawMethod = true; + changeMethods = false; +#endif // QT_MAC_USE_COCOA #ifdef QWIDGET_EXTRA_DEBUG static int count = 0; qDebug() << "widgets" << ++count; @@ -12292,6 +12297,28 @@ void QWidgetPrivate::_q_delayedDestroy(WId winId) } #endif +#if QT_MAC_USE_COCOA +void QWidgetPrivate::syncUnifiedMode() { + // The whole purpose of this method is to keep the unifiedToolbar in sync. + // That means making sure we either exchange the drawing methods or we let + // the toolbar know that it does not require to draw the baseline. + Q_Q(QWidget); + // This function makes sense only if this is a top level + if(!q->isWindow()) + return; + OSWindowRef window = qt_mac_window_for(q); + if(changeMethods) { + // Ok, we are in documentMode. + if(originalDrawMethod) + qt_mac_replaceDrawRect(window, this); + } else { + if(!originalDrawMethod) + qt_mac_replaceDrawRectOriginal(window, this); + } +} + +#endif // QT_MAC_USE_COCOA + QT_END_NAMESPACE #include "moc_qwidget.cpp" |