aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-27 03:35:30 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-27 03:35:30 -0700
commitaa5822f9c3a71818231101b414bd90f5eb40f356 (patch)
treed9488d52a3f0dc97fa10bd03ec17e5a2a0ef33a7 /src
parent69438ad56a76fbb207e3d450660e294c2ed00a13 (diff)
parent444fd65f662159d4618eb80cf2a9f0ec2ca24c33 (diff)
Merge pull request #3158 from Diapolo/guiutil
GUIUtil: make getSaveFileName() use native OS path separators
Diffstat (limited to 'src')
-rw-r--r--src/qt/guiutil.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 9bb2fa7c99..5951cef99a 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -223,10 +223,9 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
}
}
-QString getSaveFileName(QWidget *parent, const QString &caption,
- const QString &dir,
- const QString &filter,
- QString *selectedSuffixOut)
+QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,
+ const QString &filter,
+ QString *selectedSuffixOut)
{
QString selectedFilter;
QString myDir;
@@ -242,7 +241,8 @@ QString getSaveFileName(QWidget *parent, const QString &caption,
{
myDir = dir;
}
- QString result = QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter);
+ /* Directly convert path to native OS path separators */
+ QString result = QDir::toNativeSeparators(QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter));
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");