mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Merge pull request #3158 from Diapolo/guiutil
GUIUtil: make getSaveFileName() use native OS path separators
This commit is contained in:
commit
aa5822f9c3
@ -223,10 +223,9 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getSaveFileName(QWidget *parent, const QString &caption,
|
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,
|
||||||
const QString &dir,
|
const QString &filter,
|
||||||
const QString &filter,
|
QString *selectedSuffixOut)
|
||||||
QString *selectedSuffixOut)
|
|
||||||
{
|
{
|
||||||
QString selectedFilter;
|
QString selectedFilter;
|
||||||
QString myDir;
|
QString myDir;
|
||||||
@ -242,7 +241,8 @@ QString getSaveFileName(QWidget *parent, const QString &caption,
|
|||||||
{
|
{
|
||||||
myDir = dir;
|
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 ...) */
|
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
|
||||||
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
|
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user