From c22a0186b5255af45f0b36acbde600de0e614266 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Tue, 14 Jul 2009 15:47:10 +0200 Subject: Revert "QFileDialog: When passing an invalid path in static functions the native" This reverts commit a4c4f994fa51ff216f0d43098824617e14b8a284. --- src/gui/dialogs/qfiledialog.cpp | 21 +++------------------ 1 file 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; -- cgit v0.12