for when a URI cannot be opened in a QGIS install, but the URI
matches a format which could potentially be opened in a different QGIS
install.
This can be used to show user-friendly warning messages advising user why
a particular uri cannot be opened on their QGIS install. For example, if
a QGIS install is built without the PDAL library then las/laz files are
unusable, and this method can be used to retrieve a user-friendly warning
as to why the las/laz files cannot be used on their QGIS build.
Instead of just showing the user a generic "not a valid or recognized data
source" error, we can use this api to show more helpful URIs about the
specific uri.
Initially intended to help advise users why LAS/LAZ files cannot be
opened on their QGIS install, but also could be used e.g. by mdal
to advise users about missing third party libraries preventing
them from opening certain mesh files, etc....
Paraphrasing Phil Thomson's advice on https://www.riverbankcomputing.com/pipermail/pyqt/2017-July/039450.html:
"
/Factory/ is used when the instance returned is guaranteed to be new to Python.
In this case it isn't because it has already been seen when being returned by by the python function
creating the provider subclass.
(However for a different sub-class implemented in C++ then it would be the first time it was seen
by Python so the /Factory/ on create() would be correct.)
You might try using /TransferBack/ on createProvider() instead - that might be the best compromise.
blocklisted and hidden from the QGIS interface, e.g. it is an internal
detail only (or sidecar file) and shouldn't be shown in things like the
browser panel
And adds blocklists for .aux.xml, .shp.xml and .tif.xml files for
the ogr/gdal providers
for a URI to better handle ties, add direct method to determine
whether a particular provider should defer handling of a certain
URI to another (better equipped) provider
The trust flag at the projetc level is only used to read vector layer extent from xml, not from provider.
This flag was not available at the vector layer and data provider level.
We propose a new QgsMapLayer reading flag to propagate the trust layer metadata prohect's read flag an d a new provider options to trust datasource config.
Trusting the datasource config means that the provider can use estimated metadata, the primary key is unique and the detectable geometry type and srid are the same as the requested.
This is the implementation of the new DB connections API (grant proposal 2019).
Summary
The new API makes it available to QGIS core a new interface for provider connections and will allow to:
replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
provide a unified API for common operations on DB connections:
executeSql and get the results
list tables names and properties and schemas
create a new vector table (no rasters for now)
create/rename/drop schemas and tables
vacuum
....
- grass data item provider fixes
- removed QgsProviderMetadata constructor (with std::function / PyObject) due to sip errors (api break)
- reverted DataCapability move to Qgis - back to QgsDataProvider (avoiding api breaks)
- WidgetMode enum documentation
- sipify monkey patching fix
- renamed WidgetMode's "None" to "Normal" value - in python None has special meaning (api break)
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)
Makes for nicer dox for both c++ and Python!