diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-04-16 07:52:15 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-04-16 08:00:55 (GMT) |
commit | a4c4f994fa51ff216f0d43098824617e14b8a284 (patch) | |
tree | 4060ed2a8f3bb0a66130241676fca010f079a17a /tests/auto/qpainter | |
parent | 1ae4c7b989b04f89a5069d5a5db78c0d8914972b (diff) | |
download | Qt-a4c4f994fa51ff216f0d43098824617e14b8a284.zip Qt-a4c4f994fa51ff216f0d43098824617e14b8a284.tar.gz Qt-a4c4f994fa51ff216f0d43098824617e14b8a284.tar.bz2 |
QFileDialog: When passing an invalid path in static functions the native
dialog don't appear on Windows.
The problem is with the directory that you can specify when calling the
static functions. It can include a file in that path which means that
the file will be selected by default when the dialog appears. But if you
give an invalid file as a selection to the Windows API, then it simply
don't display the dialog. The patch is basically checking the dir we get
when we are called. workingDirectory tested it already and fallback
to the current directory if the argument is invalid. I just check now if
workingDirectory changed the path (that means the parameter value was
incorrect) and select nothing in that case. Using this trick avoid stating
again the complete path to check if the selection exist. (i.e. path()
on QFileInfo don't call stat()).
Task-number: 250120
Reviewed-by: jan-arve
Reviewed-by: jasplin
Diffstat (limited to 'tests/auto/qpainter')
0 files changed, 0 insertions, 0 deletions