Skip to content

Commit

Permalink
fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 4, 2015
1 parent e374f38 commit e3b9a98
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/core/qgsexpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ or they can be converted to numeric types.
Arithmetic operators do integer arithmetics if both operands are integer. That is
2+2 yields integer 4, but 2.0+2 returns real number 4.0. There are also two versions of
division and modulo operators: 1.0/2 returns 0.5 while 1/2 returns 0. */

Q_NOWARN_DEPRECATED_PUSH
class CORE_EXPORT QgsExpression
{
public:
Expand Down Expand Up @@ -460,6 +462,7 @@ class CORE_EXPORT QgsExpression
, mContextFnc( fcn )
, mAliases( aliases )
{}

Q_DECL_DEPRECATED virtual QVariant func( const QVariantList& values, const QgsFeature* f, QgsExpression* parent ) override;

/** Returns result of evaluating the function.
Expand Down Expand Up @@ -749,10 +752,10 @@ class CORE_EXPORT QgsExpression

virtual QStringList referencedColumns() const override { QStringList lst( mNode->referencedColumns() ); foreach ( Node* n, mList->list() ) lst.append( n->referencedColumns() ); return lst; }
virtual bool needsGeometry() const override { bool needs = false; foreach ( Node* n, mList->list() ) needs |= n->needsGeometry(); return needs; }
virtual void accept( Visitor& v ) const override { v.visit( *this ); }
virtual void accept( Visitor& v ) const override { v.visit( *this ); }

protected:
Node* mNode;
protected:
Node* mNode;
NodeList* mList;
bool mNotIn;
};
Expand Down Expand Up @@ -934,6 +937,7 @@ class CORE_EXPORT QgsExpression
private:
Q_DISABLE_COPY( QgsExpression ) // for now - until we have proper copy constructor / implicit sharing
};
Q_NOWARN_DEPRECATED_POP

Q_DECLARE_METATYPE( QgsExpression::Interval );
Q_DECLARE_METATYPE( QgsExpression::Node* );
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgscategorizedsymbolrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CORE_EXPORT QgsRendererCategoryV2

typedef QList<QgsRendererCategoryV2> QgsCategoryList;

Q_NOWARN_DEPRECATED_PUSH
class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendererV2
{
public:
Expand Down Expand Up @@ -220,6 +221,7 @@ class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendererV2

static QgsMarkerSymbolV2 sSkipRender;
};
Q_NOWARN_DEPRECATED_POP


#endif // QGSCATEGORIZEDSYMBOLRENDERERV2_H
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class CORE_EXPORT QgsRendererRangeV2LabelFormat
class QgsVectorLayer;
class QgsVectorColorRampV2;

Q_NOWARN_DEPRECATED_PUSH
class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
{
public:
Expand Down Expand Up @@ -358,5 +359,6 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
static const char * graduatedMethodStr( GraduatedMethod method );

};
Q_NOWARN_DEPRECATED_POP

#endif // QGSGRADUATEDSYMBOLRENDERERV2_H
1 change: 1 addition & 0 deletions src/core/symbology-ng/qgsrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class CORE_EXPORT QgsFeatureRendererV2
//! return rotation field name (or empty string if not set or not supported by renderer)
//! @deprecated use the symbol's methods instead
Q_DECL_DEPRECATED virtual QString rotationField() const { return QString(); }

//! sets rotation field of renderer (if supported by the renderer)
//! @deprecated use the symbol's methods instead
Q_DECL_DEPRECATED virtual void setRotationField( QString fieldName ) { Q_UNUSED( fieldName ); }
Expand Down
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgsrulebasedrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ QgsRuleBasedRendererV2::Rule::RenderResult QgsRuleBasedRendererV2::Rule::renderF
if ( mSymbol && mIsActive )
{
// add job to the queue: each symbol's zLevel must be added
Q_FOREACH ( int normZLevel, mSymbolNormZLevels )
Q_FOREACH( int normZLevel, mSymbolNormZLevels )
{
//QgsDebugMsg(QString("add job at level %1").arg(normZLevel));
renderQueue[normZLevel].jobs.append( new RenderJob( featToRender, mSymbol ) );
Expand All @@ -527,7 +527,7 @@ QgsRuleBasedRendererV2::Rule::RenderResult QgsRuleBasedRendererV2::Rule::renderF
bool willrendersomething = false;

// process children
Q_FOREACH ( Rule* rule, mChildren )
Q_FOREACH( Rule* rule, mChildren )
{
// Don't process else rules yet
if ( !rule->isElse() )
Expand All @@ -543,7 +543,7 @@ QgsRuleBasedRendererV2::Rule::RenderResult QgsRuleBasedRendererV2::Rule::renderF
{
foreach ( Rule* rule, mElseRules )
{
rendered |= rule->renderFeature( featToRender, context, renderQueue );
rendered |= rule->renderFeature( featToRender, context, renderQueue ) != Filtered;
}
}
if ( !mIsActive )
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgssinglesymbolrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qgsexpression.h"
#include <QScopedPointer>

Q_NOWARN_DEPRECATED_PUSH
class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
{
public:
Expand Down Expand Up @@ -95,6 +96,7 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
QScopedPointer<QgsSymbolV2> mTempSymbol;
double mOrigSize;
};
Q_NOWARN_DEPRECATED_POP


#endif // QGSSINGLESYMBOLRENDERERV2_H
2 changes: 2 additions & 0 deletions src/gui/qgsmapcanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class GUI_EXPORT QgsMapCanvasLayer
* Map canvas is a class for displaying all GIS data types on a canvas.
*/

Q_NOWARN_DEPRECATED_PUSH
class GUI_EXPORT QgsMapCanvas : public QGraphicsView
{
Q_OBJECT
Expand Down Expand Up @@ -698,6 +699,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
QgsSnappingUtils* mSnappingUtils;

}; // class QgsMapCanvas
Q_NOWARN_DEPRECATED_POP



Expand Down

0 comments on commit e3b9a98

Please sign in to comment.