diff options
author | Martin Smith <msmith@trolltech.com> | 2010-01-27 08:53:40 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-01-27 08:53:40 (GMT) |
commit | fdd5a4f3c18b47826ebe63d8753cd27164ad8169 (patch) | |
tree | c78d347f4fe576288a95e8239bbca2da99f0626e /src/gui/widgets | |
parent | aebc34877fb17405e8e5915760012a82d0178b97 (diff) | |
parent | 35386ae28887d56cf6fd6f6cc7ceaf0506abe18a (diff) | |
download | Qt-fdd5a4f3c18b47826ebe63d8753cd27164ad8169.zip Qt-fdd5a4f3c18b47826ebe63d8753cd27164ad8169.tar.gz Qt-fdd5a4f3c18b47826ebe63d8753cd27164ad8169.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qmainwindowlayout_mac.mm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm index ee79f5a..d92168a 100644 --- a/src/gui/widgets/qmainwindowlayout_mac.mm +++ b/src/gui/widgets/qmainwindowlayout_mac.mm @@ -472,14 +472,20 @@ void QMainWindowLayout::removeFromMacToolbar(QToolBar *toolbar) void QMainWindowLayout::cleanUpMacToolbarItems() { - for (int i = 0; i < toolbarItemsCopy.size(); ++i) +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; +#endif + for (int i = 0; i < toolbarItemsCopy.size(); ++i) { +#ifdef QT_MAC_USE_COCOA + NSToolbarItem *item = static_cast<NSToolbarItem *>(toolbarItemsCopy.at(i)); + [item setView:0]; +#endif CFRelease(toolbarItemsCopy.at(i)); + } toolbarItemsCopy.clear(); unifiedToolbarHash.clear(); #ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - OSWindowRef window = qt_mac_window_for(layoutState.mainWindow); NSToolbar *macToolbar = [window toolbar]; if (macToolbar) { |