mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
Drop the temporary QgsRectangle::createNull static, not more needed
This commit is contained in:
parent
376f9798cd
commit
f42699979c
@ -59,7 +59,6 @@ Copy constructor
|
||||
|
||||
~QgsRectangle();
|
||||
|
||||
|
||||
static QgsRectangle fromWkt( const QString &wkt );
|
||||
%Docstring
|
||||
Creates a new rectangle from a ``wkt`` string.
|
||||
|
@ -1204,7 +1204,7 @@ QgsRectangle QgsGeometry::boundingBox() const
|
||||
{
|
||||
return d->geometry->boundingBox();
|
||||
}
|
||||
return QgsRectangle::createNull();
|
||||
return QgsRectangle();
|
||||
}
|
||||
|
||||
QgsBox3D QgsGeometry::boundingBox3D() const
|
||||
|
@ -99,22 +99,6 @@ class CORE_EXPORT QgsRectangle
|
||||
// see https://github.com/qgis/QGIS/pull/4720#issuecomment-308652392
|
||||
~QgsRectangle() = default;
|
||||
|
||||
/**
|
||||
* Creates a null rectangle.
|
||||
*
|
||||
* This is a temporary method to use while the default
|
||||
* constructor is still not constructing a null rectangle.
|
||||
*
|
||||
* \since QGIS 3.34
|
||||
*/
|
||||
static QgsRectangle createNull() SIP_SKIP
|
||||
{
|
||||
// TODO: remove this method once the default constructor gives a null
|
||||
QgsRectangle rectNull;
|
||||
rectNull.setNull(); // TODO: have setNull() return *this ?
|
||||
return rectNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new rectangle from a \a wkt string.
|
||||
* The WKT must contain only 5 vertices, representing a rectangle aligned with X and Y axes.
|
||||
|
@ -837,7 +837,7 @@ void TestQgsGeometry::fromPolyline()
|
||||
|
||||
void TestQgsGeometry::fromRect()
|
||||
{
|
||||
QgsRectangle rectNull = QgsRectangle::createNull();
|
||||
QgsRectangle rectNull;
|
||||
|
||||
QgsGeometry fromRect = QgsGeometry::fromRect( rectNull );
|
||||
QVERIFY( fromRect.isNull() );
|
||||
@ -2183,7 +2183,7 @@ void TestQgsGeometry::orientedMinimumBoundingBox()
|
||||
void TestQgsGeometry::boundingBox()
|
||||
{
|
||||
QgsGeometry geomTest;
|
||||
QgsRectangle nullRect = QgsRectangle::createNull();
|
||||
QgsRectangle nullRect;
|
||||
QCOMPARE( geomTest.boundingBox(), nullRect );
|
||||
|
||||
geomTest = QgsGeometry::fromWkt( QStringLiteral( "LINESTRING(-1 -2, 4 5)" ) );
|
||||
|
@ -83,7 +83,7 @@ void TestQgsVirtualLayerProvider::testConstructor()
|
||||
QString uri;
|
||||
std::unique_ptr<QgsVectorDataProvider> prov( new QgsVirtualLayerProvider( uri, opts ) );
|
||||
|
||||
const QgsRectangle rectNull = QgsRectangle::createNull();
|
||||
const QgsRectangle rectNull;
|
||||
QCOMPARE( prov->sourceExtent(), rectNull );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user