Skip to content

Commit 8319dac

Browse files
committed
Remove some doxygen comments from overridden methods (pt 1)
It's nearly always better to let doxygen use the base class documentation (unless the subclass docs explicitly add something of value for that subclass). The overriden docs are usually out of date and the duplication makes documentation maintenance harder.
1 parent 14e2b98 commit 8319dac

24 files changed

+2
-882
lines changed

src/providers/db2/qgsdb2featureiterator.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,13 @@ class QgsDb2FeatureIterator : public QgsAbstractFeatureIteratorFromSource<QgsDb2
6666

6767
~QgsDb2FeatureIterator();
6868

69-
//! reset the iterator to the starting position
7069
virtual bool rewind() override;
71-
72-
//! end of iterating: free the resources / lock
7370
virtual bool close() override;
7471

7572
protected:
7673
void BuildStatement( const QgsFeatureRequest& request );
7774

78-
//! fetch next feature, return true on success
7975
virtual bool fetchFeature( QgsFeature& feature ) override;
80-
81-
//! fetch next feature filter expression
8276
bool nextFeatureFilterExpression( QgsFeature& f ) override;
8377

8478
private:

src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,14 @@ class QgsDelimitedTextFeatureIterator : public QgsAbstractFeatureIteratorFromSou
6868

6969
~QgsDelimitedTextFeatureIterator();
7070

71-
//! reset the iterator to the starting position
7271
virtual bool rewind() override;
73-
74-
//! end of iterating: free the resources / lock
7572
virtual bool close() override;
7673

7774
// Tests whether the geometry is required, given that testGeometry is true.
7875
bool wantGeometry( const QgsPoint & point ) const;
7976
bool wantGeometry( const QgsGeometry& geom ) const;
8077

8178
protected:
82-
//! fetch next feature, return true on success
8379
virtual bool fetchFeature( QgsFeature& feature ) override;
8480

8581
bool setNextFeatureId( qint64 fid );

src/providers/gdal/qgsgdalprovider.h

Lines changed: 1 addition & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -76,114 +76,35 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
7676

7777
QgsGdalProvider * clone() const override;
7878

79-
/** \brief Renders the layer as an image
80-
*/
8179
QImage* draw( QgsRectangle const & viewExtent, int pixelWidth, int pixelHeight ) override;
82-
83-
/** Return a provider name
84-
*
85-
* Essentially just returns the provider key. Should be used to build file
86-
* dialogs so that providers can be shown with their supported types. Thus
87-
* if more than one provider supports a given format, the user is able to
88-
* select a specific provider to open that file.
89-
*
90-
* @note
91-
*
92-
* Instead of being pure virtual, might be better to generalize this
93-
* behavior and presume that none of the sub-classes are going to do
94-
* anything strange with regards to their name or description?
95-
*
96-
*/
9780
QString name() const override;
98-
99-
100-
/** Return description
101-
*
102-
* Return a terse string describing what the provider is.
103-
*
104-
* @note
105-
*
106-
* Instead of being pure virtual, might be better to generalize this
107-
* behavior and presume that none of the sub-classes are going to do
108-
* anything strange with regards to their name or description?
109-
*
110-
*/
11181
QString description() const override;
112-
11382
virtual QgsCoordinateReferenceSystem crs() const override;
114-
11583
virtual QgsRectangle extent() const override;
116-
11784
bool isValid() const override;
118-
11985
QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override;
120-
121-
/**
122-
* \brief Returns the caption error text for the last error in this provider
123-
*
124-
* If an operation returns 0 (e.g. draw()), this function
125-
* returns the text of the error associated with the failure.
126-
* Interactive users of this provider can then, for example,
127-
* call a QMessageBox to display the contents.
128-
*/
12986
QString lastErrorTitle() override;
130-
131-
/**
132-
* \brief Returns the verbose error text for the last error in this provider
133-
*
134-
* If an operation returns 0 (e.g. draw()), this function
135-
* returns the text of the error associated with the failure.
136-
* Interactive users of this provider can then, for example,
137-
* call a QMessageBox to display the contents.
138-
*/
139-
14087
QString lastError() override;
141-
142-
/** Returns a bitmask containing the supported capabilities
143-
Note, some capabilities may change depending on which
144-
sublayers are visible on this provider, so it may
145-
be prudent to check this value per intended operation.
146-
*/
14788
int capabilities() const override;
148-
14989
Qgis::DataType dataType( int bandNo ) const override;
15090
Qgis::DataType sourceDataType( int bandNo ) const override;
151-
15291
int bandCount() const override;
153-
15492
int colorInterpretation( int bandNo ) const override;
155-
15693
int xBlockSize() const override;
15794
int yBlockSize() const override;
158-
15995
int xSize() const override;
16096
int ySize() const override;
161-
16297
QString generateBandName( int theBandNumber ) const override;
16398

164-
//! Reimplemented from QgsRasterDataProvider to bypass second resampling (more efficient for local file based sources)
99+
// Reimplemented from QgsRasterDataProvider to bypass second resampling (more efficient for local file based sources)
165100
QgsRasterBlock *block( int theBandNo, const QgsRectangle &theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback = nullptr ) override;
166101

167102
void readBlock( int bandNo, int xBlock, int yBlock, void *data ) override;
168103
void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override;
169-
170-
/** Read band scale for raster value
171-
* @@note added in 2.3 */
172104
double bandScale( int bandNo ) const override;
173-
174-
/** Read band offset for raster value
175-
* @@note added in 2.3 */
176105
double bandOffset( int bandNo ) const override;
177-
178106
QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo )const override;
179-
180-
/**
181-
* Get metadata in a format suitable for feeding directly
182-
* into a subset of the GUI raster properties "Metadata" tab.
183-
*/
184107
QString metadata() override;
185-
186-
//! \brief Returns the sublayers of this layer - Useful for providers that manage their own layers, such as WMS
187108
QStringList subLayers() const override;
188109
static QStringList subLayers( GDALDatasetH dataset );
189110

@@ -228,12 +149,8 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
228149

229150
static QMap<QString, QString> supportedMimes();
230151

231-
//! Writes into the provider datasource
232152
bool write( void* data, int band, int width, int height, int xOffset, int yOffset ) override;
233-
234153
bool setNoDataValue( int bandNo, double noDataValue ) override;
235-
236-
//! Remove dataset
237154
bool remove() override;
238155

239156
QString validateCreationOptions( const QStringList& createOptions, const QString& format ) override;

src/providers/gpx/qgsgpxfeatureiterator.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,11 @@ class QgsGPXFeatureIterator : public QgsAbstractFeatureIteratorFromSource<QgsGPX
4949

5050
~QgsGPXFeatureIterator();
5151

52-
//! reset the iterator to the starting position
5352
virtual bool rewind() override;
54-
55-
//! end of iterating: free the resources / lock
5653
virtual bool close() override;
5754

5855
protected:
5956

60-
//! fetch next feature, return true on success
6157
virtual bool fetchFeature( QgsFeature& feature ) override;
6258

6359
bool readFid( QgsFeature& feature );

src/providers/gpx/qgsgpxprovider.h

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -49,64 +49,24 @@ class QgsGPXProvider : public QgsVectorDataProvider
4949
/* Functions inherited from QgsVectorDataProvider */
5050

5151
virtual QgsAbstractFeatureSource* featureSource() const override;
52-
53-
/**
54-
* Returns the permanent storage type for this layer as a friendly name.
55-
*/
5652
virtual QString storageType() const override;
57-
5853
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& request ) const override;
59-
60-
/**
61-
* Get feature type.
62-
* @return int representing the feature type
63-
*/
6454
virtual QgsWkbTypes::Type wkbType() const override;
65-
66-
/**
67-
* Number of features in the layer
68-
* @return long containing number of features
69-
*/
7055
virtual long featureCount() const override;
71-
7256
virtual QgsFields fields() const override;
73-
74-
/**
75-
* Adds a list of features
76-
* @return true in case of success and false in case of failure
77-
*/
7857
virtual bool addFeatures( QgsFeatureList & flist ) override;
79-
80-
/**
81-
* Deletes a feature
82-
* @param id list containing feature ids to delete
83-
* @return true in case of success and false in case of failure
84-
*/
8558
virtual bool deleteFeatures( const QgsFeatureIds & id ) override;
86-
87-
/**
88-
* Changes attribute values of existing features.
89-
* @param attr_map a map containing changed attributes
90-
* @return true in case of success and false in case of failure
91-
*/
9259
virtual bool changeAttributeValues( const QgsChangedAttributesMap & attr_map ) override;
93-
9460
virtual QgsVectorDataProvider::Capabilities capabilities() const override;
95-
9661
virtual QVariant defaultValue( int fieldId ) const override;
9762

9863

9964
/* Functions inherited from QgsDataProvider */
10065

10166
virtual QgsRectangle extent() const override;
10267
virtual bool isValid() const override;
103-
104-
//! Return a provider name
10568
virtual QString name() const override;
106-
107-
//! Return description
10869
virtual QString description() const override;
109-
11070
virtual QgsCoordinateReferenceSystem crs() const override;
11171

11272

src/providers/grass/qgsgrassfeatureiterator.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,8 @@ class GRASS_LIB_EXPORT QgsGrassFeatureIterator : public QObject, public QgsAbstr
7575

7676
~QgsGrassFeatureIterator();
7777

78-
//! fetch next feature, return true on success
7978
virtual bool fetchFeature( QgsFeature& feature ) override;
80-
81-
//! reset the iterator to the starting position
8279
virtual bool rewind() override;
83-
84-
//! end of iterating: free the resources / lock
8580
virtual bool close() override;
8681

8782
// create QgsFeatureId from GRASS geometry object id, cat and layer number (editing)

src/providers/grass/qgsgrassprovider.h

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,12 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider
6464
virtual ~QgsGrassProvider();
6565

6666
virtual QgsVectorDataProvider::Capabilities capabilities() const override;
67-
6867
virtual QgsAbstractFeatureSource* featureSource() const override;
69-
70-
/**
71-
* Returns the permanent storage type for this layer as a friendly name.
72-
*/
7368
virtual QString storageType() const override;
74-
7569
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& request ) const override;
76-
77-
/**
78-
* Get the feature type as defined in WkbType (qgis.h).
79-
* @return int representing the feature type
80-
*/
8170
QgsWkbTypes::Type wkbType() const override;
82-
83-
84-
/**
85-
* Get the number of features in the layer
86-
*/
8771
long featureCount() const override;
88-
8972
virtual QgsRectangle extent() const override;
90-
9173
QgsFields fields() const override;
9274

9375
// ! Key (category) field index
@@ -98,7 +80,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider
9880

9981
QVariant minimumValue( int index ) const override;
10082

101-
/** Returns the maximum value of an attributs
83+
/** Returns the maximum value of an attribute
10284
* @param index the index of the attribute */
10385
QVariant maxValue( int index );
10486

@@ -347,10 +329,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider
347329
*/
348330
static int grassLayerType( const QString & );
349331

350-
//! Return a provider name
351332
QString name() const override;
352-
353-
//! Return description
354333
QString description() const override;
355334

356335
// Layer type (layerType)

src/providers/memory/qgsmemoryfeatureiterator.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,11 @@ class QgsMemoryFeatureIterator : public QgsAbstractFeatureIteratorFromSource<Qgs
5353

5454
~QgsMemoryFeatureIterator();
5555

56-
//! reset the iterator to the starting position
5756
virtual bool rewind() override;
58-
59-
//! end of iterating: free the resources / lock
6057
virtual bool close() override;
6158

6259
protected:
6360

64-
//! fetch next feature, return true on success
6561
virtual bool fetchFeature( QgsFeature& feature ) override;
6662

6763
bool nextFeatureUsingList( QgsFeature& feature );

0 commit comments

Comments
 (0)