diff options
author | Miguel Costa <miguel.costa@qt.io> | 2018-11-05 18:09:13 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-11-07 13:38:03 +0000 |
commit | 5624243ae5a59596948ace7e414c4311faac21ef (patch) | |
tree | afae66504996a83e975b6f2f6daa95bf58abaa3e | |
parent | 2127aacbc2b0d97e612eb261938ead05d52296f3 (diff) | |
download | qtquickcontrols-5624243ae5a59596948ace7e414c4311faac21ef.tar.gz |
Fix FileDialog not working with UNC paths
Excluded from the Windows build a fixup for QUrl's containing too many
leading '/'. The fixup was applied on calls to setFolder(const QUrl &f).
It was mangling UNC (i.e. network) paths in Windows, causing
QQuickFileDialog to reject them.
The fixup was introduced in: 48c4c010095e851da3e58ac98514e29dff2e1262
Fixes: QTBUG-67932
Change-Id: Iaab98da9f014156c1d763a57b60ecad41be2e77f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | src/dialogs/qquickabstractfiledialog.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dialogs/qquickabstractfiledialog.cpp b/src/dialogs/qquickabstractfiledialog.cpp index 7c4aa394..c608453f 100644 --- a/src/dialogs/qquickabstractfiledialog.cpp +++ b/src/dialogs/qquickabstractfiledialog.cpp @@ -118,8 +118,10 @@ QUrl QQuickAbstractFileDialog::folder() const static QUrl fixupFolder(const QUrl &f) { QString lf = f.toLocalFile(); +#ifndef Q_OS_WIN // Don't mangle Windows network paths while (lf.startsWith("//")) lf.remove(0, 1); +#endif if (lf.isEmpty()) lf = QDir::currentPath(); return QUrl::fromLocalFile(lf); |