Skip to content
Permalink
Browse files

fix deprecation warnings

  • Loading branch information
jef-n committed Sep 4, 2015
1 parent e374f38 commit e3b9a98c7b2c6574935c2968add6cf9d7c097690
@@ -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:
@@ -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.
@@ -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;
};
@@ -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* );
@@ -67,6 +67,7 @@ class CORE_EXPORT QgsRendererCategoryV2

typedef QList<QgsRendererCategoryV2> QgsCategoryList;

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

static QgsMarkerSymbolV2 sSkipRender;
};
Q_NOWARN_DEPRECATED_POP


#endif // QGSCATEGORIZEDSYMBOLRENDERERV2_H
@@ -110,6 +110,7 @@ class CORE_EXPORT QgsRendererRangeV2LabelFormat
class QgsVectorLayer;
class QgsVectorColorRampV2;

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

};
Q_NOWARN_DEPRECATED_POP

#endif // QGSGRADUATEDSYMBOLRENDERERV2_H
@@ -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 ); }
@@ -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 ) );
@@ -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() )
@@ -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 )
@@ -21,6 +21,7 @@
#include "qgsexpression.h"
#include <QScopedPointer>

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


#endif // QGSSINGLESYMBOLRENDERERV2_H
@@ -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
@@ -698,6 +699,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
QgsSnappingUtils* mSnappingUtils;

}; // class QgsMapCanvas
Q_NOWARN_DEPRECATED_POP



0 comments on commit e3b9a98

Please sign in to comment.
You can’t perform that action at this time.