Skip to content
Permalink
Browse files

Fix some clang warnings

  • Loading branch information
nyalldawson committed Nov 2, 2015
1 parent 4f75095 commit 556d87a86cc5c636c0b66638d577e404e1c61c72
@@ -30,6 +30,8 @@ class QgsArcProperter
*/
QgsArcProperter();

virtual ~QgsArcProperter();

/**
* QgsGraphDirector call this method for fetching attribute from source layer
* \return required attributes list
@@ -208,9 +208,9 @@ class QgsConditionalStyle

/** Reads vector conditional style specific state from layer Dom node.
*/
virtual bool readXml( const QDomNode& node );
bool readXml( const QDomNode& node );

/** Write vector conditional style specific state from layer Dom node.
*/
virtual bool writeXml( QDomNode & node, QDomDocument & doc ) const;
bool writeXml( QDomNode & node, QDomDocument & doc ) const;
};
@@ -69,6 +69,7 @@ class QgsPointLocator : QObject
//! Implement the interface and pass its instance to QgsPointLocator or QgsSnappingUtils methods.
struct MatchFilter
{
virtual ~MatchFilter();
virtual bool acceptMatch( const QgsPointLocator::Match& match ) = 0;
};

@@ -37,6 +37,8 @@ class ANALYSIS_EXPORT QgsArcProperter
*/
QgsArcProperter() {}

virtual ~QgsArcProperter() {}

/**
* QgsGraphDirector call this method for fetching attribute from source layer
* \return required attributes list
@@ -44,12 +44,6 @@

#include <cmath>

#define FONT_WORKAROUND_SCALE 10 //scale factor for upscaling fontsize and downscaling painter

#ifndef M_DEG2RAD
#define M_DEG2RAD 0.0174532925
#endif

QgsComposerItem::QgsComposerItem( QgsComposition* composition, bool manageZValue )
: QgsComposerObject( composition )
, QGraphicsRectItem( 0 )
@@ -1526,10 +1526,12 @@ GEOSGeometry* QgsGeos::createGeosPoint( const QgsAbstractGeometryV2* point, int
GEOSCoordSeq_setOrdinate_r( geosinit.ctxt, coordSeq, 0, 2, pt->z() );
}
}
if ( 0 /*pt->isMeasure()*/ ) //disabled until geos supports m-coordinates
#if 0 //disabled until geos supports m-coordinates
if (pt->isMeasure() )
{
GEOSCoordSeq_setOrdinate_r( geosinit.ctxt, coordSeq, 0, 3, pt->m() );
}
#endif
geosPoint = GEOSGeom_createPoint_r( geosinit.ctxt, coordSeq );
}
CATCH_GEOS( 0 )
@@ -222,11 +222,11 @@ class CORE_EXPORT QgsConditionalStyle

/** Reads vector conditional style specific state from layer Dom node.
*/
virtual bool readXml( const QDomNode& node );
bool readXml( const QDomNode& node );

/** Write vector conditional style specific state from layer Dom node.
*/
virtual bool writeXml( QDomNode & node, QDomDocument & doc ) const;
bool writeXml( QDomNode & node, QDomDocument & doc ) const;


private:
@@ -67,7 +67,7 @@ void QgsLabelSearchTree::labelsInRect( const QgsRectangle& r, QList<QgsLabelPosi
}
}

bool QgsLabelSearchTree::insertLabel( LabelPosition* labelPos, int featureId, const QString& layerName, const QString& labeltext, const QFont& labelfont, bool diagram, bool pinned )
bool QgsLabelSearchTree::insertLabel( pal::LabelPosition* labelPos, int featureId, const QString& layerName, const QString& labeltext, const QFont& labelfont, bool diagram, bool pinned )
{
if ( !labelPos )
{
@@ -27,8 +27,6 @@
#include <labelposition.h>
#include "qgsrectangle.h"

using namespace pal;

/** A class to query the labeling structure at a given point (small wraper around pal RTree class)*/
class CORE_EXPORT QgsLabelSearchTree
{
@@ -55,11 +53,11 @@ class CORE_EXPORT QgsLabelSearchTree
* @return true in case of success
* @note not available in python bindings
*/
bool insertLabel( LabelPosition* labelPos, int featureId, const QString& layerName, const QString& labeltext, const QFont& labelfont, bool diagram = false, bool pinned = false );
bool insertLabel( pal::LabelPosition* labelPos, int featureId, const QString& layerName, const QString& labeltext, const QFont& labelfont, bool diagram = false, bool pinned = false );

private:
// set as mutable because RTree template is not const-correct
mutable RTree<QgsLabelPosition*, double, 2, double> mSpatialIndex;
mutable pal::RTree<QgsLabelPosition*, double, 2, double> mSpatialIndex;
QList< QgsLabelPosition* > mOwnedPositions;
};

@@ -7,8 +7,6 @@

#include "qgslabelingenginev2.h"

using namespace pal;

/**
* Class that adds extra information to QgsLabelFeature for text labels
*
@@ -139,6 +139,7 @@ class CORE_EXPORT QgsPointLocator : public QObject
//! Implement the interface and pass its instance to QgsPointLocator or QgsSnappingUtils methods.
struct MatchFilter
{
virtual ~MatchFilter() {}
virtual bool acceptMatch( const Match& match ) = 0;
};

@@ -28,6 +28,7 @@

#include <QPicture>

using namespace pal;

Q_GUI_EXPORT extern int qt_defaultDpiX();
Q_GUI_EXPORT extern int qt_defaultDpiY();
@@ -307,7 +307,9 @@ void QgsFeatureRendererV2::renderFeatureWithSymbol( QgsFeature& feature, QgsSymb
}
segmentizedGeometry = new QgsGeometry( g );
deleteSegmentizedGeometry = true;
break;
}

default:
break;
}
@@ -1128,6 +1128,8 @@ bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld( QDomElement& element
if ( l )
layers.append( l );

break;

default:
break;
}
@@ -953,6 +953,7 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
removeRubberBand();
emit actionFinished();
}
break;
default:
break;
}

0 comments on commit 556d87a

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