summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_mac.mm
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-23 22:21:50 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-23 22:21:50 (GMT)
commite5722f539888913b9bea4f91db95f5e2c5fceed1 (patch)
treef1562de5cd28fa782d6285970c928972de1fb50c /src/gui/dialogs/qfiledialog_mac.mm
parent3ac06f540761fa259317f773c8a4517e252623a3 (diff)
parent51955cb4ca94b2a700cb276714bec77bdb1bc934 (diff)
downloadQt-e5722f539888913b9bea4f91db95f5e2c5fceed1.zip
Qt-e5722f539888913b9bea4f91db95f5e2c5fceed1.tar.gz
Qt-e5722f539888913b9bea4f91db95f5e2c5fceed1.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: We need to swallow the event, otherwise it might pop up several times. Set the item data thru the model, so we actually emit dataChanged. There where still references to the old Assistant. Newly created folders in QFileDialog are disabled on Cocoa. don't remove the path from the name of included files add some comments remove support for QMAKE_POST_INCLUDE_FILES remove unused function fix prompt() stdin safety check Improve text performance with QtWebKit in Qt 4.7 Removed support for static linking of QtWebKit. When a drag is finished with on Mac, then it should delete itself
Diffstat (limited to 'src/gui/dialogs/qfiledialog_mac.mm')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index b07b1ea..f1afaa9 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -284,6 +284,15 @@ QT_USE_NAMESPACE
if ([filename length] == 0)
return NO;
+ // Always accept directories regardless of their names (unless it is a bundle):
+ BOOL isDir;
+ if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) {
+ if ([mSavePanel treatsFilePackagesAsDirectories] == NO) {
+ if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO)
+ return YES;
+ }
+ }
+
QString qtFileName = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(filename);
QFileInfo info(qtFileName.normalized(QT_PREPEND_NAMESPACE(QString::NormalizationForm_C)));
QString path = info.absolutePath();
@@ -295,15 +304,6 @@ QT_USE_NAMESPACE
if (!mQDirFilterEntryList->contains(info.fileName()))
return NO;
- // Always accept directories regardless of their names (unless it is a bundle):
- BOOL isDir;
- if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) {
- if ([mSavePanel treatsFilePackagesAsDirectories] == NO) {
- if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO)
- return YES;
- }
- }
-
// No filter means accept everything
if (mSelectedNameFilter->isEmpty())
return YES;