Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
indentation update
  • Loading branch information
jef-n committed Apr 17, 2015
1 parent 213a22b commit d79268c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions python/core/qgspallabeling.sip
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrassedit.cpp
Expand Up @@ -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
{
Expand Down
34 changes: 17 additions & 17 deletions tests/src/providers/grass/testqgsgrassprovider.cpp
Expand Up @@ -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
Expand All @@ -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();
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit d79268c

Please sign in to comment.