Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wms] Insure that mbtiles layers are invalidated when dataset is missing #56296

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Feb 11, 2024

Description

This fixes an issue whereas passing a WMS mbtiles source with a blank url fails to flag the layer as invalid.

The reason this is happening is because sqlite won't error when opening an empty-string database. In turn, that wrongly informs the WMS provider that everything is fine (ouch).

The fix is to simply check for an empty filename when calling QgsMbTiles::open() and return false (failure to open) when that's the case.

As for when a WMS mbtiles layer gets a blank url, it will easily happen if the .mbtile file is in a localized path where the file has been moved or deleted. In that cause, prior to the PR, QGIS would create a valid WMS layer rendering nothingness :)

Copy link

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 92607e7)

@nyalldawson nyalldawson merged commit 61dacd9 into qgis:master Feb 11, 2024
35 checks passed
@geogeek11
Copy link

Please when this fix will be released ? and in which version exactly ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants