summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorCarlos Manuel Duclos Vergara <carlos.duclos@nokia.com>2010-03-04 10:38:48 (GMT)
committerCarlos Manuel Duclos Vergara <carlos.duclos@nokia.com>2010-03-04 11:55:06 (GMT)
commit17c5b2620178ce59d0d85d91c03880fc8b0d9992 (patch)
treee9e025e04a8d001d37d2c6b562ed4f80073910c2 /src/gui
parent05f6f721408930381eafd02fa4274080694d57e9 (diff)
downloadQt-17c5b2620178ce59d0d85d91c03880fc8b0d9992.zip
Qt-17c5b2620178ce59d0d85d91c03880fc8b0d9992.tar.gz
Qt-17c5b2620178ce59d0d85d91c03880fc8b0d9992.tar.bz2
showFullscreen() broken if UnifiedTitleAndToolBarOnMac is enabled
The problem here is caused by the fix to QTBUG-6200. For this fix we removed the lines that deleted the item because the iterator might be invalid at that point. However, we still need to delete the iterator. The solution is to not use the iterator and ask the hash to delete the item, since the remove function will not crash if the item is invalid. Task-number: QTBUG-8633 Reviewed-by: Prasanth
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index d92168a..9527057 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -463,6 +463,8 @@ void QMainWindowLayout::removeFromMacToolbar(QToolBar *toolbar)
NSToolbarItem *item = static_cast<NSToolbarItem *>(it.key());
[[qt_mac_window_for(layoutState.mainWindow->window()) toolbar]
removeItemAtIndex:toolbarItemsCopy.indexOf(item)];
+ unifiedToolbarHash.remove(item);
+ qtoolbarsInUnifiedToolbarList.removeAll(toolbar);
#endif
break;
}