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)
This commit is contained in:
Richard Moe Gustavsen 2011-03-24 10:41:36 +01:00 committed by Olivier Goffart
parent 0fbeed69a4
commit 8ab64530b3

View File

@ -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();