From 5fe0ee7b77fb20cb0a9488af435510e2d74bcf79 Mon Sep 17 00:00:00 2001 From: lbartoletti Date: Wed, 20 May 2020 14:28:53 +0200 Subject: [PATCH] indent --- src/core/geometry/qgsgeometryutils.cpp | 2 +- tests/src/core/testqgsgeometry.cpp | 28 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/core/geometry/qgsgeometryutils.cpp b/src/core/geometry/qgsgeometryutils.cpp index 6892002d628..d5425191c7d 100644 --- a/src/core/geometry/qgsgeometryutils.cpp +++ b/src/core/geometry/qgsgeometryutils.cpp @@ -1301,7 +1301,7 @@ QPair QgsGeometryUtils::wktReadBlock( const QString QString wktParsed = wkt; QString contents; if ( wktParsed.count( '(' ) != wktParsed.count( ')' ) ) // if unbalanced parenthesis will returns false - contents = QStringLiteral("NULL"); + contents = QStringLiteral( "NULL" ); else if ( wkt.contains( QString( "EMPTY" ), Qt::CaseInsensitive ) ) { QRegularExpression wktRegEx( QStringLiteral( "^\\s*(\\w+)\\s+(\\w+)\\s*$" ) ); diff --git a/tests/src/core/testqgsgeometry.cpp b/tests/src/core/testqgsgeometry.cpp index 002eadfea1b..ff602f7e195 100644 --- a/tests/src/core/testqgsgeometry.cpp +++ b/tests/src/core/testqgsgeometry.cpp @@ -18102,20 +18102,20 @@ void TestQgsGeometry::testRandomPointsInPolygon() void TestQgsGeometry::wktParser() { // unbalanced parenthesis - QVERIFY(! QgsPoint().fromWkt("POINT((0, 1)")); - QVERIFY(! QgsPoint().fromWkt("POINT(0, 1) )")); - QVERIFY(! QgsPoint().fromWkt("POINT ((0, 1)")); - QVERIFY(! QgsPoint().fromWkt("POINT (0, 1) )")); - QVERIFY(! QgsLineString().fromWkt("LineString(0, 1) )")); - QVERIFY(! QgsLineString().fromWkt("LineString(0 1, 1 2) )")); - QVERIFY(! QgsLineString().fromWkt("LineString (0, 1) )")); - QVERIFY(! QgsLineString().fromWkt("LineString (0 1, 1 2) )")); - QVERIFY(! QgsMultiLineString().fromWkt("MULTILINESTRING ((((1 2, 2 4, 4 5))")); - QVERIFY(! QgsMultiLineString().fromWkt("MULTILINESTRING((((1 2, 2 4, 4 5))")); - QVERIFY(! QgsLineString().fromWkt("Triangle(0 1, 1 2, 3 3) )")); - QVERIFY(! QgsLineString().fromWkt("Triangle (0 1, 1 2, 3 3) )")); - QVERIFY(! QgsLineString().fromWkt("Triangle( (0 1, 1 2, 3 3) )) ")); - QVERIFY(! QgsLineString().fromWkt("Triangle ( (0 1, 1 2, 3 3) )) ")); + QVERIFY( ! QgsPoint().fromWkt( "POINT((0, 1)" ) ); + QVERIFY( ! QgsPoint().fromWkt( "POINT(0, 1) )" ) ); + QVERIFY( ! QgsPoint().fromWkt( "POINT ((0, 1)" ) ); + QVERIFY( ! QgsPoint().fromWkt( "POINT (0, 1) )" ) ); + QVERIFY( ! QgsLineString().fromWkt( "LineString(0, 1) )" ) ); + QVERIFY( ! QgsLineString().fromWkt( "LineString(0 1, 1 2) )" ) ); + QVERIFY( ! QgsLineString().fromWkt( "LineString (0, 1) )" ) ); + QVERIFY( ! QgsLineString().fromWkt( "LineString (0 1, 1 2) )" ) ); + QVERIFY( ! QgsMultiLineString().fromWkt( "MULTILINESTRING ((((1 2, 2 4, 4 5))" ) ); + QVERIFY( ! QgsMultiLineString().fromWkt( "MULTILINESTRING((((1 2, 2 4, 4 5))" ) ); + QVERIFY( ! QgsLineString().fromWkt( "Triangle(0 1, 1 2, 3 3) )" ) ); + QVERIFY( ! QgsLineString().fromWkt( "Triangle (0 1, 1 2, 3 3) )" ) ); + QVERIFY( ! QgsLineString().fromWkt( "Triangle( (0 1, 1 2, 3 3) )) " ) ); + QVERIFY( ! QgsLineString().fromWkt( "Triangle ( (0 1, 1 2, 3 3) )) " ) ); } QGSTEST_MAIN( TestQgsGeometry ) #include "testqgsgeometry.moc"