Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 13, 2015
1 parent 0c0293e commit e225385
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 34 deletions.
4 changes: 2 additions & 2 deletions src/app/qgswelcomepageitemsmodel.cpp
Expand Up @@ -96,8 +96,8 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option,
if ( option.rect.width() < 450 )
{
width = 450;
}
else
}
else
{
width = option.rect.width();
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsnetworkaccessmanager.h
Expand Up @@ -102,7 +102,7 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
void requestAboutToBeCreated( QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice * );
void requestCreated( QNetworkReply * );
void requestTimedOut( QNetworkReply * );
/** Emited when request was sent by request()
/** Emitted when request was sent by request()
* @param reply request reply
* @param sender the object which called request() slot.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grass/qgsgrassmoduleoptions.cpp
Expand Up @@ -300,8 +300,8 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(

if ( mParams.size() == 0 )
{
QLabel *label = new QLabel(this);
label->setText( tr("This module has no options") );
QLabel *label = new QLabel( this );
label->setText( tr( "This module has no options" ) );
mypSimpleLayout->addWidget( label );
}

Expand Down
25 changes: 13 additions & 12 deletions src/plugins/grass/scripts/qgis.v.upgrade.py
Expand Up @@ -31,7 +31,7 @@
# AUTHOR(S): Radim Blazek
#
# PURPOSE: Upgrade all vectors from GRASS 6 to GRASS 7
#
#
# COPYRIGHT: (C) 2015 by Radim Blazek
#
# This program is free software under the GNU General Public
Expand All @@ -53,20 +53,21 @@
except:
raise Exception("Cannot find 'grass' Python module. Python is supported by GRASS from version >= 6.4")


def main():
# see https://grasswiki.osgeo.org/wiki/Convert_all_GRASS_6_vector_maps_to_GRASS_7
grass.message('Building topology')
if grass.run_command('v.build.all') != 0:
grass.warning('Cannot build topology')
# see https://grasswiki.osgeo.org/wiki/Convert_all_GRASS_6_vector_maps_to_GRASS_7
grass.message('Building topology')
if grass.run_command('v.build.all') != 0:
grass.warning('Cannot build topology')

grass.message('Creating new DB connection')
if grass.run_command('db.connect', flags='d') != 0:
grass.warning('Cannot create new DB connection')
return
grass.message('Creating new DB connection')
if grass.run_command('db.connect', flags='d') != 0:
grass.warning('Cannot create new DB connection')
return

grass.message('Transfering tables to the new DB')
if grass.run_command('v.db.reconnect.all', flags='cd') != 0:
grass.warning('Cannot transfer tables')
grass.message('Transfering tables to the new DB')
if grass.run_command('v.db.reconnect.all', flags='cd') != 0:
grass.warning('Cannot transfer tables')

if __name__ == "__main__":
options, flags = grass.parser()
Expand Down
2 changes: 1 addition & 1 deletion src/providers/grass/qgsgrassprovider.h
Expand Up @@ -398,7 +398,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider

signals:
// TODO: move to QGIS core?
// Emited when a fields was added/deleted so that other layers sharing the same layer
// Emitted when a fields was added/deleted so that other layers sharing the same layer
// may be updated
void fieldsChanged();

Expand Down
2 changes: 1 addition & 1 deletion src/providers/grass/qgsgrassvectormap.h
Expand Up @@ -149,7 +149,7 @@ class GRASS_LIB_EXPORT QgsGrassVectorMap : public QObject
/** Close all iterators. Connected to iterators in different threads with Qt::BlockingQueuedConnection */
void closeIterators();

/** Emited when data were reloaded */
/** Emitted when data were reloaded */
void dataChanged();

private:
Expand Down
4 changes: 2 additions & 2 deletions src/providers/grass/qgsgrassvectormaplayer.cpp
Expand Up @@ -994,8 +994,8 @@ bool QgsGrassVectorMapLayer::recordExists( int cat, QString &error )

// DBF driver in GRASS does not support count(*)
dbValue value;
int nValues = db_select_value(mDriver, mFieldInfo->table, mFieldInfo->key, cat, mFieldInfo->key, &value);
if ( nValues == -1)
int nValues = db_select_value( mDriver, mFieldInfo->table, mFieldInfo->key, cat, mFieldInfo->key, &value );
if ( nValues == -1 )
{
error = tr( "Cannot select record from table" );
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgsserverprojectparser.cpp
Expand Up @@ -1072,7 +1072,7 @@ QSet<QString> QgsServerProjectParser::findRestrictedLayers() const
}
}
}

// wmsLayerRestrictionValues contains LayerIDs
if ( mUseLayerIDs )
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgswmsserver.cpp
Expand Up @@ -1911,7 +1911,7 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const
mMapRenderer->addLayerCoordinateTransform( ltIt->first, t.srcAuthId, t.destAuthId, t.srcDatumTransform, t.destDatumTransform );
}
}

//then set destinationCrs
mMapRenderer->setDestinationCrs( outputCRS );
mMapRenderer->setProjectionsEnabled( true );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgssymbolv2.cpp
Expand Up @@ -447,7 +447,7 @@ void TestQgsSymbolV2::symbolProperties()
QgsSymbolLayerV2Utils::symbolProperties( fillSymbol2 ) );

//modify one of the symbols
fillSymbol2->symbolLayer(0)->setColor( QColor( 235, 135, 35 ) );
fillSymbol2->symbolLayer( 0 )->setColor( QColor( 235, 135, 35 ) );
QVERIFY( QgsSymbolLayerV2Utils::symbolProperties( fillSymbol ) !=
QgsSymbolLayerV2Utils::symbolProperties( fillSymbol2 ) );

Expand Down
20 changes: 10 additions & 10 deletions tests/src/providers/grass/testqgsgrassprovider.cpp
Expand Up @@ -1257,7 +1257,7 @@ bool TestQgsGrassProvider::compare( QList<QgsFeature> features, QList<QgsFeature

bool TestQgsGrassProvider::compare( QString uri, QgsGrassObject mapObject, QgsVectorLayer *expectedLayer, bool& ok )
{
Q_UNUSED(mapObject)
Q_UNUSED( mapObject )
QList<QgsFeature> expectedFeatures = getFeatures( expectedLayer );

// read the map using another layer/provider
Expand Down Expand Up @@ -1296,19 +1296,19 @@ bool TestQgsGrassProvider::compare( QString uri, QgsGrassObject mapObject, QgsVe
int result = Vect_open_old( map, mapObject.name().toUtf8().data(), mapObject.mapset().toUtf8().data() );

if ( result == -1 )
{
QgsGrass::vectDestroyMapStruct( map );
throw QgsGrass::Exception( "Cannot open map " + mapObject.name() );
}
{
QgsGrass::vectDestroyMapStruct( map );
throw QgsGrass::Exception( "Cannot open map " + mapObject.name() );
}

#if ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6
Vect_build( map );
Vect_build( map );
#else
Vect_build( map, stderr );
Vect_build( map, stderr );
#endif
//Vect_set_release_support( map );
Vect_close( map );
QgsGrass::vectDestroyMapStruct( map );
//Vect_set_release_support( map );
Vect_close( map );
QgsGrass::vectDestroyMapStruct( map );
}
G_CATCH( QgsGrass::Exception &e )
{
Expand Down

0 comments on commit e225385

Please sign in to comment.