diff options
author | Martin Pejcoch <martin.pejcoch@nokia.com> | 2009-10-15 14:07:02 (GMT) |
---|---|---|
committer | Martin Pejcoch <martin.pejcoch@nokia.com> | 2009-10-20 14:26:46 (GMT) |
commit | e47ea4694fb9228d111e31d8c590e6d5c16e7461 (patch) | |
tree | f87426fe46aae6db24e9acb49c7cf0011f0a6a44 /src/gui/dialogs | |
parent | 9bdc0a2d18bcc4938d79079e184a05acd5f43b22 (diff) | |
download | Qt-e47ea4694fb9228d111e31d8c590e6d5c16e7461.zip Qt-e47ea4694fb9228d111e31d8c590e6d5c16e7461.tar.gz Qt-e47ea4694fb9228d111e31d8c590e6d5c16e7461.tar.bz2 |
Set OFN_PATHMUSTEXIT as a default parameter
This will result in a warning if the path entered doesn't exist,
which is the behavior of native applications.
Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qfiledialog_win.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp index b59c28b..8089b43 100644 --- a/src/gui/dialogs/qfiledialog_win.cpp +++ b/src/gui/dialogs/qfiledialog_win.cpp @@ -251,10 +251,10 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent, ofn->nMaxFile = maxLen; ofn->lpstrInitialDir = (wchar_t*)tInitDir.utf16(); ofn->lpstrTitle = (wchar_t*)tTitle.utf16(); - ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER); + ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_PATHMUSTEXIST); if (mode == QFileDialog::ExistingFile || mode == QFileDialog::ExistingFiles) - ofn->Flags |= (OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST); + ofn->Flags |= (OFN_FILEMUSTEXIST); if (mode == QFileDialog::ExistingFiles) ofn->Flags |= (OFN_ALLOWMULTISELECT); if (!(options & QFileDialog::DontConfirmOverwrite)) |