diff --git a/src/app/qgswelcomepageitemsmodel.cpp b/src/app/qgswelcomepageitemsmodel.cpp index bdb427b3e51..a531ed5e760 100644 --- a/src/app/qgswelcomepageitemsmodel.cpp +++ b/src/app/qgswelcomepageitemsmodel.cpp @@ -96,8 +96,8 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option, if ( option.rect.width() < 450 ) { width = 450; - } - else + } + else { width = option.rect.width(); } diff --git a/src/core/qgsnetworkaccessmanager.h b/src/core/qgsnetworkaccessmanager.h index 078e579ee14..d00cc723180 100644 --- a/src/core/qgsnetworkaccessmanager.h +++ b/src/core/qgsnetworkaccessmanager.h @@ -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. */ diff --git a/src/plugins/grass/qgsgrassmoduleoptions.cpp b/src/plugins/grass/qgsgrassmoduleoptions.cpp index 625d343bacb..65f1bee927c 100644 --- a/src/plugins/grass/qgsgrassmoduleoptions.cpp +++ b/src/plugins/grass/qgsgrassmoduleoptions.cpp @@ -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 ); } diff --git a/src/plugins/grass/scripts/qgis.v.upgrade.py b/src/plugins/grass/scripts/qgis.v.upgrade.py index 028ddbb443a..e80e27ac1c9 100644 --- a/src/plugins/grass/scripts/qgis.v.upgrade.py +++ b/src/plugins/grass/scripts/qgis.v.upgrade.py @@ -31,7 +31,7 @@ __revision__ = '$Format:%H$' # 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 @@ -53,20 +53,21 @@ except ImportError: 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() diff --git a/src/providers/grass/qgsgrassprovider.h b/src/providers/grass/qgsgrassprovider.h index 404af3b7058..734648b02d6 100644 --- a/src/providers/grass/qgsgrassprovider.h +++ b/src/providers/grass/qgsgrassprovider.h @@ -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(); diff --git a/src/providers/grass/qgsgrassvectormap.h b/src/providers/grass/qgsgrassvectormap.h index b15cfe58461..3ce24306c27 100644 --- a/src/providers/grass/qgsgrassvectormap.h +++ b/src/providers/grass/qgsgrassvectormap.h @@ -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: diff --git a/src/providers/grass/qgsgrassvectormaplayer.cpp b/src/providers/grass/qgsgrassvectormaplayer.cpp index f2938be6830..6c6e0e1d140 100644 --- a/src/providers/grass/qgsgrassvectormaplayer.cpp +++ b/src/providers/grass/qgsgrassvectormaplayer.cpp @@ -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; diff --git a/src/server/qgsserverprojectparser.cpp b/src/server/qgsserverprojectparser.cpp index e20f36ac837..efc978800d0 100644 --- a/src/server/qgsserverprojectparser.cpp +++ b/src/server/qgsserverprojectparser.cpp @@ -1072,7 +1072,7 @@ QSet QgsServerProjectParser::findRestrictedLayers() const } } } - + // wmsLayerRestrictionValues contains LayerIDs if ( mUseLayerIDs ) { diff --git a/src/server/qgswmsserver.cpp b/src/server/qgswmsserver.cpp index f8c06b6c761..dc7742914ee 100644 --- a/src/server/qgswmsserver.cpp +++ b/src/server/qgswmsserver.cpp @@ -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 ); diff --git a/tests/src/core/testqgssymbolv2.cpp b/tests/src/core/testqgssymbolv2.cpp index 7f19f170f49..00085aff2f0 100644 --- a/tests/src/core/testqgssymbolv2.cpp +++ b/tests/src/core/testqgssymbolv2.cpp @@ -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 ) ); diff --git a/tests/src/providers/grass/testqgsgrassprovider.cpp b/tests/src/providers/grass/testqgsgrassprovider.cpp index 7ba4d7a8dca..005f98acf0a 100644 --- a/tests/src/providers/grass/testqgsgrassprovider.cpp +++ b/tests/src/providers/grass/testqgsgrassprovider.cpp @@ -1257,7 +1257,7 @@ bool TestQgsGrassProvider::compare( QList features, QList expectedFeatures = getFeatures( expectedLayer ); // read the map using another layer/provider @@ -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 ) {