diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-03-08 10:18:43 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-03-08 10:18:43 (GMT) |
commit | 29ec793147054ea4beb1ad4adeebbbe1fe07b260 (patch) | |
tree | 9fcd27f7ce400229263ac62f392d400eec01d2a5 /src/gui/widgets | |
parent | de20e4df5f6a212115d10c225f945ab1610319ba (diff) | |
download | Qt-29ec793147054ea4beb1ad4adeebbbe1fe07b260.zip Qt-29ec793147054ea4beb1ad4adeebbbe1fe07b260.tar.gz Qt-29ec793147054ea4beb1ad4adeebbbe1fe07b260.tar.bz2 |
Carbon: usage of menu bars can cause exceptions to be thrown
The reason is that a function in the Qt menu bar code assumes that
windows on screen are NSWindows (which is true for the cocoa-port).
But when using carbon, this will fail. This simple patch will
fix this.
Reviewed-by: msorvig
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qmenu_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 2570cb5..43722a1 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1935,7 +1935,7 @@ static bool qt_mac_should_disable_menu(QMenuBar *menuBar) if (w->isVisible() && w->windowModality() == Qt::ApplicationModal) { for (int i=0; i<topLevelWidgets.size(); ++i) { QWidget *top = topLevelWidgets.at(i); - if (w != top && [qt_mac_window_for(top) isVisible]) { + if (w != top && top->isVisible()) { // INVARIANT: we found another visible window // on screen other than our modalWidget. We therefore // disable the menu bar to follow normal modality logic: |