diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-12-15 09:29:27 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-12-15 10:27:56 (GMT) |
commit | 9f8d3a39606abc3888fb9f19594b7db54f5306be (patch) | |
tree | 9578dfaf40191df6b8e750682806e4a0465b446e /src/gui | |
parent | 66d28ef6125294113d6f9b04abdc10d935d0f4b5 (diff) | |
download | Qt-9f8d3a39606abc3888fb9f19594b7db54f5306be.zip Qt-9f8d3a39606abc3888fb9f19594b7db54f5306be.tar.gz Qt-9f8d3a39606abc3888fb9f19594b7db54f5306be.tar.bz2 |
Calling removeToolBar() on native Mac toolbars (Cocoa) causes crash.
The hash and the list which stores the references are already cleared
by the delegate function toolbarDidRemoveItem: There is no need to
remove them manually after a call to [NSToolbar removeItemAtIndex].
Task-number: QTBUG-6200
Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qmainwindowlayout_mac.mm | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm index 8d8ffa7..6d50678 100644 --- a/src/gui/widgets/qmainwindowlayout_mac.mm +++ b/src/gui/widgets/qmainwindowlayout_mac.mm @@ -463,9 +463,6 @@ void QMainWindowLayout::removeFromMacToolbar(QToolBar *toolbar) NSToolbarItem *item = static_cast<NSToolbarItem *>(it.key()); [[qt_mac_window_for(layoutState.mainWindow->window()) toolbar] removeItemAtIndex:toolbarItemsCopy.indexOf(item)]; - // In Carbon this hash and list gets emptied via events. In Cocoa, we have to do it ourselves here. - it = unifiedToolbarHash.erase(it); - qtoolbarsInUnifiedToolbarList.removeAll(toolbar); #endif break; } |