Improve docs

This commit is contained in:
Nyall Dawson 2017-03-20 12:26:22 +10:00
parent 0ed1414885
commit 4b041d6f9e

View File

@ -260,14 +260,16 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
virtual bool truncate(); virtual bool truncate();
/** /**
* Adds new attributes * Adds new \a attributes to the provider. Returns true in case of success and false in case of failure.
* @param attributes list of new attributes * If attributes are added using this method then QgsVectorLayer::updateFields() must be called
* @return true in case of success and false in case of failure * manually to ensure that the layer's field are correctly reported.
*/ */
virtual bool addAttributes( const QList<QgsField> &attributes ); virtual bool addAttributes( const QList<QgsField> &attributes );
/** /**
* Deletes existing attributes * Deletes existing \a attributes from the provider.
* If attributes are deleted using this method then QgsVectorLayer::updateFields() must be called
* manually to ensure that the layer's field are correctly reported.
* @param attributes a set containing indices of attributes * @param attributes a set containing indices of attributes
* @return true in case of success and false in case of failure * @return true in case of success and false in case of failure
*/ */
@ -275,6 +277,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
/** /**
* Renames existing attributes. * Renames existing attributes.
* If attributes are renamed using this method then QgsVectorLayer::updateFields() must be called
* manually to ensure that the layer's field are correctly reported.
* @param renamedAttributes map of attribute index to new attribute name * @param renamedAttributes map of attribute index to new attribute name
* @return true in case of success and false in case of failure * @return true in case of success and false in case of failure
* @note added in QGIS 2.16 * @note added in QGIS 2.16