Skip to content

Commit

Permalink
Add dataComment to data provider base class
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Apr 6, 2020
1 parent cd32d11 commit 59b0dc1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/core/auto_generated/qgsdataprovider.sip.in
Expand Up @@ -102,6 +102,18 @@ connection string
only when needed within a provider
%End

virtual QString dataComment() const;
%Docstring
Returns a short comment for the data that this provider is
providing access to (e.g. the comment for postgres table).

.. note::

The default implementation returns an empty string.

.. versionadded:: 3.14
%End

void setUri( const QgsDataSourceUri &uri );
%Docstring
Set the data source specification.
Expand Down
10 changes: 10 additions & 0 deletions src/core/qgsdataprovider.h
Expand Up @@ -152,6 +152,16 @@ class CORE_EXPORT QgsDataProvider : public QObject
}
}

/**
* Returns a short comment for the data that this provider is
* providing access to (e.g. the comment for postgres table).
*
* \note The default implementation returns an empty string.
* \since QGIS 3.14
*/
virtual QString dataComment() const { return QString(); };


/**
* Set the data source specification.
*
Expand Down

0 comments on commit 59b0dc1

Please sign in to comment.