Skip to content

Commit 9cc9d42

Browse files
committedDec 7, 2015
Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note then it MUST have both the Q_DECL_DEPRECATD and @deprecated note. It's important that both are used, as Q_DECL_DEPRECATED allows throwing a warning if that method is used in code, while the @deprecated doxygen note gives an indication to devs/PyQGIS users of why it's deprecated and what should be used instead. Ideally we'd also test for SIP /Deprecated/ tags, but I can't find any reliable way to do this.
1 parent de1001b commit 9cc9d42

File tree

66 files changed

+275
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+275
-85
lines changed
 

‎python/core/composer/qgsatlascomposition.sip

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,14 @@ public:
254254
*/
255255
void setMargin( float margin ) /Deprecated/;
256256

257+
//! @deprecated use sortKeyAttributeName instead
257258
int sortKeyAttributeIndex() const /Deprecated/;
259+
//! @deprecated use setSortKeyAttributeName instead
258260
void setSortKeyAttributeIndex( int idx ) /Deprecated/;
259261

260-
/** Returns the current atlas feature. Must be called after prepareForFeature(). */
262+
/** Returns the current atlas feature. Must be called after prepareForFeature( i ).
263+
* @deprecated use feature() instead
264+
*/
261265
QgsFeature* currentFeature() /Deprecated/;
262266

263267
/** Returns the current atlas geometry in the given projection system (default to the coverage layer's CRS) */

‎python/core/composer/qgscomposeritem.sip

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,9 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
688688
*/
689689
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const /Deprecated/;
690690

691-
/** Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
691+
/** Returns angle of the line from p1 to p2 (clockwise, starting at N)
692+
* @deprecated will be removed in QGIS 3.0
693+
*/
692694
double angle( const QPointF& p1, const QPointF& p2 ) const /Deprecated/;
693695

694696
/** Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the

0 commit comments

Comments
 (0)
Please sign in to comment.