Skip to content

Commit e19f648

Browse files
committedOct 30, 2017
Various fixes to dropping V2 suffix
1 parent b4e0ebe commit e19f648

23 files changed

+32
-32
lines changed
 

‎python/core/geometry/qgsmultipoint.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
class QgsMultiPointV2: QgsGeometryCollection
11+
class QgsMultiPoint: QgsGeometryCollection
1212
{
1313
%Docstring
1414
Multi point geometry collection.

‎python/core/geometry/qgsmultipolygon.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
class QgsMultiPolygonV2: QgsMultiSurface
11+
class QgsMultiPolygon: QgsMultiSurface
1212
{
1313
%Docstring
1414
Multi polygon geometry collection.

‎python/core/geometry/qgspolygon.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111

12-
class QgsPolygonV2: QgsCurvePolygon
12+
class QgsPolygon: QgsCurvePolygon
1313
{
1414
%Docstring
1515
Polygon geometry type.

‎python/core/geometry/qgstriangle.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111

12-
class QgsTriangle : QgsPolygonV2
12+
class QgsTriangle : QgsPolygon
1313
{
1414
%Docstring
1515
Triangle geometry type.

‎src/app/qgsmaptooladdrectangle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ QgsLineString *QgsMapToolAddRectangle::rectangleToLinestring( const bool isOrien
116116

117117
QgsPolygon *QgsMapToolAddRectangle::rectangleToPolygon( const bool isOriented ) const
118118
{
119-
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
119+
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
120120
if ( mRectangle.isEmpty() )
121121
{
122122
return polygon.release();

‎src/app/qgsmaptoolcircle2tangentspoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void QgsMapToolCircle2TangentsPoint::radiusSpinBoxChanged( int radius )
274274
mRubberBands.clear();
275275
if ( mPoints.size() == 4 )
276276
{
277-
std::unique_ptr<QgsMultiPolygonV2> rb( new QgsMultiPolygon() );
277+
std::unique_ptr<QgsMultiPolygon> rb( new QgsMultiPolygon() );
278278
for ( int i = 0; i < mCenters.size(); ++i )
279279
{
280280
std::unique_ptr<QgsGeometryRubberBand> tempRB( createGeometryRubberBand( QgsWkbTypes::PointGeometry, true ) );

‎src/core/geometry/qgsellipse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ QgsPointSequence QgsEllipse::points( unsigned int segments ) const
212212

213213
QgsPolygon *QgsEllipse::toPolygon( unsigned int segments ) const
214214
{
215-
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
215+
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
216216
if ( segments < 3 )
217217
{
218218
return polygon.release();
@@ -280,7 +280,7 @@ QString QgsEllipse::toString( int pointPrecision, int axisPrecision, int azimuth
280280

281281
QgsPolygon *QgsEllipse::orientedBoundingBox() const
282282
{
283-
std::unique_ptr<QgsPolygonV2> ombb( new QgsPolygon() );
283+
std::unique_ptr<QgsPolygon> ombb( new QgsPolygon() );
284284
if ( isEmpty() )
285285
{
286286
return ombb.release();

‎src/core/geometry/qgsgeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,7 @@ std::unique_ptr<QgsLineString> QgsGeometry::smoothLine( const QgsLineString &lin
27712771
return smoothCurve( line, iterations, offset, squareDistThreshold, maxAngleRads, false );
27722772
}
27732773

2774-
std::unique_ptr<QgsPolygonV2> QgsGeometry::smoothPolygon( const QgsPolygon &polygon, const unsigned int iterations, const double offset, double minimumDistance, double maxAngle ) const
2774+
std::unique_ptr<QgsPolygon> QgsGeometry::smoothPolygon( const QgsPolygon &polygon, const unsigned int iterations, const double offset, double minimumDistance, double maxAngle ) const
27752775
{
27762776
double maxAngleRads = maxAngle * M_PI / 180.0;
27772777
double squareDistThreshold = minimumDistance > 0 ? minimumDistance * minimumDistance : -1;

‎src/core/geometry/qgsgeometrycollection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ bool QgsGeometryCollection::fromWkb( QgsConstWkbPtr &wkbPtr )
299299

300300
bool QgsGeometryCollection::fromWkt( const QString &wkt )
301301
{
302-
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPoint << new QgsLineString << new QgsPolygonV2
302+
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPoint << new QgsLineString << new QgsPolygon
303303
<< new QgsCircularString << new QgsCompoundCurve
304304
<< new QgsCurvePolygon
305305
<< new QgsMultiPoint << new QgsMultiLineString

‎src/core/geometry/qgsgeometryfactory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ std::unique_ptr< QgsAbstractGeometry > QgsGeometryFactory::fromPoint( const QgsP
137137
return qgis::make_unique< QgsPoint >( point.x(), point.y() );
138138
}
139139

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

167-
std::unique_ptr<QgsPolygonV2> QgsGeometryFactory::fromPolygon( const QgsPolygonXY &polygon )
167+
std::unique_ptr<QgsPolygon> QgsGeometryFactory::fromPolygon( const QgsPolygonXY &polygon )
168168
{
169169
std::unique_ptr< QgsPolygon > poly = qgis::make_unique< QgsPolygon >();
170170

‎src/core/geometry/qgsgeometryfactory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ class CORE_EXPORT QgsGeometryFactory
6767
//! Construct geometry from a point
6868
static std::unique_ptr< QgsAbstractGeometry > fromPoint( const QgsPointXY &point );
6969
//! Construct geometry from a multipoint
70-
static std::unique_ptr<QgsMultiPointV2> fromMultiPoint( const QgsMultiPointXY &multipoint );
70+
static std::unique_ptr<QgsMultiPoint> fromMultiPoint( const QgsMultiPointXY &multipoint );
7171
//! Construct geometry from a polyline
7272
static std::unique_ptr< QgsAbstractGeometry > fromPolyline( const QgsPolylineXY &polyline );
7373
//! Construct geometry from a multipolyline
7474
static std::unique_ptr<QgsMultiLineString> fromMultiPolyline( const QgsMultiPolylineXY &multiline );
7575
//! Construct geometry from a polygon
76-
static std::unique_ptr<QgsPolygonV2> fromPolygon( const QgsPolygonXY &polygon );
76+
static std::unique_ptr<QgsPolygon> fromPolygon( const QgsPolygonXY &polygon );
7777
//! Construct geometry from a multipolygon
78-
static std::unique_ptr<QgsMultiPolygonV2> fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
78+
static std::unique_ptr<QgsMultiPolygon> fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
7979
//! Return empty geometry from wkb type
8080
static std::unique_ptr< QgsAbstractGeometry > geomFromWkbType( QgsWkbTypes::Type t );
8181

‎src/core/geometry/qgsgeos.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
11091109
return nullptr;
11101110
}
11111111

1112-
std::unique_ptr<QgsPolygonV2> QgsGeos::fromGeosPolygon( const GEOSGeometry *geos )
1112+
std::unique_ptr<QgsPolygon> QgsGeos::fromGeosPolygon( const GEOSGeometry *geos )
11131113
{
11141114
if ( GEOSGeomTypeId_r( geosinit.ctxt, geos ) != GEOS_POLYGON )
11151115
{

‎src/core/geometry/qgsinternalgeometryengine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ QgsGeometry QgsInternalGeometryEngine::extrude( double x, double y ) const
5959
linesToProcess << static_cast<QgsLineString *>( curve->segmentize() );
6060
}
6161

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

6565
if ( !linesToProcess.empty() )

‎src/core/geometry/qgsmultipoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ QgsMultiPoint *QgsMultiPoint::createEmptyWithSameType() const
3838

3939
QgsMultiPoint *QgsMultiPoint::clone() const
4040
{
41-
return new QgsMultiPointV2( *this );
41+
return new QgsMultiPoint( *this );
4242
}
4343

4444
QgsMultiPoint *QgsMultiPoint::toCurveType() const

‎src/core/geometry/qgsmultipoint.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ email : marco.hugentobler at sourcepole dot com
2222

2323
/**
2424
* \ingroup core
25-
* \class QgsMultiPointV2
25+
* \class QgsMultiPoint
2626
* \brief Multi point geometry collection.
2727
* \since QGIS 2.10
2828
*/
29-
class CORE_EXPORT QgsMultiPointV2: public QgsGeometryCollection
29+
class CORE_EXPORT QgsMultiPoint: public QgsGeometryCollection
3030
{
3131
public:
3232
QgsMultiPoint();

‎src/core/geometry/qgsmultipolygon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ QgsMultiPolygon *QgsMultiPolygon::createEmptyWithSameType() const
4747

4848
QgsMultiPolygon *QgsMultiPolygon::clone() const
4949
{
50-
return new QgsMultiPolygonV2( *this );
50+
return new QgsMultiPolygon( *this );
5151
}
5252

5353
bool QgsMultiPolygon::fromWkt( const QString &wkt )
5454
{
55-
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPolygonV2, QStringLiteral( "Polygon" ) );
55+
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsPolygon, QStringLiteral( "Polygon" ) );
5656
}
5757

5858
QDomElement QgsMultiPolygon::asGML2( QDomDocument &doc, int precision, const QString &ns ) const

‎src/core/geometry/qgsmultipolygon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ email : marco.hugentobler at sourcepole dot com
2222

2323
/**
2424
* \ingroup core
25-
* \class QgsMultiPolygonV2
25+
* \class QgsMultiPolygon
2626
* \brief Multi polygon geometry collection.
2727
* \since QGIS 2.10
2828
*/
29-
class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurface
29+
class CORE_EXPORT QgsMultiPolygon: public QgsMultiSurface
3030
{
3131
public:
3232
QgsMultiPolygon();

‎src/core/geometry/qgspolygon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ QgsPolygon *QgsPolygon::createEmptyWithSameType() const
4141

4242
QgsPolygon *QgsPolygon::clone() const
4343
{
44-
return new QgsPolygonV2( *this );
44+
return new QgsPolygon( *this );
4545
}
4646

4747
void QgsPolygon::clear()

‎src/core/geometry/qgspolygon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424

2525
/**
2626
* \ingroup core
27-
* \class QgsPolygonV2
27+
* \class QgsPolygon
2828
* \brief Polygon geometry type.
2929
* \since QGIS 2.10
3030
*/
31-
class CORE_EXPORT QgsPolygonV2: public QgsCurvePolygon
31+
class CORE_EXPORT QgsPolygon: public QgsCurvePolygon
3232
{
3333
public:
3434
QgsPolygon();

‎src/core/geometry/qgsregularpolygon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ QgsPointSequence QgsRegularPolygon::points() const
180180

181181
QgsPolygon *QgsRegularPolygon::toPolygon() const
182182
{
183-
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
183+
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
184184
if ( isEmpty() )
185185
{
186186
return polygon.release();

‎src/core/geometry/qgstriangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* \brief Triangle geometry type.
3131
* \since QGIS 3.0
3232
*/
33-
class CORE_EXPORT QgsTriangle : public QgsPolygonV2
33+
class CORE_EXPORT QgsTriangle : public QgsPolygon
3434
{
3535
public:
3636
QgsTriangle();

‎src/core/qgsmaptopixelgeometrysimplifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ QgsGeometry QgsMapToPixelSimplifier::simplifyGeometry(
268268
else if ( flatType == QgsWkbTypes::Polygon )
269269
{
270270
const QgsPolygon &srcPolygon = dynamic_cast<const QgsPolygon &>( geometry );
271-
std::unique_ptr<QgsPolygonV2> polygon( new QgsPolygon() );
271+
std::unique_ptr<QgsPolygon> polygon( new QgsPolygon() );
272272
polygon->setExteriorRing( qgsgeometry_cast<QgsCurve *>( simplifyGeometry( simplifyFlags, simplifyAlgorithm, srcPolygon.exteriorRing()->wkbType(), *srcPolygon.exteriorRing(), envelope, map2pixelTol, true ).constGet()->clone() ) );
273273
for ( int i = 0; i < srcPolygon.numInteriorRings(); ++i )
274274
{

‎tests/src/core/testqgsgeometry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14800,7 +14800,7 @@ void TestQgsGeometry::createEmptyWithSameType()
1480014800
testCreateEmptyWithSameType<QgsMultiLineString>();
1480114801

1480214802
qDebug( "createEmptyWithSameType(): QgsMultiPointV2" );
14803-
testCreateEmptyWithSameType<QgsMultiPointV2>();
14803+
testCreateEmptyWithSameType<QgsMultiPoint>();
1480414804

1480514805
qDebug( "createEmptyWithSameType(): QgsMultiSurface" );
1480614806
testCreateEmptyWithSameType<QgsMultiSurface>();
@@ -14814,7 +14814,7 @@ void TestQgsGeometry::createEmptyWithSameType()
1481414814
testCreateEmptyWithSameType<QgsCurvePolygon>();
1481514815

1481614816
qDebug( "createEmptyWithSameType(): QgsPolygonV2" );
14817-
testCreateEmptyWithSameType<QgsPolygonV2>();
14817+
testCreateEmptyWithSameType<QgsPolygon>();
1481814818

1481914819
qDebug( "createEmptyWithSameType(): QgsTriangle" );
1482014820
testCreateEmptyWithSameType<QgsTriangle>();

0 commit comments

Comments
 (0)
Please sign in to comment.