The content of the FileDialog.folder property has not been applied
to the native QFileDialog, so it was not possible to pre-select a
folder for the file dialog.
Change-Id: Iaadd6aa71bc37739c16a2e7c5bff2d0050f15f3a
Task-number: QTBUG-35973
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
m_dialog.setFileMode(QFileDialog::FileMode(QPlatformFileDialogHelper::options()->fileMode()));
m_dialog.setOptions((QFileDialog::Options)((int)(QPlatformFileDialogHelper::options()->options())));
m_dialog.setAcceptMode(QFileDialog::AcceptMode(QPlatformFileDialogHelper::options()->acceptMode()));
+
+ const QUrl initialDirectory = QPlatformFileDialogHelper::options()->initialDirectory();
+ if (initialDirectory.isValid() && initialDirectory.isLocalFile())
+ m_dialog.setDirectory(initialDirectory.toLocalFile());
}
bool QFileDialogHelper::show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) {