From aa35c1cbdc942107826a07b7582eaeb7fa77afc1 Mon Sep 17 00:00:00 2001 From: Julien Cabieces Date: Mon, 9 May 2022 10:10:58 +0200 Subject: [PATCH] remove exclude empty-qstringliteral --- .../src/analysis/testqgsprocessingalgspt1.cpp | 24 +++++++++---------- tests/src/core/geometry/testqgsgeometry.cpp | 2 +- tests/src/core/testqgsofflineediting.cpp | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/src/analysis/testqgsprocessingalgspt1.cpp b/tests/src/analysis/testqgsprocessingalgspt1.cpp index 2baac87cb4a..a301d02d3c6 100644 --- a/tests/src/analysis/testqgsprocessingalgspt1.cpp +++ b/tests/src/analysis/testqgsprocessingalgspt1.cpp @@ -513,7 +513,7 @@ void TestQgsProcessingAlgsPt1::rasterLayerProperties() QCOMPARE( results.value( QStringLiteral( "EXTENT" ) ).toString(), QStringLiteral( "0.0000000000000000,0.0000000000000000 : 4.0000000000000000,4.0000000000000000" ) ); QCOMPARE( results.value( QStringLiteral( "PIXEL_WIDTH" ) ).toDouble(), 1.0 ); QCOMPARE( results.value( QStringLiteral( "PIXEL_HEIGHT" ) ).toDouble(), 1.0 ); - QCOMPARE( results.value( QStringLiteral( "CRS_AUTHID" ) ).toString(), QStringLiteral( "" ) ); // clazy:exclude=empty-qstringliteral + QCOMPARE( results.value( QStringLiteral( "CRS_AUTHID" ) ).toString(), QString() ); QCOMPARE( results.value( QStringLiteral( "WIDTH_IN_PIXELS" ) ).toInt(), 4 ); QCOMPARE( results.value( QStringLiteral( "HEIGHT_IN_PIXELS" ) ).toInt(), 4 ); QCOMPARE( results.value( QStringLiteral( "BAND_COUNT" ) ).toInt(), 1 ); @@ -1498,7 +1498,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 2" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::Byte << "EPSG:4326" << 1.0 @@ -1518,7 +1518,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 3" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::Byte << "EPSG:4326" << 1.0 @@ -1556,7 +1556,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 5" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::Int16 << "EPSG:4326" << 1.0 @@ -1575,7 +1575,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 6" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::Int16 << "EPSG:4326" << 1.0 @@ -1613,7 +1613,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 8" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::UInt16 << "EPSG:4326" << 1.0 @@ -1632,7 +1632,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 9" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::UInt16 << "EPSG:4326" << 1.0 @@ -1689,7 +1689,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 11" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::Int32 << "EPSG:4326" << 1.0 @@ -1708,7 +1708,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 12" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::Int32 << "EPSG:4326" << 1.0 @@ -1746,7 +1746,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 14" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::UInt32 << "EPSG:4326" << 1.0 @@ -1765,7 +1765,7 @@ void TestQgsProcessingAlgsPt1::createConstantRaster_data() */ QTest::newRow( "testcase 14" ) << "-3.000000000,7.000000000,-4.000000000,6.000000000 [EPSG:4326]" - << QStringLiteral( "" ) // clazy:exclude=empty-qstringliteral + << QString() << Qgis::DataType::UInt32 << "EPSG:4326" << 1.0 @@ -2153,7 +2153,7 @@ void TestQgsProcessingAlgsPt1::lineDensity_data() << QStringLiteral( "/linedensity_testcase2.tif" ) << 3.0 << 2.0 - << QStringLiteral( "" ); // clazy:exclude=empty-qstringliteral + << QString(); } diff --git a/tests/src/core/geometry/testqgsgeometry.cpp b/tests/src/core/geometry/testqgsgeometry.cpp index 2801763af16..69296ab5f35 100644 --- a/tests/src/core/geometry/testqgsgeometry.cpp +++ b/tests/src/core/geometry/testqgsgeometry.cpp @@ -2029,7 +2029,7 @@ void TestQgsGeometry::makeValid_data() QTest::addColumn( "input" ); QTest::addColumn( "expected" ); - QTest::newRow( "dimension collapse" ) << QStringLiteral( "LINESTRING(0 0)" ) << QStringLiteral( "" ); // clazy:exclude=empty-qstringliteral + QTest::newRow( "dimension collapse" ) << QStringLiteral( "LINESTRING(0 0)" ) << QString(); QTest::newRow( "unclosed ring" ) << QStringLiteral( "POLYGON((10 22,10 32,20 32,20 22))" ) << QStringLiteral( "Polygon ((10 22, 10 32, 20 32, 20 22, 10 22))" ); QTest::newRow( "butterfly polygon (self-intersecting ring)" ) << QStringLiteral( "POLYGON((0 0, 10 10, 10 0, 0 10, 0 0))" ) << QStringLiteral( "MultiPolygon (((5 5, 10 10, 10 0, 5 5)),((0 0, 0 10, 5 5, 0 0)))" ); QTest::newRow( "polygon with extra tail (a part of the ring does not form any area)" ) << QStringLiteral( "POLYGON((0 0, 1 0, 1 1, 0 1, 0 0, -1 0, 0 0))" ) << QStringLiteral( "GeometryCollection (Polygon ((0 0, 0 1, 1 1, 1 0, 0 0)),LineString (0 0, -1 0))" ); diff --git a/tests/src/core/testqgsofflineediting.cpp b/tests/src/core/testqgsofflineediting.cpp index 1985dfce90a..00a0d81b6a9 100644 --- a/tests/src/core/testqgsofflineediting.cpp +++ b/tests/src/core/testqgsofflineediting.cpp @@ -123,7 +123,7 @@ void TestQgsOfflineEditing::createSpatialiteAndSynchronizeBack_data() QTest::newRow( "no suffix" ) << QString( "no suffix" ) << QStringLiteral( " (offline)" ); //default value expected QTest::newRow( "null suffix" ) << QString() << QString(); - QTest::newRow( "empty suffix" ) << QStringLiteral( "" ) << QStringLiteral( "" ); // clazy:exclude=empty-qstringliteral + QTest::newRow( "empty suffix" ) << QString() << QString(); QTest::newRow( "part of name suffix" ) << QStringLiteral( "point" ) << QStringLiteral( "point" ); QTest::newRow( "another suffix" ) << QStringLiteral( "another suffix" ) << QStringLiteral( "another suffix" ); } @@ -136,7 +136,7 @@ void TestQgsOfflineEditing::createGeopackageAndSynchronizeBack_data() QTest::newRow( "no suffix" ) << QStringLiteral( "no suffix" ) << QStringLiteral( " (offline)" ); //default value expected QTest::newRow( "null suffix" ) << QString() << QString(); - QTest::newRow( "empty suffix" ) << QStringLiteral( "" ) << QStringLiteral( "" ); // clazy:exclude=empty-qstringliteral + QTest::newRow( "empty suffix" ) << QString() << QString(); QTest::newRow( "part of name suffix" ) << QStringLiteral( "point" ) << QStringLiteral( "point" ); QTest::newRow( "another suffix" ) << QStringLiteral( "another suffix" ) << QStringLiteral( "another suffix" ); }