diff --git a/python/core/qgis.sip b/python/core/qgis.sip index 9a8a532af2a..c21b7de8602 100644 --- a/python/core/qgis.sip +++ b/python/core/qgis.sip @@ -66,6 +66,12 @@ class QGis static bool isMultiType( WkbType type ); static int wkbDimensions( WkbType type ); + //! Converts from old (pre 2.10) WKB type to new WKB type + static QgsWKBTypes::Type fromOldWkbType(QGis::WkbType type); + + //! Converts from new (post 2.10) WKB type to old WKB type + static QGis::WkbType fromNewWkbType( QgsWKBTypes::Type type ); + enum GeometryType { Point, diff --git a/src/core/qgis.cpp b/src/core/qgis.cpp index 8241be1fa42..9ec2f471e76 100644 --- a/src/core/qgis.cpp +++ b/src/core/qgis.cpp @@ -100,7 +100,7 @@ const char* QGis::qgisUnitTypes[] = QT_TRANSLATE_NOOP( "QGis::UnitType", "nautical miles" ) }; -static QgsWKBTypes::Type fromOldWkbType( QGis::WkbType type ) +QgsWKBTypes::Type QGis::fromOldWkbType( QGis::WkbType type ) { switch ( type ) { @@ -125,7 +125,7 @@ static QgsWKBTypes::Type fromOldWkbType( QGis::WkbType type ) return ( QgsWKBTypes::Type ) type; } -static QGis::WkbType fromNewWkbType( QgsWKBTypes::Type type ) +QGis::WkbType QGis::fromNewWkbType( QgsWKBTypes::Type type ) { switch ( type ) { diff --git a/src/core/qgis.h b/src/core/qgis.h index 443f1767395..13d61e9169f 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -27,6 +27,7 @@ #include #include #include +#include "geometry/qgswkbtypes.h" /** \ingroup core * The QGis class provides global constants for use throughout the application. @@ -93,6 +94,12 @@ class CORE_EXPORT QGis // @deprecated use QgsWKBTypes::hasZ() and QgsWKBTypes::hasM() /* Q_DECL_DEPRECATED */ static int wkbDimensions( WkbType type ); + //! Converts from old (pre 2.10) WKB type to new WKB type + static QgsWKBTypes::Type fromOldWkbType( QGis::WkbType type ); + + //! Converts from new (post 2.10) WKB type to old WKB type + static QGis::WkbType fromNewWkbType( QgsWKBTypes::Type type ); + enum GeometryType { Point, diff --git a/src/core/qgsdatasourceuri.cpp b/src/core/qgsdatasourceuri.cpp index 67dad7d464f..3a63a407e7d 100644 --- a/src/core/qgsdatasourceuri.cpp +++ b/src/core/qgsdatasourceuri.cpp @@ -139,7 +139,7 @@ QgsDataSourceURI::QgsDataSourceURI( QString uri ) } else if ( pname == "type" ) { - mWkbType = ( QGis::WkbType )QgsWKBTypes::parseType( pval ); + mWkbType = QGis::fromNewWkbType( QgsWKBTypes::parseType( pval ) ); } else if ( pname == "selectatid" ) { diff --git a/src/core/qgsvectorfilewriter.cpp b/src/core/qgsvectorfilewriter.cpp index 2e2f3a0adcc..1eaf2b1d98b 100644 --- a/src/core/qgsvectorfilewriter.cpp +++ b/src/core/qgsvectorfilewriter.cpp @@ -1737,7 +1737,7 @@ OGRFeatureH QgsVectorFileWriter::createFeature( QgsFeature& feature ) // we must force the use of 25D. if ( mWkbType >= QGis::WKBPoint25D && mWkbType <= QGis::WKBMultiPolygon25D ) { - QgsWKBTypes::Type wkbType = ( QgsWKBTypes::Type )geom->wkbType(); + QgsWKBTypes::Type wkbType = QGis::fromOldWkbType( geom->wkbType() ); if ( wkbType >= QgsWKBTypes::PointZ && wkbType <= QgsWKBTypes::MultiPolygonZ ) { QGis::WkbType wkbType25d = ( QGis::WkbType )( geom->wkbType() - QgsWKBTypes::PointZ + QgsWKBTypes::Point25D ); diff --git a/src/gui/auth/qgsauthcertificateinfo.cpp b/src/gui/auth/qgsauthcertificateinfo.cpp index 6608c43b6ed..3b3e2999faa 100644 --- a/src/gui/auth/qgsauthcertificateinfo.cpp +++ b/src/gui/auth/qgsauthcertificateinfo.cpp @@ -57,8 +57,11 @@ QgsAuthCertInfo::QgsAuthCertInfo( const QSslCertificate& cert, , mDefaultItemForeground( QBrush() ) , mManageTrust( manageCertTrust ) , mTrustCacheRebuilt( false ) + , mDefaultTrustPolicy( QgsAuthCertUtils::DefaultTrust ) + , mCurrentTrustPolicy( QgsAuthCertUtils::DefaultTrust ) , mSecGeneral( 0 ) , mSecDetails( 0 ) + , mSecPemText( 0 ) , mGrpSubj( 0 ) , mGrpIssu( 0 ) , mGrpCert( 0 ) diff --git a/src/gui/auth/qgsautheditorwidgets.cpp b/src/gui/auth/qgsautheditorwidgets.cpp index 4a1748c527a..8eb589e660e 100644 --- a/src/gui/auth/qgsautheditorwidgets.cpp +++ b/src/gui/auth/qgsautheditorwidgets.cpp @@ -104,6 +104,13 @@ void QgsAuthMethodPlugins::populateTable() QgsAuthEditorWidgets::QgsAuthEditorWidgets( QWidget *parent ) : QWidget( parent ) + , mAuthUtilitiesMenu( 0 ) + , mActionSetMasterPassword( 0 ) + , mActionClearCachedMasterPassword( 0 ) + , mActionResetMasterPassword( 0 ) + , mActionClearCachedAuthConfigs( 0 ) + , mActionRemoveAuthConfigs( 0 ) + , mActionEraseAuthDatabase( 0 ) { setupUi( this ); if ( !QgsAuthManager::instance()->isDisabled() ) diff --git a/src/gui/auth/qgsauthimportidentitydialog.cpp b/src/gui/auth/qgsauthimportidentitydialog.cpp index 458c5c12682..82310aef4db 100644 --- a/src/gui/auth/qgsauthimportidentitydialog.cpp +++ b/src/gui/auth/qgsauthimportidentitydialog.cpp @@ -52,6 +52,7 @@ static QByteArray fileData_( const QString& path, bool astext = false ) QgsAuthImportIdentityDialog::QgsAuthImportIdentityDialog( QgsAuthImportIdentityDialog::IdentityType identitytype, QWidget *parent ) : QDialog( parent ) + , mIdentityType( CertIdentity ) , mPkiBundle( QgsPkiBundle() ) , mDisabled( false ) , mAuthNotifyLayout( 0 ) diff --git a/src/plugins/topology/topolError.cpp b/src/plugins/topology/topolError.cpp index cd9e9c47350..7329d9b9b48 100644 --- a/src/plugins/topology/topolError.cpp +++ b/src/plugins/topology/topolError.cpp @@ -65,12 +65,12 @@ bool TopolError::fixUnion( FeatureLayer fl1, FeatureLayer fl2 ) if ( !ok ) return false; - QgsGeometry* g = f1.constGeometry()->combine( f2.constGeometry() ); - if ( !g ) + QScopedPointer< QgsGeometry > g( f1.constGeometry()->combine( f2.constGeometry() ) ); + if ( !g.data() ) return false; if ( fl2.layer->deleteFeature( f2.id() ) ) - return fl1.layer->changeGeometry( f1.id(), g ); + return fl1.layer->changeGeometry( f1.id(), g.data() ); return false; } diff --git a/src/plugins/topology/topolTest.cpp b/src/plugins/topology/topolTest.cpp index 2d43ebf6694..6e271bc3b82 100644 --- a/src/plugins/topology/topolTest.cpp +++ b/src/plugins/topology/topolTest.cpp @@ -695,6 +695,7 @@ ErrorList topolTest::checkGaps( double tolerance, QgsVectorLayer *layer1, QgsVec //qDebug() << "difference gometry - " << diffGeoms->exportToWkt(); QList geomColl = diffGeoms->asGeometryCollection(); + delete diffGeoms; QgsGeometry* canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); @@ -713,7 +714,6 @@ ErrorList topolTest::checkGaps( double tolerance, QgsVectorLayer *layer1, QgsVec } } QgsRectangle bBox = conflictGeom->boundingBox(); - QgsFeature feat; FeatureLayer ftrLayer1; ftrLayer1.layer = layer1; QList errorFtrLayers;