Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7
-
None
-
106fc77a5 (dev), 9ef382afb (6.7)
Description
The GeoJsonViewer cannot open files with the file dialog.
The file dialog returns, e.g.: QUrl("file:///C:/Users/Matti/qt5/qtlocation/examples/location/geojson_viewer/data/10-countries.json")
and url.path() transforms it to: "/C:/Users/Matti/qt5/qtlocation/examples/location/geojson_viewer/data/10-countries.json"
QFile cannot open this path because of the leading "/".
A workaround is to use url.toLocalFile(), but maybe we should make sure fileDialog -> QFile(url.path()) works.
Attachments
For Gerrit Dashboard: QTBUG-121766 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
536189,4 | Use QUrl::toLocalFile() in GeoJsonData | dev | qt/qtlocation | Status: MERGED | +2 | 0 |
536616,2 | Do not add a slash in front of Windows paths | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |
537571,2 | Use QUrl::toLocalFile() in GeoJsonData | 6.7 | qt/qtlocation | Status: MERGED | +2 | 0 |