diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2011-12-13 12:24:14 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2011-12-13 12:33:03 (GMT) |
commit | b249e4c32d697ef56c196bb2a14a18319100f127 (patch) | |
tree | b26306c03a3304dd36c88560b683046b4e4abeb4 /src | |
parent | 43d4faf686da7d553171d7c8894c2825b4572dd6 (diff) | |
download | Qt-b249e4c32d697ef56c196bb2a14a18319100f127.zip Qt-b249e4c32d697ef56c196bb2a14a18319100f127.tar.gz Qt-b249e4c32d697ef56c196bb2a14a18319100f127.tar.bz2 |
Default to QDir::homePath() in Symbian native file dialogs
Symbian places restrictions on the directories in which the native file
dialog can browse. If the path passed to QFileDialog::getXxxFileName()
is inaccessible, the implementation defaults to a path which is
accessible.
Previously, this default path was QDir::rootPath(). Changes to the
Symbian file engine in Qt 4.8 mean that this now returns "C:\" which is
inaccesible to the file dialog. This patch changes the default path to
QDir::homePath(), which returns "C:\data".
Task-number: ou1cimx1#947939
Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qfiledialog_symbian.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index 1ffbf1d..01c7b9b 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -143,8 +143,8 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st tryCount = 0; } else { // Symbian native file dialog doesn't allow accessing files outside C:/Data - // It will always leave in that case, so default into QDir::rootPath() in error cases. - QString dir = QDir::toNativeSeparators(QDir::rootPath()); + // It will always leave in that case, so default into QDir::homePath() in error cases. + QString dir = QDir::toNativeSeparators(QDir::homePath()); startFolder = qt_QString2TPtrC(dir); } } |