Cocoa: Fix a variable shadowing issue that caused a crash on mac

Change-Id: I2d5ceb9502c769b5a585cdc6f1053168dfadbf12
Reviewed-on: http://codereview.qt-project.org/6000
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
This commit is contained in:
Zeno Albisser 2011-10-04 18:16:34 +02:00 committed by Qt by Nokia
parent b4855d33f0
commit c46f59fadf

View File

@ -755,9 +755,10 @@ void QCocoaMenu::setMenuEnabled(bool enable)
}
}
} else {
NSMenu *menu = menu;
for (NSMenuItem *item in [menu itemArray]) {
[item setEnabled:false];
NSMenu *m = menu;
for (NSMenuItem *item in [m itemArray]) {
if (item)
[item setEnabled:false];
}
}
}