Skip to content

Commit 6af2d30

Browse files
committed
Update QgsProviderRegistry docs
1 parent 2b3c551 commit 6af2d30

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

src/core/qgsproviderregistry.h

+28-13
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ class QgsCoordinateReferenceSystem;
3636

3737
/** \ingroup core
3838
* A registry / canonical manager of data providers.
39-
40-
This is a Singleton class that manages data provider access.
41-
42-
Loaded providers may be restricted using QGIS_PROVIDER_FILE environment variable.
43-
QGIS_PROVIDER_FILE is regexp pattern applied to provider file name (not provider key).
44-
For example, if the variable is set to gdal|ogr|postgres it will load only providers gdal,
45-
ogr and postgres.
39+
*
40+
* This is a Singleton class that manages data provider access.
41+
*
42+
* Providers can be either loaded via libraries or native providers that
43+
* are included in the core QGIS installation and accessed through function pointers.
44+
*
45+
* Loaded providers may be restricted using QGIS_PROVIDER_FILE environment variable.
46+
* QGIS_PROVIDER_FILE is regexp pattern applied to provider file name (not provider key).
47+
* For example, if the variable is set to gdal|ogr|postgres it will load only providers gdal,
48+
* ogr and postgres.
4649
*/
4750
class CORE_EXPORT QgsProviderRegistry
4851
{
@@ -54,13 +57,20 @@ class CORE_EXPORT QgsProviderRegistry
5457

5558
virtual ~QgsProviderRegistry();
5659

57-
//! Return path for the library of the provider
60+
/**
61+
* Return path for the library of the provider.
62+
*
63+
* If the provider uses direct provider function pointers instead of a library an empty string will
64+
* be returned.
65+
*/
5866
QString library( const QString &providerKey ) const;
5967

6068
//! Return list of provider plugins found
6169
QString pluginList( bool asHtml = false ) const;
6270

63-
//! Return library directory where plugins are found
71+
/**
72+
* Returns the library directory where plugins are found.
73+
*/
6474
QDir libraryDirectory() const;
6575

6676
//! Set library directory where to search for plugins
@@ -85,17 +95,22 @@ class CORE_EXPORT QgsProviderRegistry
8595
QWidget *selectWidget( const QString &providerKey,
8696
QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
8797

88-
/** Get pointer to provider function
89-
\param providerKey identificator of the provider
90-
\param functionName name of function
91-
\returns pointer to function or NULL on error
98+
/**
99+
* Get pointer to provider function
100+
* \param providerKey identificator of the provider
101+
* \param functionName name of function
102+
* \returns pointer to function or NULL on error. If the provider uses direct provider
103+
* function pointers instead of a library nullptr will be returned.
92104
*/
93105
QFunctionPointer function( const QString &providerKey,
94106
const QString &functionName );
95107

96108
/**
97109
* Returns a new QLibrary for the specified \a providerKey. Ownership of the returned
98110
* object is transferred to the caller and the caller is responsible for deleting it.
111+
*
112+
* If the provider uses direct provider function pointers instead of a library nullptr will
113+
* be returned.
99114
*/
100115
QLibrary *providerLibrary( const QString &providerKey ) const;
101116

0 commit comments

Comments
 (0)