opengisch / qgis-swiss-locator

Swiss Geoadmin layer and feature search for QGIS 3
https://www.opengis.ch/2024/06/25/swiss-locator-plugin-3-0-is-here-with-exciting-features/
GNU General Public License v3.0
13 stars 4 forks source link

[wmts] Check that we've got a file path before attempting to parse it #84

Closed gacarrillor closed 4 months ago

gacarrillor commented 4 months ago

Fix #51

Note: I've been unable to replicate the issue. QGIS has specific tests that verify that a filePath() is always set along with a QgsFetchedContent.ContentStatus.Finished status. See https://github.com/qgis/QGIS/blob/166f326b3324d555af80d1b1b3a9c23f028955b5/tests/src/python/test_qgsnetworkcontentfetcherregistry.py#L81

However, I've added a double check here (QGIS seems to do the same) to avoid attempting to parse the file if filePath() is empty, so we won't never get the error.