Skip to content

Commit

Permalink
Use QUrls instead of QString to open and save files
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Carreira <[email protected]>
  • Loading branch information
jfmcarreira committed Jan 15, 2018
1 parent 6f11ed9 commit 5c13b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/utils/filedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static QString getParsedFilter(const QString &filter)

Url FileDialog::getOpenUrl(QWidget *parent, const QString &caption, const Url &dir, const QString &filter)
{
const QString openFileName = QFileDialog::getOpenFileName(parent, caption, dir.path(), getParsedFilter(filter));
const QUrl openFileName = QFileDialog::getOpenFileUrl(parent, caption, dir, getParsedFilter(filter));
if (openFileName.isEmpty())
return Url();
return Url(openFileName);
Expand Down Expand Up @@ -149,7 +149,7 @@ Url FileDialog::getOpenUrl(QWidget *parent, const QString &caption, const Url &d

Url FileDialog::getSaveUrl(QWidget *parent, const QString &caption, const Url &dir, const QString &filter)
{
const QString saveAsFileName = QFileDialog::getSaveFileName(parent, caption, dir.path(), getParsedFilter(filter));
const QUrl saveAsFileName = QFileDialog::getSaveFileUrl(parent, caption, dir, getParsedFilter(filter));
if (saveAsFileName.isEmpty())
return Url();

Expand Down

0 comments on commit 5c13b45

Please sign in to comment.