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())
|
if (!nameFilters.isEmpty())
|
||||||
setNameFilters(nameFilters);
|
setNameFilters(nameFilters);
|
||||||
|
|
||||||
const QString initialDirectory = opts->initialDirectory().toLocalFile();
|
if (opts->initialDirectory().isLocalFile())
|
||||||
if (!initialDirectory.isEmpty())
|
setDirectory(opts->initialDirectory());
|
||||||
setDirectory(initialDirectory);
|
|
||||||
|
|
||||||
foreach (const QUrl &filename, opts->initiallySelectedFiles())
|
foreach (const QUrl &filename, opts->initiallySelectedFiles())
|
||||||
selectFile(filename.toLocalFile());
|
selectFile(filename);
|
||||||
|
|
||||||
const QString initialNameFilter = opts->initiallySelectedNameFilter();
|
const QString initialNameFilter = opts->initiallySelectedNameFilter();
|
||||||
if (!initialNameFilter.isEmpty())
|
if (!initialNameFilter.isEmpty())
|
||||||
|
Loading…
Reference in New Issue
Block a user