From 940991e7460cda89eb98949d7156656fc4c528f9 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Wed, 18 Dec 2013 00:46:57 +0100 Subject: [PATCH] fix warnings --- src/core/qgsgeometrysimplifier.cpp | 4 ++++ src/core/qgsgeometrysimplifier.h | 2 ++ src/core/qgsmaptopixelgeometrysimplifier.cpp | 1 + src/core/qgsvectorlayer.cpp | 5 ++--- src/core/qgsvectorlayer.h | 2 +- src/core/qgsvectorlayerfeatureiterator.cpp | 1 + src/gui/qgsnewhttpconnection.cpp | 2 ++ src/providers/ogr/qgsogrfeatureiterator.cpp | 2 ++ 8 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/core/qgsgeometrysimplifier.cpp b/src/core/qgsgeometrysimplifier.cpp index 82541509ac3f..a45cdfac0b0f 100644 --- a/src/core/qgsgeometrysimplifier.cpp +++ b/src/core/qgsgeometrysimplifier.cpp @@ -17,6 +17,10 @@ #include #include "qgsgeometrysimplifier.h" +QgsAbstractGeometrySimplifier::~QgsAbstractGeometrySimplifier() +{ +} + //! Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance bool QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( const QgsRectangle& envelope, float mapToPixelTol ) { diff --git a/src/core/qgsgeometrysimplifier.h b/src/core/qgsgeometrysimplifier.h index 16ade0832859..9713cf2cb198 100644 --- a/src/core/qgsgeometrysimplifier.h +++ b/src/core/qgsgeometrysimplifier.h @@ -25,6 +25,8 @@ class CORE_EXPORT QgsAbstractGeometrySimplifier { public: + virtual ~QgsAbstractGeometrySimplifier(); + //! Returns a simplified version the specified geometry virtual QgsGeometry* simplify( QgsGeometry* geometry ) = 0; //! Simplifies the specified geometry diff --git a/src/core/qgsmaptopixelgeometrysimplifier.cpp b/src/core/qgsmaptopixelgeometrysimplifier.cpp index 4332c2715523..1eb1726424fb 100644 --- a/src/core/qgsmaptopixelgeometrysimplifier.cpp +++ b/src/core/qgsmaptopixelgeometrysimplifier.cpp @@ -98,6 +98,7 @@ inline static QgsRectangle calculateBoundingBox( QGis::WkbType wkbType, unsigned //! Generalize the WKB-geometry using the BBOX of the original geometry inline static bool generalizeWkbGeometry( QGis::WkbType wkbType, unsigned char* sourceWkb, size_t sourceWkbSize, unsigned char* targetWkb, size_t& targetWkbSize, const QgsRectangle& envelope, bool writeHeader ) { + Q_UNUSED( sourceWkb ); unsigned char* wkb2 = targetWkb; unsigned int geometryType = QGis::singleType( QGis::flatType( wkbType ) ); diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index ffeb28edd7af..e24c817a8ce7 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -111,7 +111,6 @@ typedef QString getStyleById_t( QString& errCause ); - QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey, @@ -122,6 +121,8 @@ QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath, , mProviderKey( providerKey ) , mReadOnly( false ) , mRendererV2( NULL ) + , mSimplifyDrawingTol( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ) + , mSimplifyDrawingHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorLayer::FullSimplification : QgsVectorLayer::DefaultSimplification ) , mLabel( 0 ) , mLabelOn( false ) , mLabelFontNotFoundNotified( false ) @@ -137,8 +138,6 @@ QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath, , mValidExtent( false ) , mSymbolFeatureCounted( false ) , mCurrentRendererContext( 0 ) - , mSimplifyDrawingHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorLayer::FullSimplification : QgsVectorLayer::DefaultSimplification ) - , mSimplifyDrawingTol( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ) { mActions = new QgsAttributeAction( this ); diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 08df8f001513..872250ef2898 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -1736,7 +1736,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer // Feature counts for each renderer symbol QMap mSymbolFeatureCountMap; - QgsRenderContext* mCurrentRendererContext; + QgsRenderContext *mCurrentRendererContext; friend class QgsVectorLayerFeatureIterator; }; diff --git a/src/core/qgsvectorlayerfeatureiterator.cpp b/src/core/qgsvectorlayerfeatureiterator.cpp index a5fa8ae39ac2..9f5a64f75c38 100644 --- a/src/core/qgsvectorlayerfeatureiterator.cpp +++ b/src/core/qgsvectorlayerfeatureiterator.cpp @@ -612,6 +612,7 @@ QgsSimplifiedVectorLayerFeatureIterator::QgsSimplifiedVectorLayerFeatureIterator { mSupportsPresimplify = layer->dataProvider()->capabilities() & QgsVectorDataProvider::SimplifyGeometries; } + QgsSimplifiedVectorLayerFeatureIterator::~QgsSimplifiedVectorLayerFeatureIterator() { if ( mSimplifier ) diff --git a/src/gui/qgsnewhttpconnection.cpp b/src/gui/qgsnewhttpconnection.cpp index f59fd65f71de..c3c8a414250b 100644 --- a/src/gui/qgsnewhttpconnection.cpp +++ b/src/gui/qgsnewhttpconnection.cpp @@ -141,11 +141,13 @@ QgsNewHttpConnection::~QgsNewHttpConnection() void QgsNewHttpConnection::on_txtName_textChanged( const QString &text ) { + Q_UNUSED( text ); buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() ); } void QgsNewHttpConnection::on_txtUrl_textChanged( const QString &text ) { + Q_UNUSED( text ); buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() ); } diff --git a/src/providers/ogr/qgsogrfeatureiterator.cpp b/src/providers/ogr/qgsogrfeatureiterator.cpp index 2026b8e80bb8..8e034e5c5cee 100644 --- a/src/providers/ogr/qgsogrfeatureiterator.cpp +++ b/src/providers/ogr/qgsogrfeatureiterator.cpp @@ -280,6 +280,8 @@ bool QgsOgrFeatureIterator::readFeature( OGRFeatureH fet, QgsFeature& feature ) //! Notified a new OGRFeatureH fecthed from data provider void QgsOgrFeatureIterator::fetchedFeature( OGRFeatureH feature, OGRGeometryH geometry ) { + Q_UNUSED( feature ); + Q_UNUSED( geometry ); } /***************************************************************************