summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-07-29 06:18:35 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-07-29 06:19:57 (GMT)
commit7ac907ca7cfaac6698bc044e60ffd4d5d4a65d42 (patch)
tree65c4eaf7021869c278a7c1f40761133f0419194e /src
parent461518b2429bb1ab4b356f3326b63db98d19e11b (diff)
downloadQt-7ac907ca7cfaac6698bc044e60ffd4d5d4a65d42.zip
Qt-7ac907ca7cfaac6698bc044e60ffd4d5d4a65d42.tar.gz
Qt-7ac907ca7cfaac6698bc044e60ffd4d5d4a65d42.tar.bz2
Comment one of my changes from yesterday
Task-number: 258445
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 3770012..1ac225d 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -283,14 +283,17 @@ QT_USE_NAMESPACE
- (void)finishOffWithCode:(NSInteger)code
{
- // Finish the QColorDialog as well. But since a call to accept or reject will
- // close down the QEventLoop found in QDialog, we need to make sure that the
- // current thread has exited the native dialogs modal session/run loop first.
- // We ensure this by posting the call:
mResultCode = code;
if (mDialogIsExecuting) {
+ // We stop the current modal event loop. The control
+ // will then return inside -(void)exec below.
+ // It's important that the modal event loop is stopped before
+ // we accept/reject QColorDialog, since QColorDialog has its
+ // own event loop that needs to be stopped last.
[NSApp stopModalWithCode:code];
} else {
+ // Since we are not in a modal event loop, we can safely close
+ // down QColorDialog
if (mResultCode == NSCancelButton)
mPriv->colorDialog()->reject();
else