diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-02-02 11:40:59 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-02-02 12:04:43 (GMT) |
commit | 5b89e67619d15e817a81c8f39072a210c7cd5f4c (patch) | |
tree | da0f978a0a4ddef0e2f394d8c4d98cd052e4e8f4 /src/gui/dialogs/qfiledialog_symbian.cpp | |
parent | a2947892482bc2eee4d29e17f21423be8fc1ded5 (diff) | |
download | Qt-5b89e67619d15e817a81c8f39072a210c7cd5f4c.zip Qt-5b89e67619d15e817a81c8f39072a210c7cd5f4c.tar.gz Qt-5b89e67619d15e817a81c8f39072a210c7cd5f4c.tar.bz2 |
Fix few QFileDialog static method issues in Symbian^3
- The selected file path now uses slashes instead of Symbian native
backslashes as directory separator.
- If default file is specified in dir parameter of getSaveFileName in
addition to directory, that will be used as default suggested
filename.
- Clarified documentation a bit.
Task-number: QTBUG-17135
Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/gui/dialogs/qfiledialog_symbian.cpp')
-rw-r--r-- | src/gui/dialogs/qfiledialog_symbian.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index e7197bd..b8ea5e5 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -140,11 +140,13 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st CleanupStack::PushL(extensionFilter); extensionFilter->setFilter(filter); select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target, - startFolder, NULL, NULL, titlePtr, extensionFilter); + startFolder, 0, 0, titlePtr, extensionFilter); CleanupStack::Pop(extensionFilter); } else if (dialogMode == DialogSave) { + QString defaultFileName = QFileDialogPrivate::initialSelection(startDirectory); + target = qt_QString2TPtrC(defaultFileName); select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target, - startFolder, NULL, NULL, titlePtr); + startFolder, 0, 0, titlePtr); } else if (dialogMode == DialogFolder) { select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder, 0, 0, titlePtr, NULL, NULL); @@ -160,8 +162,10 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st startFolder = qt_QString2TPtrC(dir); } } - if (select) - selection.append(qt_TDesC2QString(target)); + if (select) { + QFileInfo fi(qt_TDesC2QString(target)); + selection = fi.absoluteFilePath(); + } #endif return selection; } |