use QStandardPaths locations for all file dialogs.

This commit is contained in:
Adasauce 2020-02-14 21:35:26 -04:00
parent 17b5cc32dc
commit cb36050822
No known key found for this signature in database
GPG key ID: B4FD3151235211CB
4 changed files with 15 additions and 6 deletions

View file

@ -626,8 +626,9 @@ TextInputWidget::command(QString command, QString args)
void
TextInputWidget::openFileSelection()
{
const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
const auto fileName =
QFileDialog::getOpenFileName(this, tr("Select a file"), "", tr("All Files (*)"));
QFileDialog::getOpenFileName(this, tr("Select a file"), homeFolder, tr("All Files (*)"));
if (fileName.isEmpty())
return;