Skip to content

Commit

Permalink
Various fixes to dropping V2 suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 30, 2017
1 parent b4e0ebe commit e19f648
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmultipoint.sip
Expand Up @@ -8,7 +8,7 @@



class QgsMultiPointV2: QgsGeometryCollection
class QgsMultiPoint: QgsGeometryCollection
{
%Docstring
Multi point geometry collection.
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmultipolygon.sip
Expand Up @@ -8,7 +8,7 @@



class QgsMultiPolygonV2: QgsMultiSurface
class QgsMultiPolygon: QgsMultiSurface
{
%Docstring
Multi polygon geometry collection.
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgspolygon.sip
Expand Up @@ -9,7 +9,7 @@



class QgsPolygonV2: QgsCurvePolygon
class QgsPolygon: QgsCurvePolygon
{
%Docstring
Polygon geometry type.
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgstriangle.sip
Expand Up @@ -9,7 +9,7 @@



class QgsTriangle : QgsPolygonV2
class QgsTriangle : QgsPolygon
{
%Docstring
Triangle geometry type.
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdrectangle.cpp
Expand Up @@ -116,7 +116,7 @@ QgsLineString *QgsMapToolAddRectangle::rectangleToLinestring( const bool isOrien

QgsPolygon *QgsMapToolAddRectangle::rectangleToPolygon( const bool isOriented ) const
{
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
if ( mRectangle.isEmpty() )
{
return polygon.release();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolcircle2tangentspoint.cpp
Expand Up @@ -274,7 +274,7 @@ void QgsMapToolCircle2TangentsPoint::radiusSpinBoxChanged( int radius )
mRubberBands.clear();
if ( mPoints.size() == 4 )
{
std::unique_ptr<QgsMultiPolygonV2> rb( new QgsMultiPolygon() );
std::unique_ptr<QgsMultiPolygon> rb( new QgsMultiPolygon() );
for ( int i = 0; i < mCenters.size(); ++i )
{
std::unique_ptr<QgsGeometryRubberBand> tempRB( createGeometryRubberBand( QgsWkbTypes::PointGeometry, true ) );
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsellipse.cpp
Expand Up @@ -212,7 +212,7 @@ QgsPointSequence QgsEllipse::points( unsigned int segments ) const

QgsPolygon *QgsEllipse::toPolygon( unsigned int segments ) const
{
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
if ( segments < 3 )
{
return polygon.release();
Expand Down Expand Up @@ -280,7 +280,7 @@ QString QgsEllipse::toString( int pointPrecision, int axisPrecision, int azimuth

QgsPolygon *QgsEllipse::orientedBoundingBox() const
{
std::unique_ptr<QgsPolygonV2> ombb( new QgsPolygon() );
std::unique_ptr<QgsPolygon> ombb( new QgsPolygon() );
if ( isEmpty() )
{
return ombb.release();
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometry.cpp
Expand Up @@ -2771,7 +2771,7 @@ std::unique_ptr<QgsLineString> QgsGeometry::smoothLine( const QgsLineString &lin
return smoothCurve( line, iterations, offset, squareDistThreshold, maxAngleRads, false );
}

std::unique_ptr<QgsPolygonV2> QgsGeometry::smoothPolygon( const QgsPolygon &polygon, const unsigned int iterations, const double offset, double minimumDistance, double maxAngle ) const
std::unique_ptr<QgsPolygon> QgsGeometry::smoothPolygon( const QgsPolygon &polygon, const unsigned int iterations, const double offset, double minimumDistance, double maxAngle ) const
{
double maxAngleRads = maxAngle * M_PI / 180.0;
double squareDistThreshold = minimumDistance > 0 ? minimumDistance * minimumDistance : -1;
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometrycollection.cpp
Expand Up @@ -299,7 +299,7 @@ bool QgsGeometryCollection::fromWkb( QgsConstWkbPtr &wkbPtr )

bool QgsGeometryCollection::fromWkt( const QString &wkt )
{
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPoint << new QgsLineString << new QgsPolygonV2
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPoint << new QgsLineString << new QgsPolygon
<< new QgsCircularString << new QgsCompoundCurve
<< new QgsCurvePolygon
<< new QgsMultiPoint << new QgsMultiLineString
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsgeometryfactory.cpp
Expand Up @@ -137,7 +137,7 @@ std::unique_ptr< QgsAbstractGeometry > QgsGeometryFactory::fromPoint( const QgsP
return qgis::make_unique< QgsPoint >( point.x(), point.y() );
}

std::unique_ptr<QgsMultiPointV2> QgsGeometryFactory::fromMultiPoint( const QgsMultiPointXY &multipoint )
std::unique_ptr<QgsMultiPoint> QgsGeometryFactory::fromMultiPoint( const QgsMultiPointXY &multipoint )
{
std::unique_ptr< QgsMultiPoint > mp = qgis::make_unique< QgsMultiPoint >();
QgsMultiPointXY::const_iterator ptIt = multipoint.constBegin();
Expand All @@ -164,7 +164,7 @@ std::unique_ptr<QgsMultiLineString> QgsGeometryFactory::fromMultiPolyline( const
return mLine;
}

std::unique_ptr<QgsPolygonV2> QgsGeometryFactory::fromPolygon( const QgsPolygonXY &polygon )
std::unique_ptr<QgsPolygon> QgsGeometryFactory::fromPolygon( const QgsPolygonXY &polygon )
{
std::unique_ptr< QgsPolygon > poly = qgis::make_unique< QgsPolygon >();

Expand Down
6 changes: 3 additions & 3 deletions src/core/geometry/qgsgeometryfactory.h
Expand Up @@ -67,15 +67,15 @@ class CORE_EXPORT QgsGeometryFactory
//! Construct geometry from a point
static std::unique_ptr< QgsAbstractGeometry > fromPoint( const QgsPointXY &point );
//! Construct geometry from a multipoint
static std::unique_ptr<QgsMultiPointV2> fromMultiPoint( const QgsMultiPointXY &multipoint );
static std::unique_ptr<QgsMultiPoint> fromMultiPoint( const QgsMultiPointXY &multipoint );
//! Construct geometry from a polyline
static std::unique_ptr< QgsAbstractGeometry > fromPolyline( const QgsPolylineXY &polyline );
//! Construct geometry from a multipolyline
static std::unique_ptr<QgsMultiLineString> fromMultiPolyline( const QgsMultiPolylineXY &multiline );
//! Construct geometry from a polygon
static std::unique_ptr<QgsPolygonV2> fromPolygon( const QgsPolygonXY &polygon );
static std::unique_ptr<QgsPolygon> fromPolygon( const QgsPolygonXY &polygon );
//! Construct geometry from a multipolygon
static std::unique_ptr<QgsMultiPolygonV2> fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
static std::unique_ptr<QgsMultiPolygon> fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
//! Return empty geometry from wkb type
static std::unique_ptr< QgsAbstractGeometry > geomFromWkbType( QgsWkbTypes::Type t );

Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeos.cpp
Expand Up @@ -1109,7 +1109,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
return nullptr;
}

std::unique_ptr<QgsPolygonV2> QgsGeos::fromGeosPolygon( const GEOSGeometry *geos )
std::unique_ptr<QgsPolygon> QgsGeos::fromGeosPolygon( const GEOSGeometry *geos )
{
if ( GEOSGeomTypeId_r( geosinit.ctxt, geos ) != GEOS_POLYGON )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsinternalgeometryengine.cpp
Expand Up @@ -59,7 +59,7 @@ QgsGeometry QgsInternalGeometryEngine::extrude( double x, double y ) const
linesToProcess << static_cast<QgsLineString *>( curve->segmentize() );
}

std::unique_ptr<QgsMultiPolygonV2> multipolygon( linesToProcess.size() > 1 ? new QgsMultiPolygon() : nullptr );
std::unique_ptr<QgsMultiPolygon> multipolygon( linesToProcess.size() > 1 ? new QgsMultiPolygon() : nullptr );
QgsPolygon *polygon = nullptr;

if ( !linesToProcess.empty() )
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsmultipoint.cpp
Expand Up @@ -38,7 +38,7 @@ QgsMultiPoint *QgsMultiPoint::createEmptyWithSameType() const

QgsMultiPoint *QgsMultiPoint::clone() const
{
return new QgsMultiPointV2( *this );
return new QgsMultiPoint( *this );
}

QgsMultiPoint *QgsMultiPoint::toCurveType() const
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultipoint.h
Expand Up @@ -22,11 +22,11 @@ email : marco.hugentobler at sourcepole dot com

/**
* \ingroup core
* \class QgsMultiPointV2
* \class QgsMultiPoint
* \brief Multi point geometry collection.
* \since QGIS 2.10
*/
class CORE_EXPORT QgsMultiPointV2: public QgsGeometryCollection
class CORE_EXPORT QgsMultiPoint: public QgsGeometryCollection
{
public:
QgsMultiPoint();
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultipolygon.cpp
Expand Up @@ -47,12 +47,12 @@ QgsMultiPolygon *QgsMultiPolygon::createEmptyWithSameType() const

QgsMultiPolygon *QgsMultiPolygon::clone() const
{
return new QgsMultiPolygonV2( *this );
return new QgsMultiPolygon( *this );
}

bool QgsMultiPolygon::fromWkt( const QString &wkt )
{
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPolygonV2, QStringLiteral( "Polygon" ) );
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPolygon, QStringLiteral( "Polygon" ) );
}

QDomElement QgsMultiPolygon::asGML2( QDomDocument &doc, int precision, const QString &ns ) const
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultipolygon.h
Expand Up @@ -22,11 +22,11 @@ email : marco.hugentobler at sourcepole dot com

/**
* \ingroup core
* \class QgsMultiPolygonV2
* \class QgsMultiPolygon
* \brief Multi polygon geometry collection.
* \since QGIS 2.10
*/
class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurface
class CORE_EXPORT QgsMultiPolygon: public QgsMultiSurface
{
public:
QgsMultiPolygon();
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgspolygon.cpp
Expand Up @@ -41,7 +41,7 @@ QgsPolygon *QgsPolygon::createEmptyWithSameType() const

QgsPolygon *QgsPolygon::clone() const
{
return new QgsPolygonV2( *this );
return new QgsPolygon( *this );
}

void QgsPolygon::clear()
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgspolygon.h
Expand Up @@ -24,11 +24,11 @@

/**
* \ingroup core
* \class QgsPolygonV2
* \class QgsPolygon
* \brief Polygon geometry type.
* \since QGIS 2.10
*/
class CORE_EXPORT QgsPolygonV2: public QgsCurvePolygon
class CORE_EXPORT QgsPolygon: public QgsCurvePolygon
{
public:
QgsPolygon();
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsregularpolygon.cpp
Expand Up @@ -180,7 +180,7 @@ QgsPointSequence QgsRegularPolygon::points() const

QgsPolygon *QgsRegularPolygon::toPolygon() const
{
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
if ( isEmpty() )
{
return polygon.release();
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgstriangle.h
Expand Up @@ -30,7 +30,7 @@
* \brief Triangle geometry type.
* \since QGIS 3.0
*/
class CORE_EXPORT QgsTriangle : public QgsPolygonV2
class CORE_EXPORT QgsTriangle : public QgsPolygon
{
public:
QgsTriangle();
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaptopixelgeometrysimplifier.cpp
Expand Up @@ -268,7 +268,7 @@ QgsGeometry QgsMapToPixelSimplifier::simplifyGeometry(
else if ( flatType == QgsWkbTypes::Polygon )
{
const QgsPolygon &srcPolygon = dynamic_cast<const QgsPolygon &>( geometry );
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
polygon->setExteriorRing( qgsgeometry_cast<QgsCurve *>( simplifyGeometry( simplifyFlags, simplifyAlgorithm, srcPolygon.exteriorRing()->wkbType(), *srcPolygon.exteriorRing(), envelope, map2pixelTol, true ).constGet()->clone() ) );
for ( int i = 0; i < srcPolygon.numInteriorRings(); ++i )
{
Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/testqgsgeometry.cpp
Expand Up @@ -14800,7 +14800,7 @@ void TestQgsGeometry::createEmptyWithSameType()
testCreateEmptyWithSameType<QgsMultiLineString>();

qDebug( "createEmptyWithSameType(): QgsMultiPointV2" );
testCreateEmptyWithSameType<QgsMultiPointV2>();
testCreateEmptyWithSameType<QgsMultiPoint>();

qDebug( "createEmptyWithSameType(): QgsMultiSurface" );
testCreateEmptyWithSameType<QgsMultiSurface>();
Expand All @@ -14814,7 +14814,7 @@ void TestQgsGeometry::createEmptyWithSameType()
testCreateEmptyWithSameType<QgsCurvePolygon>();

qDebug( "createEmptyWithSameType(): QgsPolygonV2" );
testCreateEmptyWithSameType<QgsPolygonV2>();
testCreateEmptyWithSameType<QgsPolygon>();

qDebug( "createEmptyWithSameType(): QgsTriangle" );
testCreateEmptyWithSameType<QgsTriangle>();
Expand Down

0 comments on commit e19f648

Please sign in to comment.