mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Rename cancel() to cancelReload() and update doc accordingly
This commit is contained in:
parent
1a5e03f667
commit
e531052b28
@ -232,13 +232,15 @@ Providers with the FastTruncate capability will use an optimised method to trunc
|
||||
.. seealso:: :py:func:`deleteFeatures`
|
||||
%End
|
||||
|
||||
virtual bool cancel();
|
||||
virtual bool cancelReload();
|
||||
%Docstring
|
||||
Cancels the pending query.
|
||||
Cancels the current reloading of data.
|
||||
|
||||
:return: true if the pending query has been interrupted, false otherwise
|
||||
:return: true if the reloading has been correctly interrupted, false otherwise
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
.. seealso:: :py:func:`reloadData`
|
||||
%End
|
||||
|
||||
virtual bool addAttributes( const QList<QgsField> &attributes );
|
||||
|
@ -804,7 +804,7 @@ QTextCodec *QgsVectorDataProvider::textEncoding() const
|
||||
return mEncoding;
|
||||
}
|
||||
|
||||
bool QgsVectorDataProvider::cancel()
|
||||
bool QgsVectorDataProvider::cancelReload()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -250,11 +250,12 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider, public QgsFeat
|
||||
virtual bool truncate();
|
||||
|
||||
/**
|
||||
* Cancels the pending query.
|
||||
* \returns true if the pending query has been interrupted, false otherwise
|
||||
* Cancels the current reloading of data.
|
||||
* \returns true if the reloading has been correctly interrupted, false otherwise
|
||||
* \since QGIS 3.2
|
||||
* \see reloadData()
|
||||
*/
|
||||
virtual bool cancel();
|
||||
virtual bool cancelReload();
|
||||
|
||||
/**
|
||||
* Adds new \a attributes to the provider. Returns true in case of success and false in case of failure.
|
||||
|
@ -59,6 +59,6 @@ QgsVectorLayer *QgsVirtualLayerTask::takeLayer()
|
||||
|
||||
void QgsVirtualLayerTask::cancel()
|
||||
{
|
||||
mLayer->dataProvider()->cancel();
|
||||
mLayer->dataProvider()->cancelReload();
|
||||
QgsTask::cancel();
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ bool QgsVirtualLayerProvider::createIt()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QgsVirtualLayerProvider::cancel()
|
||||
bool QgsVirtualLayerProvider::cancelReload()
|
||||
{
|
||||
return mSqlite.interrupt();
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class QgsVirtualLayerProvider: public QgsVectorDataProvider
|
||||
QString description() const override;
|
||||
QgsAttributeList pkAttributeIndexes() const override;
|
||||
QSet<QgsMapLayerDependency> dependencies() const override;
|
||||
bool cancel() override;
|
||||
bool cancelReload() override;
|
||||
void reloadData() override;
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user