summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac.mm5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac.mm b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
index 865069e..10fe9b0 100644
--- a/src/gui/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
@@ -120,12 +120,9 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
NSArray *items = [[qt_mac_window_for(mainWindowLayout->layoutState.mainWindow->window()) toolbar] items];
int someIndex = 0;
- bool foundItem = false;
for (NSToolbarItem *i in items) {
- if (i == item) {
- foundItem = true;
+ if (i == item)
break;
- }
++someIndex;
}
mainWindowLayout->toolbarItemsCopy.insert(someIndex, item);