Fix some clang warnings

This commit is contained in:
Nyall Dawson 2015-11-02 18:07:16 +11:00
parent 4f7509530a
commit 556d87a86c
15 changed files with 22 additions and 18 deletions

View File

@ -30,6 +30,8 @@ class QgsArcProperter
*/
QgsArcProperter();
virtual ~QgsArcProperter();
/**
* QgsGraphDirector call this method for fetching attribute from source layer
* \return required attributes list

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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

View File

@ -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 )

View File

@ -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 )

View File

@ -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:

View File

@ -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 )
{

View File

@ -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;
};

View File

@ -7,8 +7,6 @@
#include "qgslabelingenginev2.h"
using namespace pal;
/**
* Class that adds extra information to QgsLabelFeature for text labels
*

View File

@ -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;
};

View File

@ -28,6 +28,7 @@
#include <QPicture>
using namespace pal;
Q_GUI_EXPORT extern int qt_defaultDpiX();
Q_GUI_EXPORT extern int qt_defaultDpiY();

View File

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

View File

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

View File

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