GTK FileDialog: don't convert QUrl to QString prematurely
File dialog APIs are being converted to QUrls as much as possible. Task-number: QTBUG-35947 Task-number: QTBUG-35948 Change-Id: I98d86249ac5018c3b7439065ae6ad7f1c7422a08 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
parent
08127d93b4
commit
7c03f00a4e
@ -419,12 +419,11 @@ void QGtk2FileDialogHelper::applyOptions()
|
||||
if (!nameFilters.isEmpty())
|
||||
setNameFilters(nameFilters);
|
||||
|
||||
const QString initialDirectory = opts->initialDirectory().toLocalFile();
|
||||
if (!initialDirectory.isEmpty())
|
||||
setDirectory(initialDirectory);
|
||||
if (opts->initialDirectory().isLocalFile())
|
||||
setDirectory(opts->initialDirectory());
|
||||
|
||||
foreach (const QUrl &filename, opts->initiallySelectedFiles())
|
||||
selectFile(filename.toLocalFile());
|
||||
selectFile(filename);
|
||||
|
||||
const QString initialNameFilter = opts->initiallySelectedNameFilter();
|
||||
if (!initialNameFilter.isEmpty())
|
||||
|
Loading…
Reference in New Issue
Block a user