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 4, 2012
1 parent 8784981 commit 0353514
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 31 deletions.
16 changes: 8 additions & 8 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -284,7 +284,7 @@ void QgsLegend::removeGroup( int groupIndex )
void QgsLegend::removeLayers( QStringList theLayers )
{
QgsDebugMsg( "Entering." );
foreach (const QString &myId, theLayers)
foreach( const QString &myId, theLayers )
{
bool invLayerRemoved = false;

Expand Down Expand Up @@ -322,7 +322,7 @@ void QgsLegend::removeLayer( QString theLayer )
{
QStringList myList;
myList << theLayer;
removeLayers(myList);
removeLayers( myList );
}

void QgsLegend::mousePressEvent( QMouseEvent * e )
Expand Down Expand Up @@ -875,9 +875,9 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
if ( layers().count() > 0 ) myFirstLayerFlag = true;

//iteratively add the layers to the canvas
for (int i = 0; i < theLayerList.size(); ++i)
for ( int i = 0; i < theLayerList.size(); ++i )
{
QgsMapLayer * layer = theLayerList.at(i);
QgsMapLayer * layer = theLayerList.at( i );
QgsLegendLayer* llayer = new QgsLegendLayer( layer );
if ( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() )
{
Expand Down Expand Up @@ -928,11 +928,11 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )

updateMapCanvasLayerSet();
emit itemAdded( indexFromItem( llayer ) );
}
}
// first layer?
if ( myFirstLayerFlag )
{
QgsMapLayer * myFirstLayer = theLayerList.at(0);
QgsMapLayer * myFirstLayer = theLayerList.at( 0 );
if ( !mMapCanvas->mapRenderer()->hasCrsTransformEnabled() )
mMapCanvas->mapRenderer()->setDestinationCrs( myFirstLayer->crs() );
mMapCanvas->zoomToFullExtent();
Expand Down Expand Up @@ -1173,7 +1173,7 @@ void QgsLegend::removeGroup( QgsLegendGroup *lg )

if ( cl )
QgsMapLayerRegistry::instance()->removeMapLayers(
QStringList() << cl->layer()->id() );
QStringList() << cl->layer()->id() );
else if ( cg )
removeGroup( cg );

Expand Down Expand Up @@ -2422,7 +2422,7 @@ void QgsLegend::removeSelectedLayers()
if ( ll && ll->layer() )
{
QgsMapLayerRegistry::instance()->removeMapLayers(
QStringList() << ll->layer()->id() );
QStringList() << ll->layer()->id() );
continue;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/browser/qgsbrowser.cpp
Expand Up @@ -246,7 +246,7 @@ bool QgsBrowser::layerClicked( QgsLayerItem *item )
QgsDebugMsg( "Layer created" );

QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mLayer );
QList<QgsMapLayer *>() << mLayer );

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgspluginlayerregistry.cpp
Expand Up @@ -101,7 +101,7 @@ bool QgsPluginLayerRegistry::removePluginLayerType( QString typeName )
if ( pl->pluginLayerType() == typeName )
{
QgsMapLayerRegistry::instance()->removeMapLayers(
QStringList() << layer->id() );
QStringList() << layer->id() );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgswmsserver.cpp
Expand Up @@ -1428,7 +1428,7 @@ QStringList QgsWMSServer::layerSet( const QStringList &layersList,
{
layerKeys.push_front( theMapLayer->id() );
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << theMapLayer, false );
QList<QgsMapLayer *>() << theMapLayer, false );
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/georeferencer/qgsgeorefplugingui.cpp
Expand Up @@ -147,7 +147,7 @@ QgsGeorefPluginGui::~QgsGeorefPluginGui()
if ( mLayer )
{
QgsMapLayerRegistry::instance()->removeMapLayers(
(QStringList() << mLayer->id()), false );
( QStringList() << mLayer->id() ), false );
}

delete mToolZoomIn;
Expand Down Expand Up @@ -253,7 +253,7 @@ void QgsGeorefPluginGui::openRaster()
//delete any old rasterlayers
if ( mLayer )
QgsMapLayerRegistry::instance()->removeMapLayers(
QStringList() << mLayer->id(), false );
QStringList() << mLayer->id(), false );

// Add raster
addRaster( mRasterFileName );
Expand Down Expand Up @@ -1042,7 +1042,7 @@ void QgsGeorefPluginGui::addRaster( QString file )

// so layer is not added to legend
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mLayer, false );
QList<QgsMapLayer *>() << mLayer, false );

// add layer to map canvas
QList<QgsMapCanvasLayer> layers;
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/offline_editing/offline_editing.cpp
Expand Up @@ -183,7 +183,7 @@ void QgsOfflineEditing::synchronize( QgsLegendInterface* legendInterface )

// register this layer with the central layers registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << remoteLayer, true );
QList<QgsMapLayer *>() << remoteLayer, true );

// apply layer edit log
QString qgisLayerId = layer->id();
Expand Down Expand Up @@ -235,7 +235,7 @@ void QgsOfflineEditing::synchronize( QgsLegendInterface* legendInterface )

// remove offline layer
QgsMapLayerRegistry::instance()->removeMapLayers(
(QStringList() << qgisLayerId), true );
( QStringList() << qgisLayerId ), true );

// disable offline project
QString projectTitle = QgsProject::instance()->title();
Expand Down Expand Up @@ -498,7 +498,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con

// register this layer with the central layers registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << newLayer );
QList<QgsMapLayer *>() << newLayer );

if ( hasLabels )
{
Expand Down Expand Up @@ -571,7 +571,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con

// remove remote layer
QgsMapLayerRegistry::instance()->removeMapLayers(
QStringList() << layer->id() );
QStringList() << layer->id() );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/spatialquery/qgsspatialquerydialog.cpp
Expand Up @@ -299,7 +299,7 @@ bool QgsSpatialQueryDialog::addLayerSubset( QString name, QString subset )
return false;
}
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << addLyr );
QList<QgsMapLayer *>() << addLyr );
return true;
} // bool QgsSpatialQueryDialog::addLayerSubset( QString name, QString subset )

Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsmaprenderer.cpp
Expand Up @@ -167,7 +167,7 @@ void TestQgsMapRenderer::initTestCase()
myPolyFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpPolysLayer );
QList<QgsMapLayer *>() << mpPolysLayer );
// add the test layer to the maprender
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
Expand Down
8 changes: 4 additions & 4 deletions tests/src/core/testqgsrasterlayer.cpp
Expand Up @@ -91,9 +91,9 @@ void TestQgsRasterLayer::initTestCase()
myLandsatRasterFileInfo.completeBaseName() );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpRasterLayer );
QList<QgsMapLayer *>() << mpRasterLayer );
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpLandsatRasterLayer );
QList<QgsMapLayer *>() << mpLandsatRasterLayer );
// add the test layer to the maprender
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
Expand Down Expand Up @@ -240,9 +240,9 @@ void TestQgsRasterLayer::registry()
myRasterFileInfo.completeBaseName() );

QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mypLayer, false );
QList<QgsMapLayer *>() << mypLayer, false );
QgsMapLayerRegistry::instance()->removeMapLayers(
QStringList() << mypLayer->id() );
QStringList() << mypLayer->id() );
//cleanup
//delete mypLayer;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/src/core/testqgsrenderers.cpp
Expand Up @@ -91,7 +91,7 @@ void TestQgsRenderers::initTestCase()
myPointFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpPointsLayer );
QList<QgsMapLayer *>() << mpPointsLayer );

//
//create a poly layer that will be used in all tests...
Expand All @@ -102,7 +102,7 @@ void TestQgsRenderers::initTestCase()
myPolyFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpPolysLayer );
QList<QgsMapLayer *>() << mpPolysLayer );


//
Expand All @@ -114,7 +114,7 @@ void TestQgsRenderers::initTestCase()
myLineFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpLinesLayer );
QList<QgsMapLayer *>() << mpLinesLayer );
//
// We only need maprender instead of mapcanvas
// since maprender does not require a qui
Expand Down
8 changes: 4 additions & 4 deletions tests/src/core/testqgsvectorlayer.cpp
Expand Up @@ -82,7 +82,7 @@ class TestQgsVectorLayer: public QObject
myDbfFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpNonSpatialLayer );
QList<QgsMapLayer *>() << mpNonSpatialLayer );
//
//create a point layer that will be used in all tests...
//
Expand All @@ -92,7 +92,7 @@ class TestQgsVectorLayer: public QObject
myPointFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpPointsLayer );
QList<QgsMapLayer *>() << mpPointsLayer );

//
//create a poly layer that will be used in all tests...
Expand All @@ -103,7 +103,7 @@ class TestQgsVectorLayer: public QObject
myPolyFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpPolysLayer );
QList<QgsMapLayer *>() << mpPolysLayer );


//
Expand All @@ -115,7 +115,7 @@ class TestQgsVectorLayer: public QObject
myLineFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpLinesLayer );
QList<QgsMapLayer *>() << mpLinesLayer );
//
// We only need maprender instead of mapcanvas
// since maprender does not require a qui
Expand Down

0 comments on commit 0353514

Please sign in to comment.