summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-07-14 13:47:10 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-07-14 13:47:38 (GMT)
commitc22a0186b5255af45f0b36acbde600de0e614266 (patch)
tree9b7f576630dfd6d9718b015931d7b934dce8f872
parentb4b9e2908f74a61170d9d84597b90ed0d60f74fc (diff)
downloadQt-c22a0186b5255af45f0b36acbde600de0e614266.zip
Qt-c22a0186b5255af45f0b36acbde600de0e614266.tar.gz
Qt-c22a0186b5255af45f0b36acbde600de0e614266.tar.bz2
Revert "QFileDialog: When passing an invalid path in static functions the native"
This reverts commit a4c4f994fa51ff216f0d43098824617e14b8a284.
-rw-r--r--src/gui/dialogs/qfiledialog.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 9f050de..d18cc7f 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -1599,12 +1599,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
args.parent = parent;
args.caption = caption;
args.directory = QFileDialogPrivate::workingDirectory(dir);
- //If workingDirectory returned a different path than the initial one,
- //it means that the initial path was invalid. There is no point to try select a file
- if (args.directory != QFileInfo(dir).path())
- args.selection = QString();
- else
- args.selection = QFileDialogPrivate::initialSelection(dir);
+ args.selection = QFileDialogPrivate::initialSelection(dir);
args.filter = filter;
args.mode = ExistingFile;
args.options = options;
@@ -1688,12 +1683,7 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
args.parent = parent;
args.caption = caption;
args.directory = QFileDialogPrivate::workingDirectory(dir);
- //If workingDirectory returned a different path than the initial one,
- //it means that the initial path was invalid. There is no point to try select a file
- if (args.directory != QFileInfo(dir).path())
- args.selection = QString();
- else
- args.selection = QFileDialogPrivate::initialSelection(dir);
+ args.selection = QFileDialogPrivate::initialSelection(dir);
args.filter = filter;
args.mode = ExistingFiles;
args.options = options;
@@ -1779,12 +1769,7 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
args.parent = parent;
args.caption = caption;
args.directory = QFileDialogPrivate::workingDirectory(dir);
- //If workingDirectory returned a different path than the initial one,
- //it means that the initial path was invalid. There is no point to try select a file
- if (args.directory != QFileInfo(dir).path())
- args.selection = QString();
- else
- args.selection = QFileDialogPrivate::initialSelection(dir);
+ args.selection = QFileDialogPrivate::initialSelection(dir);
args.filter = filter;
args.mode = AnyFile;
args.options = options;