summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Sørvig <msorvig@trolltech.com>2009-07-29 05:42:30 (GMT)
committerMorten Sørvig <msorvig@trolltech.com>2009-07-29 05:42:30 (GMT)
commita45fe18569be1fc91e26f6e58d2f16bc8c6958de (patch)
treebb46a8825f6ee94891f2e8da527e8b5b308819b0
parente570225ee8332602c85506ff87e2596173b68ecd (diff)
downloadQt-a45fe18569be1fc91e26f6e58d2f16bc8c6958de.zip
Qt-a45fe18569be1fc91e26f6e58d2f16bc8c6958de.tar.gz
Qt-a45fe18569be1fc91e26f6e58d2f16bc8c6958de.tar.bz2
Compile.
Remobe another instance of for ... in use.
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index ff4cb71..3104083 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -1229,7 +1229,9 @@ void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse)
if (previousItem && previousIsSeparator)
[previousItem setHidden:YES];
} else {
- for (NSMenuItem *item in [menu itemArray]) {
+ NSArray *itemArray = [menu itemArray];
+ for (unsigned int i = 0; i < [itemArray count]; ++i) {
+ NSMenuItem *item = reinterpret_cast<NSMenuItem *>([itemArray objectAtIndex:i]);
if (QAction *action = reinterpret_cast<QAction *>([item tag]))
[item setHidden:!action->isVisible()];
}