summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-14 09:28:47 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-14 09:30:38 (GMT)
commit2fc228b4d2fbe6ca44389e9e065272030775c87b (patch)
treee42959fa5f7f8948df19ea6ddd92fdac408b1a72 /src/gui/dialogs
parentefba0372add3a080acafc30663b28e72ef72e435 (diff)
downloadQt-2fc228b4d2fbe6ca44389e9e065272030775c87b.zip
Qt-2fc228b4d2fbe6ca44389e9e065272030775c87b.tar.gz
Qt-2fc228b4d2fbe6ca44389e9e065272030775c87b.tar.bz2
Cocoa: qfiledialog will not exit cleanly
The native filedialog will not exit if it is told to hide. To remedy this, we just add an extra interrupt call so to inform the event dispatcher that it needs to return the the event loop to check if it has been told to quit Rev-By: olivier
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 3a4ecce..8e4c461 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -62,6 +62,7 @@
#include <qvarlengtharray.h>
#include <qdesktopwidget.h>
#include <stdlib.h>
+#include <qabstracteventdispatcher.h>
#include "ui_qfiledialog.h"
QT_BEGIN_NAMESPACE
@@ -245,6 +246,8 @@ QT_USE_NAMESPACE
mReturnCode = [mSavePanel
runModalForDirectory:mCurrentDir
file:selectable ? filename : @"untitled"];
+
+ QAbstractEventDispatcher::instance()->interrupt();
return (mReturnCode == NSOKButton);
}