Skip to content

Commit

Permalink
Fix some clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 2, 2015
1 parent 4f75095 commit 556d87a
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 18 deletions.
2 changes: 2 additions & 0 deletions python/analysis/network/qgsarcproperter.sip
Expand Up @@ -30,6 +30,8 @@ class QgsArcProperter
*/
QgsArcProperter();

virtual ~QgsArcProperter();

/**
* QgsGraphDirector call this method for fetching attribute from source layer
* \return required attributes list
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsconditionalstyle.sip
Expand Up @@ -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;
};
1 change: 1 addition & 0 deletions python/core/qgspointlocator.sip
Expand Up @@ -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;
};

Expand Down
2 changes: 2 additions & 0 deletions src/analysis/network/qgsarcproperter.h
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/core/composer/qgscomposeritem.cpp
Expand Up @@ -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 )
Expand Down
4 changes: 3 additions & 1 deletion src/core/geometry/qgsgeos.cpp
Expand Up @@ -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 )
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsconditionalstyle.h
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelsearchtree.cpp
Expand Up @@ -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 )
{
Expand Down
6 changes: 2 additions & 4 deletions src/core/qgslabelsearchtree.h
Expand Up @@ -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
{
Expand All @@ -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;
};

Expand Down
2 changes: 0 additions & 2 deletions src/core/qgspalgeometry.h
Expand Up @@ -7,8 +7,6 @@

#include "qgslabelingenginev2.h"

using namespace pal;

/**
* Class that adds extra information to QgsLabelFeature for text labels
*
Expand Down
1 change: 1 addition & 0 deletions src/core/qgspointlocator.h
Expand Up @@ -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;
};

Expand Down
1 change: 1 addition & 0 deletions src/core/qgsvectorlayerlabelprovider.cpp
Expand Up @@ -28,6 +28,7 @@

#include <QPicture>

using namespace pal;

Q_GUI_EXPORT extern int qt_defaultDpiX();
Q_GUI_EXPORT extern int qt_defaultDpiY();
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgsrendererv2.cpp
Expand Up @@ -307,7 +307,9 @@ void QgsFeatureRendererV2::renderFeatureWithSymbol( QgsFeature& feature, QgsSymb
}
segmentizedGeometry = new QgsGeometry( g );
deleteSegmentizedGeometry = true;
break;
}

default:
break;
}
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology-ng/qgssymbollayerv2utils.cpp
Expand Up @@ -1128,6 +1128,8 @@ bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld( QDomElement& element
if ( l )
layers.append( l );

break;

default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgscomposerview.cpp
Expand Up @@ -953,6 +953,7 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
removeRubberBand();
emit actionFinished();
}
break;
default:
break;
}
Expand Down

0 comments on commit 556d87a

Please sign in to comment.