Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Apr 17, 2015
1 parent 213a22b commit d79268cbd756b6762bf8660274cfacc25da1df45
@@ -742,7 +742,7 @@ class QgsPalLabeling : QgsLabelingEngineInterface
bool isStoredWithProject() const /Deprecated/;
//! @deprecated since 2.4 - settings are always stored in project
void setStoredWithProject( bool store ) /Deprecated/;

/** Prepares a geometry for registration with PAL. Handles reprojection, rotation, clipping, etc.
* @param geometry geometry to prepare
* @param context render context
@@ -787,7 +787,7 @@ class QgsPalLabeling : QgsLabelingEngineInterface
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );

void deleteTemporaryData();

/** Checks whether a geometry exceeds the minimum required size for a geometry to be labeled.
* @param context render context
* @param geom geometry
@@ -71,7 +71,7 @@ class QgsGrassEditLayer : public QgsMapCanvasItem
virtual QRectF boundingRect() const override
{
return QRectF( 0, 0, mMapCanvas->width(), mMapCanvas->height() );
}
}

virtual void updatePosition() override
{
@@ -50,16 +50,16 @@ class TestQgsGrassProvider: public QObject

void vectorLayers();
private:
void reportRow(QString message);
void reportRow( QString message );
QString mGisdbase;
QString mLocation;
QString mReport;
};


void TestQgsGrassProvider::reportRow(QString message)
void TestQgsGrassProvider::reportRow( QString message )
{
mReport += message + "<br>";
mReport += message + "<br>";
}

//runs before all tests
@@ -75,7 +75,7 @@ void TestQgsGrassProvider::initTestCase()
//QgsApplication::initQgis();
QString mySettings = QgsApplication::showSettings();
mySettings = mySettings.replace( "\n", "<br />" );
mReport += QString("<h1>GRASS %1 provider tests</h1>\n").arg( GRASS_BUILD_VERSION );
mReport += QString( "<h1>GRASS %1 provider tests</h1>\n" ).arg( GRASS_BUILD_VERSION );
mReport += "<p>" + mySettings + "</p>";

QgsGrass::init();
@@ -106,40 +106,40 @@ void TestQgsGrassProvider::cleanupTestCase()

void TestQgsGrassProvider::vectorLayers()
{
QString mapset = QString("test%1").arg( GRASS_BUILD_VERSION );
QString mapset = QString( "test%1" ).arg( GRASS_BUILD_VERSION );
QString mapName = "test";
QStringList expectedLayers;
expectedLayers << "1_point" << "2_line" << "3_polygon";

reportRow("");
reportRow("QgsGrass::vectorLayers test");
reportRow("mapset: " + mapset);
reportRow("mapName: " + mapName);
reportRow("expectedLayers: " + expectedLayers.join(", "));
reportRow( "" );
reportRow( "QgsGrass::vectorLayers test" );
reportRow( "mapset: " + mapset );
reportRow( "mapName: " + mapName );
reportRow( "expectedLayers: " + expectedLayers.join( ", " ) );

bool ok = true;
G_TRY
{
QStringList layers = QgsGrass::vectorLayers(mGisdbase, mLocation, mapset, mapName);
reportRow("layers:" + layers.join(", "));
QStringList layers = QgsGrass::vectorLayers( mGisdbase, mLocation, mapset, mapName );
reportRow( "layers:" + layers.join( ", " ) );

foreach( QString expectedLayer, expectedLayers)
foreach ( QString expectedLayer, expectedLayers )
{
if ( !layers.contains(expectedLayer) )
if ( !layers.contains( expectedLayer ) )
{
ok = false;
reportRow("ERROR: expected layer '" + expectedLayer + "' missing");
reportRow( "ERROR: expected layer '" + expectedLayer + "' missing" );
}
}
}
G_CATCH( QgsGrass::Exception &e )
{
ok = false;
reportRow( QString("ERROR: %1").arg(e.what()) );
reportRow( QString( "ERROR: %1" ).arg( e.what() ) );
}

QVERIFY( ok );
reportRow("OK");
reportRow( "OK" );
}

QTEST_MAIN( TestQgsGrassProvider )

0 comments on commit d79268c

Please sign in to comment.
You can’t perform that action at this time.