summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-07-20 11:51:58 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-07-20 11:51:58 (GMT)
commit1a632e1bc677fce4b8d5450ce4a971fdde3ed42f (patch)
tree222c48a9d90097b3ea61cb2839b6541eff185c3a /src/gui/dialogs/qfiledialog.cpp
parent9bd8df2b405ef517d2d1b209b8004aaaa4994242 (diff)
parent3d6381b47a6048d04dbfc7b6984cae81c02d4fe6 (diff)
downloadQt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.zip
Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.tar.gz
Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp src/3rdparty/webkit/WebCore/page/DOMWindow.idl src/corelib/io/qdiriterator.cpp src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h tests/auto/qxmlquery/tst_qxmlquery.cpp tools/linguist/lconvert/main.cpp
Diffstat (limited to 'src/gui/dialogs/qfiledialog.cpp')
-rw-r--r--src/gui/dialogs/qfiledialog.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 849f4b3..8b4e1b1 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -1604,12 +1604,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;
@@ -1687,18 +1682,13 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
QString *selectedFilter,
Options options)
{
- if (qt_filedialog_open_filenames_hook)
+ if (qt_filedialog_open_filenames_hook && !(options & DontUseNativeDialog))
return qt_filedialog_open_filenames_hook(parent, caption, dir, filter, selectedFilter, options);
QFileDialogArgs args;
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;
@@ -1778,18 +1768,13 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
QString *selectedFilter,
Options options)
{
- if (qt_filedialog_save_filename_hook)
+ if (qt_filedialog_save_filename_hook && !(options & DontUseNativeDialog))
return qt_filedialog_save_filename_hook(parent, caption, dir, filter, selectedFilter, options);
QFileDialogArgs args;
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;
@@ -1858,7 +1843,7 @@ QString QFileDialog::getExistingDirectory(QWidget *parent,
const QString &dir,
Options options)
{
- if (qt_filedialog_existing_directory_hook)
+ if (qt_filedialog_existing_directory_hook && !(options & DontUseNativeDialog))
return qt_filedialog_existing_directory_hook(parent, caption, dir, options);
QFileDialogArgs args;
args.parent = parent;