diff options
author | Morten Sorvig <morten.sorvig@nokia.com> | 2011-09-29 14:29:05 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-10 07:47:58 +0200 |
commit | 9fa6e8f627d0c61fd5a3b993903a362dc04bf707 (patch) | |
tree | 56858ef0994ef4b300d5f6928fa51b0844bf1861 /src/widgets/widgets/qtoolbar.cpp | |
parent | 33233ca3e3d79152744eedd353106c5d95737e00 (diff) |
Clean-up a macro for Cocoa
Remove the usage of Q_MAC_USE_COCOA and Carbon code paths.
Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112
Reviewed-on: http://codereview.qt-project.org/5100
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qtoolbar.cpp')
-rw-r--r-- | src/widgets/widgets/qtoolbar.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index 6fc4dc90f8..3d3ef4f7b5 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -231,11 +231,6 @@ void QToolBarPrivate::startDrag(bool moving) if (!moving) { state->widgetItem = layout->unplug(q); -#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) - if (q->isWindow()) { - setWindowState(true, true); //set it to floating - } -#endif Q_ASSERT(state->widgetItem != 0); } state->dragging = !moving; @@ -1129,36 +1124,6 @@ bool QToolBar::event(QEvent *event) mwLayout->fixSizeInUnifiedToolbar(this); mwLayout->syncUnifiedToolbarVisibility(); } -# if !defined(QT_MAC_USE_COCOA) - // Fall through - case QEvent::LayoutRequest: { - // There's currently no way to invalidate the size and let - // HIToolbar know about it. This forces a re-check. - int earlyResult = -1; - if (QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget())) { - bool needUpdate = true; - if (event->type() == QEvent::LayoutRequest) { - QSize oldSizeHint = sizeHint(); - earlyResult = QWidget::event(event) ? 1 : 0; - needUpdate = oldSizeHint != sizeHint(); - } - - if (needUpdate) { - OSWindowRef windowRef = qt_mac_window_for(mainWindow); - if (toolbarInUnifiedToolBar(this) - && macWindowToolbarIsVisible(windowRef)) { - DisableScreenUpdates(); - macWindowToolbarShow(this, false); - macWindowToolbarShow(this, true); - EnableScreenUpdates(); - } - } - - if (earlyResult != -1) - return earlyResult; - } - } -# endif // !QT_MAC_USE_COCOA #endif // Q_WS_MAC break; case QEvent::ParentChange: |