summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qcolordialog_mac.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2011-03-24 10:41:36 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:43 +0200
commit8ab64530b3e9b9749b1f83cef437194bccd39855 (patch)
tree6b37a4d95763fceded67ac2769f2fcbe88ab9f22 /src/gui/dialogs/qcolordialog_mac.mm
parent0fbeed69a42415b375e33a9c8dcceff887a5df1c (diff)
Cocoa: respect QT_NO_EXCEPTION in color dialog
If the macro is set, we should not use cocoa exceptions either, as this causes compile failures Rev-By: jbache (cherry picked from commit cdb5729d8e1ffc4a00b52d6d4bbee34a9820a193)
Diffstat (limited to 'src/gui/dialogs/qcolordialog_mac.mm')
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index ee9b19ad99..9daf595a9b 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -343,6 +343,7 @@ QT_USE_NAMESPACE
mDialogIsExecuting = true;
bool modalEnded = false;
while (!modalEnded) {
+#ifndef QT_NO_EXCEPTIONS
@try {
[NSApp runModalForWindow:mColorPanel];
modalEnded = true;
@@ -351,6 +352,10 @@ QT_USE_NAMESPACE
// clicking on 'SelectedMenuItemColor' from the 'Developer'
// palette (tab three).
}
+#else
+ [NSApp runModalForWindow:mColorPanel];
+ modalEnded = true;
+#endif
}
QAbstractEventDispatcher::instance()->interrupt();