Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Dox
  • Loading branch information
nyalldawson committed Jul 1, 2021
1 parent 7c6afc0 commit bed7215
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Expand Up @@ -16,6 +16,17 @@ class QgsProviderSublayerTask : QgsTask

A :py:class:`QgsTask` which retrieves sublayer details for a URI.

This task executes a call to :py:func:`QgsProviderRegistry.querySublayers()` in a background
thread. Depending on the URI queried it can be expensive to calculate the sublayers
(e.g. in the case where a full table scan is required to resolve mixed geometry
type layers), so it is beneficial to perform these queries in the background wherever
possible.

While :py:func:`QgsProviderRegistry.querySublayers()` offers various flags to control
how in-depth the querying will be, these flags are not exposed through :py:class:`QgsProviderSublayerTask`.
Rather :py:class:`QgsProviderSublayerTask` will always execute the most thorough query
possible, regardless of how expensive this may be.

.. versionadded:: 3.22
%End

Expand Down
11 changes: 11 additions & 0 deletions src/core/providers/qgsprovidersublayertask.h
Expand Up @@ -29,6 +29,17 @@ class QgsProviderSublayerDetails;
*
* \brief A QgsTask which retrieves sublayer details for a URI.
*
* This task executes a call to QgsProviderRegistry::querySublayers() in a background
* thread. Depending on the URI queried it can be expensive to calculate the sublayers
* (e.g. in the case where a full table scan is required to resolve mixed geometry
* type layers), so it is beneficial to perform these queries in the background wherever
* possible.
*
* While QgsProviderRegistry::querySublayers() offers various flags to control
* how in-depth the querying will be, these flags are not exposed through QgsProviderSublayerTask.
* Rather QgsProviderSublayerTask will always execute the most thorough query
* possible, regardless of how expensive this may be.
*
* \since QGIS 3.22
*/
class CORE_EXPORT QgsProviderSublayerTask : public QgsTask
Expand Down

0 comments on commit bed7215

Please sign in to comment.