qt6-bb10/tests/auto/corelib/io/qfileselector
Fabian Kosmale 7b1b1d990b QFileSelector: Preserve path to root directory
While QFileSelector is documented to work on files, select accepts
arbitrary URLs. Moreover, the QML engine can end up intercepting
arbitrary (user provided) URLs, including to directories.
Prior to this change, passing "file:///" or "/" to the function would
break: We would temporarily get a "//" path, which is invalid, and thus
we would return an invalid in the end.
Prevent this by only appending a slash to the path when it doesn't have
one.

Fixes: QTBUG-85410
Pick-to: 6.2
Change-Id: I1d2807a9d225df611c3a5e871e3c1d90a6a25953
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-07-21 19:37:16 +02:00
..
extras
platforms
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qfileselector.qrc
tst_qfileselector.cpp QFileSelector: Preserve path to root directory 2021-07-21 19:37:16 +02:00