diff options
author | Morten Sørvig <msorvig@trolltech.com> | 2009-07-29 05:42:30 (GMT) |
---|---|---|
committer | Morten Sørvig <msorvig@trolltech.com> | 2009-07-29 05:42:30 (GMT) |
commit | a45fe18569be1fc91e26f6e58d2f16bc8c6958de (patch) | |
tree | bb46a8825f6ee94891f2e8da527e8b5b308819b0 | |
parent | e570225ee8332602c85506ff87e2596173b68ecd (diff) | |
download | Qt-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.mm | 4 |
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()]; } |