From b249e4c32d697ef56c196bb2a14a18319100f127 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 13 Dec 2011 12:24:14 +0000 Subject: 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 --- src/gui/dialogs/qfiledialog_symbian.cpp | 4 ++-- 1 file 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); } } -- cgit v0.12