diff --git a/python/core/qgsdatadefined.sip b/python/core/qgsdatadefined.sip index 08078260764..5310c0ba3f5 100644 --- a/python/core/qgsdatadefined.sip +++ b/python/core/qgsdatadefined.sip @@ -57,7 +57,7 @@ class QgsDataDefined // @note not available in python bindings //QMap< QString, QString > toMap(); - + /**Returns a DOM element containing the properties of the data defined container. * @param DOM document * @param elementName name for DOM element @@ -75,7 +75,7 @@ class QgsDataDefined * @see toXmlElement */ bool setFromXmlElement( const QDomElement& element ); - + bool operator==( const QgsDataDefined &other ) const; bool operator!=( const QgsDataDefined &other ) const; diff --git a/python/plugins/db_manager/dlg_sql_window.py b/python/plugins/db_manager/dlg_sql_window.py index 3b7f90917b8..2a8f8f4d212 100644 --- a/python/plugins/db_manager/dlg_sql_window.py +++ b/python/plugins/db_manager/dlg_sql_window.py @@ -130,13 +130,13 @@ class DlgSqlWindow(QDialog, Ui_Dialog): self.editSql.setFocus() def executeSql(self): - + sql = "" if self.editSql.hasSelectedText(): sql = self.editSql.selectedText() else: sql = self.editSql.text() - + if sql == "": return diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index 2de795b053e..3edcbb08099 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -153,7 +153,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow /** Returns and adjusted uri for the layer based on current and available CRS as well as the last selected image format * @note added in 2.4 */ - QString crsAndFormatAdjustedLayerUri(const QString& uri, const QStringList& supportedCrs, const QStringList& supportedFormats) const; + QString crsAndFormatAdjustedLayerUri( const QString& uri, const QStringList& supportedCrs, const QStringList& supportedFormats ) const; /** Add a 'pre-made' map layer to the project */ void addMapLayer( QgsMapLayer *theMapLayer ); diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index fb6a86165e6..f3348592ed6 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -66,7 +66,7 @@ QgisAppInterface::QgisAppInterface( QgisApp * _qgis ) connect( qgis, SIGNAL( projectRead() ), this, SIGNAL( projectRead() ) ); connect( qgis, SIGNAL( layerSavedAs( QgsMapLayer*, QString ) ), - this, SIGNAL( layerSavedAs(QgsMapLayer*, QString ) ) ); + this, SIGNAL( layerSavedAs( QgsMapLayer*, QString ) ) ); } QgisAppInterface::~QgisAppInterface() diff --git a/src/app/qgsadvanceddigitizingcanvasitem.h b/src/app/qgsadvanceddigitizingcanvasitem.h index 04443d014fd..9ebe64ef331 100644 --- a/src/app/qgsadvanceddigitizingcanvasitem.h +++ b/src/app/qgsadvanceddigitizingcanvasitem.h @@ -28,7 +28,7 @@ class QgsAdvancedDigitizingDockWidget; class APP_EXPORT QgsAdvancedDigitizingCanvasItem : public QgsMapCanvasItem { public: - explicit QgsAdvancedDigitizingCanvasItem(QgsMapCanvas* canvas, QgsAdvancedDigitizingDockWidget* cadDockWidget ); + explicit QgsAdvancedDigitizingCanvasItem( QgsMapCanvas* canvas, QgsAdvancedDigitizingDockWidget* cadDockWidget ); void paint( QPainter *painter ); diff --git a/src/astyle/ASBeautifier.cpp b/src/astyle/ASBeautifier.cpp index d85a0474140..f7e76f13a91 100644 --- a/src/astyle/ASBeautifier.cpp +++ b/src/astyle/ASBeautifier.cpp @@ -636,7 +636,7 @@ string ASBeautifier::beautify(const string &originalLine) { string line; bool isInLineComment = false; - bool lineStartsInComment = false; + bool lineStartsInComment; bool isInClass = false; bool isInSwitch = false; bool isImmediatelyAfterConst = false; diff --git a/src/core/qgsexpression.cpp b/src/core/qgsexpression.cpp index d42118d237f..62d627e6a2b 100644 --- a/src/core/qgsexpression.cpp +++ b/src/core/qgsexpression.cpp @@ -1370,13 +1370,15 @@ static QVariant fcnIf( const QVariantList &values, const QgsFeature *f, QgsExpre ENSURE_NO_EVAL_ERROR; QVariant value = node->eval( parent, f ); ENSURE_NO_EVAL_ERROR; - if ( value.toBool() ) { + if ( value.toBool() ) + { node = getNode( values.at( 1 ), parent ); ENSURE_NO_EVAL_ERROR; value = node->eval( parent, f ); ENSURE_NO_EVAL_ERROR; } - else { + else + { node = getNode( values.at( 2 ), parent ); ENSURE_NO_EVAL_ERROR; value = node->eval( parent, f ); @@ -2565,15 +2567,17 @@ QVariant QgsExpression::NodeFunction::eval( QgsExpression* parent, const QgsFeat foreach ( Node* n, mArgs->list() ) { QVariant v; - if ( fd->lazyEval() ) { + if ( fd->lazyEval() ) + { // Pass in the node for the function to eval as it needs. v = QVariant::fromValue( n ); } - else { + else + { v = n->eval( parent, f ); ENSURE_NO_EVAL_ERROR; if ( isNull( v ) && fd->name() != "coalesce" ) - return QVariant(); // all "normal" functions return NULL, when any parameter is NULL (so coalesce is abnormal) + return QVariant(); // all "normal" functions return NULL, when any parameter is NULL (so coalesce is abnormal) } argValues.append( v ); } diff --git a/src/core/qgslogger.cpp b/src/core/qgslogger.cpp index 3e72fe7e2b2..5fc7c45198d 100644 --- a/src/core/qgslogger.cpp +++ b/src/core/qgslogger.cpp @@ -26,7 +26,7 @@ #include "qgsconfig.h" #ifndef CMAKE_SOURCE_DIR -#error CMAKE_SOURCE_DIR undefinied +#error CMAKE_SOURCE_DIR undefined #endif // CMAKE_SOURCE_DIR int QgsLogger::sDebugLevel = -999; // undefined value diff --git a/src/core/qgsmapsettings.cpp b/src/core/qgsmapsettings.cpp index ae3fd65adfd..db197458b20 100644 --- a/src/core/qgsmapsettings.cpp +++ b/src/core/qgsmapsettings.cpp @@ -166,7 +166,7 @@ void QgsMapSettings::updateDerived() visibleExtent().center().y(), outputSize().width(), outputSize().height(), - mRotation); + mRotation ); #if 1 // set visible extent taking rotation in consideration if ( mRotation ) diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp index 16c27e3b1b5..804b5f857a4 100644 --- a/src/core/qgspallabeling.cpp +++ b/src/core/qgspallabeling.cpp @@ -4127,18 +4127,20 @@ void QgsPalLabeling::drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* p #if 1 // TODO: generalize some of this double w = lp->getWidth(); double h = lp->getHeight(); - double cx = lp->getX() + w/2.0; - double cy = lp->getY() + h/2.0; - double scale = 1.0/xform->mapUnitsPerPixel(); + double cx = lp->getX() + w / 2.0; + double cy = lp->getY() + h / 2.0; + double scale = 1.0 / xform->mapUnitsPerPixel(); double rotation = xform->mapRotation(); double sw = w * scale; double sh = h * scale; - QRectF rect( -sw/2, -sh/2, sw, sh ); + QRectF rect( -sw / 2, -sh / 2, sw, sh ); - painter->translate( xform->transform( QPointF(cx, cy) ).toQPointF() ); - if ( rotation ) { + painter->translate( xform->transform( QPointF( cx, cy ) ).toQPointF() ); + if ( rotation ) + { // Only if not horizontal - if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ ) { + if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ ) + { painter->rotate( rotation ); } } @@ -4204,7 +4206,7 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con } else if ( drawType == QgsPalLabeling::LabelBuffer - || drawType == QgsPalLabeling::LabelText ) + || drawType == QgsPalLabeling::LabelText ) { // TODO: optimize access :) @@ -4290,17 +4292,19 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con LabelPosition* lp = label; double w = lp->getWidth(); double h = lp->getHeight(); - double cx = lp->getX() + w/2.0; - double cy = lp->getY() + h/2.0; - double scale = 1.0/xform->mapUnitsPerPixel(); + double cx = lp->getX() + w / 2.0; + double cy = lp->getY() + h / 2.0; + double scale = 1.0 / xform->mapUnitsPerPixel(); double rotation = xform->mapRotation(); double sw = w * scale; double sh = h * scale; - QRectF rect( -sw/2, -sh/2, sw, sh ); - painter->translate( xform->transform( QPointF(cx, cy) ).toQPointF() ); - if ( rotation ) { + QRectF rect( -sw / 2, -sh / 2, sw, sh ); + painter->translate( xform->transform( QPointF( cx, cy ) ).toQPointF() ); + if ( rotation ) + { // Only if not horizontal - if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ ) { + if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ ) + { painter->rotate( rotation ); } } diff --git a/src/core/qgssnapper.cpp b/src/core/qgssnapper.cpp index c2657f0eae1..8c72333c896 100644 --- a/src/core/qgssnapper.cpp +++ b/src/core/qgssnapper.cpp @@ -44,11 +44,11 @@ QgsSnapper::~QgsSnapper() int QgsSnapper::snapPoint( const QPoint& startPoint, QList& snappingResult, const QList& excludePoints ) { QgsPoint mapCoordPoint = mMapSettings.mapToPixel().toMapCoordinates( startPoint.x(), startPoint.y() ); - return snapPoint( mapCoordPoint, snappingResult, excludePoints); + return snapPoint( mapCoordPoint, snappingResult, excludePoints ); } int QgsSnapper::snapPoint( const QgsPoint& mapCoordPoint, QList& snappingResult, const QList& excludePoints ) - { +{ snappingResult.clear(); QMultiMap snappingResultList;//all snapping results diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp index 9fe1beb5f82..9bfa69720e1 100644 --- a/src/gui/qgsmapcanvas.cpp +++ b/src/gui/qgsmapcanvas.cpp @@ -726,9 +726,9 @@ void QgsMapCanvas::rendererJobFinished() // This is an hack to pass QgsMapCanvasItem::setRect what it // expects (encoding of position and size of the item) const QgsMapToPixel& m2p = mSettings.mapToPixel(); - QgsPoint topLeft = m2p.toMapPoint(0,0); + QgsPoint topLeft = m2p.toMapPoint( 0, 0 ); double res = m2p.mapUnitsPerPixel(); - QgsRectangle rect(topLeft.x(), topLeft.y(), topLeft.x() + img.width()*res, topLeft.y() - img.height()*res); + QgsRectangle rect( topLeft.x(), topLeft.y(), topLeft.x() + img.width()*res, topLeft.y() - img.height()*res ); mMap->setContent( img, rect ); } diff --git a/src/gui/qgsmapcanvasitem.cpp b/src/gui/qgsmapcanvasitem.cpp index b92ecf1cbd2..363b3b19afd 100644 --- a/src/gui/qgsmapcanvasitem.cpp +++ b/src/gui/qgsmapcanvasitem.cpp @@ -83,10 +83,10 @@ void QgsMapCanvasItem::setRect( const QgsRectangle& rect ) { // rect encodes origin of the item (xMin,yMax from map to canvas units) // and size (rect size / map units per pixel) - r.setTopLeft( toCanvasCoordinates( QPointF(mRect.xMinimum(), mRect.yMaximum()) ) ); + r.setTopLeft( toCanvasCoordinates( QPointF( mRect.xMinimum(), mRect.yMaximum() ) ) ); const QgsMapToPixel* m2p = mMapCanvas->getCoordinateTransform(); double res = m2p->mapUnitsPerPixel(); - r.setSize( QSizeF(mRect.width()/res, mRect.height()/res) ); + r.setSize( QSizeF( mRect.width() / res, mRect.height() / res ) ); } // set position in canvas where the item will have coordinate (0,0) diff --git a/src/gui/qgsmapcanvassnapper.cpp b/src/gui/qgsmapcanvassnapper.cpp index 028208c58e4..86d06b43016 100644 --- a/src/gui/qgsmapcanvassnapper.cpp +++ b/src/gui/qgsmapcanvassnapper.cpp @@ -117,7 +117,7 @@ int QgsMapCanvasSnapper::snapToCurrentLayer( const QPoint& p, QList& results, const QList& excludePoints ) { const QgsPoint mapCoordPoint = mMapCanvas->mapSettings().mapToPixel().toMapCoordinates( p.x(), p.y() ); - return snapToBackgroundLayers(mapCoordPoint,results,excludePoints); + return snapToBackgroundLayers( mapCoordPoint, results, excludePoints ); } int QgsMapCanvasSnapper::snapToBackgroundLayers( const QgsPoint& point, QList& results, const QList& excludePoints ) diff --git a/src/providers/grass/qgis.g.info.c b/src/providers/grass/qgis.g.info.c index b84ce43f8ee..c976f057186 100644 --- a/src/providers/grass/qgis.g.info.c +++ b/src/providers/grass/qgis.g.info.c @@ -212,7 +212,7 @@ int main( int argc, char **argv ) G_get_cellhd( rast_opt->answer, "", &window ); G_set_window( &window ); fd = G_open_cell_old( rast_opt->answer, "" ); - // wait for coors from stdin + // wait for coords from stdin while ( fgets( buff, 100, stdin ) != 0 ) { if ( sscanf( buff, "%lf%lf", &x, &y ) != 2 ) diff --git a/tests/src/analysis/testqgsvectoranalyzer.cpp b/tests/src/analysis/testqgsvectoranalyzer.cpp index be7d4342cc0..a8a805e991f 100644 --- a/tests/src/analysis/testqgsvectoranalyzer.cpp +++ b/tests/src/analysis/testqgsvectoranalyzer.cpp @@ -19,7 +19,7 @@ Email : sherman at mrcc dot com #include #include -class TestQgsVectorAnalyzer: public QObject +class TestQgsVectorAnalyzer : public QObject { Q_OBJECT private slots: diff --git a/tests/src/analysis/testqgszonalstatistics.cpp b/tests/src/analysis/testqgszonalstatistics.cpp index 054744a1558..c34498e26f5 100644 --- a/tests/src/analysis/testqgszonalstatistics.cpp +++ b/tests/src/analysis/testqgszonalstatistics.cpp @@ -23,7 +23,7 @@ /** \ingroup UnitTests * This is a unit test for the zonal statistics class */ -class TestQgsZonalStatistics: public QObject +class TestQgsZonalStatistics : public QObject { Q_OBJECT private slots: diff --git a/tests/src/app/testqgisappclipboard.cpp b/tests/src/app/testqgisappclipboard.cpp index 501685e5356..a4653bf4a56 100644 --- a/tests/src/app/testqgisappclipboard.cpp +++ b/tests/src/app/testqgisappclipboard.cpp @@ -33,7 +33,7 @@ /** \ingroup UnitTests * This is a unit test for the QgisApp clipboard. */ -class TestQgisAppClipboard: public QObject +class TestQgisAppClipboard : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/regression992.cpp b/tests/src/core/regression992.cpp index 9d99b96f8a3..0fc7f4c2cbd 100644 --- a/tests/src/core/regression992.cpp +++ b/tests/src/core/regression992.cpp @@ -40,7 +40,7 @@ /** \ingroup UnitTests * This is a regression test for ticket #992. */ -class Regression992: public QObject +class Regression992 : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsatlascomposition.cpp b/tests/src/core/testqgsatlascomposition.cpp index e4ed564b32a..af5cccd4804 100644 --- a/tests/src/core/testqgsatlascomposition.cpp +++ b/tests/src/core/testqgsatlascomposition.cpp @@ -33,7 +33,7 @@ #include #include -class TestQgsAtlasComposition: public QObject +class TestQgsAtlasComposition : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsblendmodes.cpp b/tests/src/core/testqgsblendmodes.cpp index a543a21638f..ecb88d666fa 100644 --- a/tests/src/core/testqgsblendmodes.cpp +++ b/tests/src/core/testqgsblendmodes.cpp @@ -35,7 +35,7 @@ /** \ingroup UnitTests * This is a unit test for layer blend modes */ -class TestQgsBlendModes: public QObject +class TestQgsBlendModes : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerdd.cpp b/tests/src/core/testqgscomposerdd.cpp index f13589888c3..7c39eba8006 100644 --- a/tests/src/core/testqgscomposerdd.cpp +++ b/tests/src/core/testqgscomposerdd.cpp @@ -32,7 +32,7 @@ #include #include -class TestQgsComposerDD: public QObject +class TestQgsComposerDD : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposereffects.cpp b/tests/src/core/testqgscomposereffects.cpp index 64450b078e5..aee919112ee 100644 --- a/tests/src/core/testqgscomposereffects.cpp +++ b/tests/src/core/testqgscomposereffects.cpp @@ -25,7 +25,7 @@ #include #include -class TestQgsComposerEffects: public QObject +class TestQgsComposerEffects : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposergroup.cpp b/tests/src/core/testqgscomposergroup.cpp index fe0717d2aa1..2d01806d943 100644 --- a/tests/src/core/testqgscomposergroup.cpp +++ b/tests/src/core/testqgscomposergroup.cpp @@ -22,7 +22,7 @@ #include #include -class TestQgsComposerGroup: public QObject +class TestQgsComposerGroup : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerhtml.cpp b/tests/src/core/testqgscomposerhtml.cpp index 74981760b2a..9594b65f5e2 100644 --- a/tests/src/core/testqgscomposerhtml.cpp +++ b/tests/src/core/testqgscomposerhtml.cpp @@ -24,7 +24,7 @@ #include #include -class TestQgsComposerHtml: public QObject +class TestQgsComposerHtml : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerlabel.cpp b/tests/src/core/testqgscomposerlabel.cpp index f60c671c248..e742754f6e2 100644 --- a/tests/src/core/testqgscomposerlabel.cpp +++ b/tests/src/core/testqgscomposerlabel.cpp @@ -26,7 +26,7 @@ #include #include -class TestQgsComposerLabel: public QObject +class TestQgsComposerLabel : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposermap.cpp b/tests/src/core/testqgscomposermap.cpp index 78b859ad5bf..42552beabfd 100644 --- a/tests/src/core/testqgscomposermap.cpp +++ b/tests/src/core/testqgscomposermap.cpp @@ -26,7 +26,7 @@ #include #include -class TestQgsComposerMap: public QObject +class TestQgsComposerMap : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposermapgrid.cpp b/tests/src/core/testqgscomposermapgrid.cpp index df02c5c19e1..9c808b2a01c 100644 --- a/tests/src/core/testqgscomposermapgrid.cpp +++ b/tests/src/core/testqgscomposermapgrid.cpp @@ -26,7 +26,7 @@ #include #include -class TestQgsComposerMapGrid: public QObject +class TestQgsComposerMapGrid : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposermapoverview.cpp b/tests/src/core/testqgscomposermapoverview.cpp index 003c8b66e7a..0fe3174bb78 100644 --- a/tests/src/core/testqgscomposermapoverview.cpp +++ b/tests/src/core/testqgscomposermapoverview.cpp @@ -28,7 +28,7 @@ #include #include -class TestQgsComposerMapOverview: public QObject +class TestQgsComposerMapOverview : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposermodel.cpp b/tests/src/core/testqgscomposermodel.cpp index 9ccd1d95420..af81c41fed0 100644 --- a/tests/src/core/testqgscomposermodel.cpp +++ b/tests/src/core/testqgscomposermodel.cpp @@ -22,7 +22,7 @@ #include #include -class TestQgsComposerModel: public QObject +class TestQgsComposerModel : public QObject { Q_OBJECT diff --git a/tests/src/core/testqgscomposermultiframe.cpp b/tests/src/core/testqgscomposermultiframe.cpp index 8fcb3101512..b0da8e3098c 100644 --- a/tests/src/core/testqgscomposermultiframe.cpp +++ b/tests/src/core/testqgscomposermultiframe.cpp @@ -23,7 +23,7 @@ #include #include -class TestQgsComposerMultiFrame: public QObject +class TestQgsComposerMultiFrame : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerobject.cpp b/tests/src/core/testqgscomposerobject.cpp index 1a4cb2ca2d2..07df0be1c36 100644 --- a/tests/src/core/testqgscomposerobject.cpp +++ b/tests/src/core/testqgscomposerobject.cpp @@ -22,7 +22,7 @@ #include #include -class TestQgsComposerObject: public QObject +class TestQgsComposerObject : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerpaper.cpp b/tests/src/core/testqgscomposerpaper.cpp index 76d1b563426..6e361e87de4 100644 --- a/tests/src/core/testqgscomposerpaper.cpp +++ b/tests/src/core/testqgscomposerpaper.cpp @@ -29,7 +29,7 @@ #include #include -class TestQgsComposerPaper: public QObject +class TestQgsComposerPaper : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerpicture.cpp b/tests/src/core/testqgscomposerpicture.cpp index 975eae70d6d..0fd78135b4a 100644 --- a/tests/src/core/testqgscomposerpicture.cpp +++ b/tests/src/core/testqgscomposerpicture.cpp @@ -24,7 +24,7 @@ #include #include -class TestQgsComposerPicture: public QObject +class TestQgsComposerPicture : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerrotation.cpp b/tests/src/core/testqgscomposerrotation.cpp index 3505921b4fc..55454073541 100644 --- a/tests/src/core/testqgscomposerrotation.cpp +++ b/tests/src/core/testqgscomposerrotation.cpp @@ -31,7 +31,7 @@ #include #include -class TestQgsComposerRotation: public QObject +class TestQgsComposerRotation : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerscalebar.cpp b/tests/src/core/testqgscomposerscalebar.cpp index 95b61fe6a20..00952ac858a 100644 --- a/tests/src/core/testqgscomposerscalebar.cpp +++ b/tests/src/core/testqgscomposerscalebar.cpp @@ -28,7 +28,7 @@ #include #include -class TestQgsComposerScaleBar: public QObject +class TestQgsComposerScaleBar : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposershapes.cpp b/tests/src/core/testqgscomposershapes.cpp index e8b3491d77e..a9f6d767695 100644 --- a/tests/src/core/testqgscomposershapes.cpp +++ b/tests/src/core/testqgscomposershapes.cpp @@ -28,7 +28,7 @@ #include #include -class TestQgsComposerShapes: public QObject +class TestQgsComposerShapes : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposertable.cpp b/tests/src/core/testqgscomposertable.cpp index a5ef4292fea..ee6eb1be038 100644 --- a/tests/src/core/testqgscomposertable.cpp +++ b/tests/src/core/testqgscomposertable.cpp @@ -28,7 +28,7 @@ #include #include -class TestQgsComposerTable: public QObject +class TestQgsComposerTable : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposertablev2.cpp b/tests/src/core/testqgscomposertablev2.cpp index 8dabb321fbd..d15ae112d15 100644 --- a/tests/src/core/testqgscomposertablev2.cpp +++ b/tests/src/core/testqgscomposertablev2.cpp @@ -34,7 +34,7 @@ #include #include -class TestQgsComposerTableV2: public QObject +class TestQgsComposerTableV2 : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposerutils.cpp b/tests/src/core/testqgscomposerutils.cpp index 30685794aac..547ae065888 100644 --- a/tests/src/core/testqgscomposerutils.cpp +++ b/tests/src/core/testqgscomposerutils.cpp @@ -25,7 +25,7 @@ #include #include -class TestQgsComposerUtils: public QObject +class TestQgsComposerUtils : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgscomposition.cpp b/tests/src/core/testqgscomposition.cpp index 487fb8a6eec..361b691cb01 100644 --- a/tests/src/core/testqgscomposition.cpp +++ b/tests/src/core/testqgscomposition.cpp @@ -27,7 +27,7 @@ #include #include -class TestQgsComposition: public QObject +class TestQgsComposition : public QObject { Q_OBJECT diff --git a/tests/src/core/testqgsdataitem.cpp b/tests/src/core/testqgsdataitem.cpp index 99ed200420c..c53397e3c6b 100644 --- a/tests/src/core/testqgsdataitem.cpp +++ b/tests/src/core/testqgsdataitem.cpp @@ -27,7 +27,7 @@ /** \ingroup UnitTests * This is a unit test for the QgsDataItem class. */ -class TestQgsDataItem: public QObject +class TestQgsDataItem : public QObject { Q_OBJECT diff --git a/tests/src/core/testqgsdiagram.cpp b/tests/src/core/testqgsdiagram.cpp index 40a62d79626..e4e405dae4f 100644 --- a/tests/src/core/testqgsdiagram.cpp +++ b/tests/src/core/testqgsdiagram.cpp @@ -47,7 +47,7 @@ /** \ingroup UnitTests * This is a unit test for the vector layer class. */ -class TestQgsDiagram: public QObject +class TestQgsDiagram : public QObject { Q_OBJECT private: diff --git a/tests/src/core/testqgsdiagramexpression.cpp b/tests/src/core/testqgsdiagramexpression.cpp index df11aa378f5..a7eb98cc3f2 100644 --- a/tests/src/core/testqgsdiagramexpression.cpp +++ b/tests/src/core/testqgsdiagramexpression.cpp @@ -47,7 +47,7 @@ /** \ingroup UnitTests * This is a unit test for the vector layer class. */ -class TestQgsDiagramExpression: public QObject +class TestQgsDiagramExpression : public QObject { Q_OBJECT private: diff --git a/tests/src/core/testqgsexpression.cpp b/tests/src/core/testqgsexpression.cpp index 7f2e93e46c9..1c06af1fff7 100644 --- a/tests/src/core/testqgsexpression.cpp +++ b/tests/src/core/testqgsexpression.cpp @@ -470,8 +470,8 @@ class TestQgsExpression: public QObject void eval_precedence() { - QCOMPARE(QgsExpression::BinaryOperatorText[QgsExpression::boDiv],"/"); - QCOMPARE(QgsExpression::BinaryOperatorText[QgsExpression::boConcat],"||"); + QCOMPARE( QgsExpression::BinaryOperatorText[QgsExpression::boDiv], "/" ); + QCOMPARE( QgsExpression::BinaryOperatorText[QgsExpression::boConcat], "||" ); QgsExpression e0( "1+2*3" ); QCOMPARE( e0.evaluate().toInt(), 7 ); diff --git a/tests/src/core/testqgsgeometry.cpp b/tests/src/core/testqgsgeometry.cpp index 0b68a117152..19b11099d90 100644 --- a/tests/src/core/testqgsgeometry.cpp +++ b/tests/src/core/testqgsgeometry.cpp @@ -38,7 +38,7 @@ /** \ingroup UnitTests * This is a unit test for the different geometry operations on vector features. */ -class TestQgsGeometry: public QObject +class TestQgsGeometry : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsgradients.cpp b/tests/src/core/testqgsgradients.cpp index 249964a6206..2997ec65098 100644 --- a/tests/src/core/testqgsgradients.cpp +++ b/tests/src/core/testqgsgradients.cpp @@ -40,7 +40,7 @@ /** \ingroup UnitTests * This is a unit test for gradient fill types. */ -class TestQgsGradients: public QObject +class TestQgsGradients : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsinvertedpolygonrenderer.cpp b/tests/src/core/testqgsinvertedpolygonrenderer.cpp index 3c1309f7362..4796cc5377f 100644 --- a/tests/src/core/testqgsinvertedpolygonrenderer.cpp +++ b/tests/src/core/testqgsinvertedpolygonrenderer.cpp @@ -36,7 +36,7 @@ /** \ingroup UnitTests * This is a unit test for the different renderers for vector layers. */ -class TestQgsInvertedPolygon: public QObject +class TestQgsInvertedPolygon : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsmaplayer.cpp b/tests/src/core/testqgsmaplayer.cpp index 066e76557d2..87d7dee2fd5 100644 --- a/tests/src/core/testqgsmaplayer.cpp +++ b/tests/src/core/testqgsmaplayer.cpp @@ -45,7 +45,7 @@ class TestSignalReceiver : public QObject /** \ingroup UnitTests * This is a unit test for the QgsMapLayer class. */ -class TestQgsMapLayer: public QObject +class TestQgsMapLayer : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsmaprenderer.cpp b/tests/src/core/testqgsmaprenderer.cpp index 8a80d100b39..ec51762796d 100644 --- a/tests/src/core/testqgsmaprenderer.cpp +++ b/tests/src/core/testqgsmaprenderer.cpp @@ -49,7 +49,7 @@ * It will do some performance testing too * */ -class TestQgsMapRenderer: public QObject +class TestQgsMapRenderer : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsmaptopixel.cpp b/tests/src/core/testqgsmaptopixel.cpp index 004e6a95bca..97d8694ba49 100644 --- a/tests/src/core/testqgsmaptopixel.cpp +++ b/tests/src/core/testqgsmaptopixel.cpp @@ -32,75 +32,75 @@ class TestQgsMapToPixel: public QObject void TestQgsMapToPixel::legacy() { - QgsMapToPixel m2p(2,10,-4,3); + QgsMapToPixel m2p( 2, 10, -4, 3 ); - QgsPoint p(0,0); // in geographical units - QgsPoint d = m2p.transform(p); // to device pixels + QgsPoint p( 0, 0 ); // in geographical units + QgsPoint d = m2p.transform( p ); // to device pixels QCOMPARE( d.x(), -1.5 ); QCOMPARE( d.y(), 8.0 ); QgsPoint b = m2p.toMapCoordinatesF( d.x(), d.y() ); // transform back QCOMPARE( p, b ); - m2p.transform(&p); // in place transform + m2p.transform( &p ); // in place transform QCOMPARE( p, d ); - m2p.setParameters(0.2, -10, 7, 20); + m2p.setParameters( 0.2, -10, 7, 20 ); p = m2p.toMapCoordinates( -1, -1 ); QCOMPARE( p.x(), -10.2 ); QCOMPARE( p.y(), 11.2 ); - d = m2p.transform(p); - QCOMPARE( d, QgsPoint(-1, -1) ); + d = m2p.transform( p ); + QCOMPARE( d, QgsPoint( -1, -1 ) ); p = m2p.toMapCoordinates( 20, 20 ); QCOMPARE( p.x(), -6.0 ); QCOMPARE( p.y(), 7.0 ); - d = m2p.transform(p); - QCOMPARE( d, QgsPoint(20, 20) ); + d = m2p.transform( p ); + QCOMPARE( d, QgsPoint( 20, 20 ) ); } void TestQgsMapToPixel::rotation() { - QgsMapToPixel m2p(1,5,5,10,10,90); + QgsMapToPixel m2p( 1, 5, 5, 10, 10, 90 ); - QgsPoint p(5,5); // in geographical units - QgsPoint d = m2p.transform(p); // to device pixels + QgsPoint p( 5, 5 ); // in geographical units + QgsPoint d = m2p.transform( p ); // to device pixels QCOMPARE( d.x(), 5.0 ); // center doesn't move QCOMPARE( d.y(), 5.0 ); QgsPoint b = m2p.toMapCoordinatesF( d.x(), d.y() ); // transform back QCOMPARE( p, b ); - m2p.transform(&p); // in place transform + m2p.transform( &p ); // in place transform QCOMPARE( p, d ); - m2p.setParameters(0.1,5,5,10,10,-90); + m2p.setParameters( 0.1, 5, 5, 10, 10, -90 ); p = m2p.toMapCoordinates( 5, 5 ); QCOMPARE( p.x(), 5.0 ); // center doesn't move QCOMPARE( p.y(), 5.0 ); - d = m2p.transform(p); - QCOMPARE( d, QgsPoint(5, 5) ); + d = m2p.transform( p ); + QCOMPARE( d, QgsPoint( 5, 5 ) ); p = m2p.toMapCoordinates( 10, 0 ); QCOMPARE( p.x(), 5.5 ); // corner scales and rotates QCOMPARE( p.y(), 4.5 ); - d = m2p.transform(p); - QCOMPARE( d, QgsPoint(10, 0) ); + d = m2p.transform( p ); + QCOMPARE( d, QgsPoint( 10, 0 ) ); - m2p.setParameters(0.1,5,5,10,10,360); + m2p.setParameters( 0.1, 5, 5, 10, 10, 360 ); p = m2p.toMapCoordinates( 10, 0 ); QCOMPARE( p.x(), 5.5 ); // corner scales QCOMPARE( p.y(), 5.5 ); - d = m2p.transform(p); - QCOMPARE( d, QgsPoint(10, 0) ); + d = m2p.transform( p ); + QCOMPARE( d, QgsPoint( 10, 0 ) ); - m2p.setParameters(0.1,5,5,10,10,0); + m2p.setParameters( 0.1, 5, 5, 10, 10, 0 ); p = m2p.toMapCoordinates( 10, 0 ); QCOMPARE( p.x(), 5.5 ); // corner scales QCOMPARE( p.y(), 5.5 ); - d = m2p.transform(p); - QCOMPARE( d, QgsPoint(10, 0) ); + d = m2p.transform( p ); + QCOMPARE( d, QgsPoint( 10, 0 ) ); } diff --git a/tests/src/core/testqgsnetworkcontentfetcher.cpp b/tests/src/core/testqgsnetworkcontentfetcher.cpp index 121964349aa..0e0c2f9ffa4 100644 --- a/tests/src/core/testqgsnetworkcontentfetcher.cpp +++ b/tests/src/core/testqgsnetworkcontentfetcher.cpp @@ -21,7 +21,7 @@ #include #include -class TestQgsNetworkContentFetcher: public QObject +class TestQgsNetworkContentFetcher : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsrasterfill.cpp b/tests/src/core/testqgsrasterfill.cpp index c982e5a7d68..ce0a97e01ec 100644 --- a/tests/src/core/testqgsrasterfill.cpp +++ b/tests/src/core/testqgsrasterfill.cpp @@ -39,7 +39,7 @@ /** \ingroup UnitTests * This is a unit test for raster fill types. */ -class TestQgsRasterFill: public QObject +class TestQgsRasterFill : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsrasterlayer.cpp b/tests/src/core/testqgsrasterlayer.cpp index d2ec473c635..6f5d60894ba 100644 --- a/tests/src/core/testqgsrasterlayer.cpp +++ b/tests/src/core/testqgsrasterlayer.cpp @@ -48,7 +48,7 @@ /** \ingroup UnitTests * This is a unit test for the QgsRasterLayer class. */ -class TestQgsRasterLayer: public QObject +class TestQgsRasterLayer : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsrastersublayer.cpp b/tests/src/core/testqgsrastersublayer.cpp index e07adea46d1..35010239c89 100644 --- a/tests/src/core/testqgsrastersublayer.cpp +++ b/tests/src/core/testqgsrastersublayer.cpp @@ -48,7 +48,7 @@ /** \ingroup UnitTests * This is a unit test for raster sublayers */ -class TestQgsRasterSubLayer: public QObject +class TestQgsRasterSubLayer : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsrenderers.cpp b/tests/src/core/testqgsrenderers.cpp index 9abe6119c7d..58ed489af59 100644 --- a/tests/src/core/testqgsrenderers.cpp +++ b/tests/src/core/testqgsrenderers.cpp @@ -36,7 +36,7 @@ /** \ingroup UnitTests * This is a unit test for the different renderers for vector layers. */ -class TestQgsRenderers: public QObject +class TestQgsRenderers : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsshapeburst.cpp b/tests/src/core/testqgsshapeburst.cpp index 218062d22c7..9c0bd5749f2 100644 --- a/tests/src/core/testqgsshapeburst.cpp +++ b/tests/src/core/testqgsshapeburst.cpp @@ -40,7 +40,7 @@ /** \ingroup UnitTests * This is a unit test for shapeburst fill types. */ -class TestQgsShapeburst: public QObject +class TestQgsShapeburst : public QObject { Q_OBJECT private slots: diff --git a/tests/src/core/testqgsstylev2.cpp b/tests/src/core/testqgsstylev2.cpp index 302defcdb78..c01be0b6ff3 100644 --- a/tests/src/core/testqgsstylev2.cpp +++ b/tests/src/core/testqgsstylev2.cpp @@ -31,7 +31,7 @@ /** \ingroup UnitTests * This is a unit test to verify that styles are working correctly */ -class TestStyleV2: public QObject +class TestStyleV2 : public QObject { Q_OBJECT diff --git a/tests/src/core/testqgsvectorlayer.cpp b/tests/src/core/testqgsvectorlayer.cpp index 5b6577814e5..7d325f99c0e 100644 --- a/tests/src/core/testqgsvectorlayer.cpp +++ b/tests/src/core/testqgsvectorlayer.cpp @@ -67,7 +67,7 @@ class TestSignalReceiver : public QObject /** \ingroup UnitTests * This is a unit test for the vector layer class. */ -class TestQgsVectorLayer: public QObject +class TestQgsVectorLayer : public QObject { Q_OBJECT private: diff --git a/tests/src/core/testqgsvectorlayercache.cpp b/tests/src/core/testqgsvectorlayercache.cpp index 0d33f259387..4093f19cb2d 100644 --- a/tests/src/core/testqgsvectorlayercache.cpp +++ b/tests/src/core/testqgsvectorlayercache.cpp @@ -31,7 +31,7 @@ * * @see QgsVectorLayerCache */ -class TestVectorLayerCache: public QObject +class TestVectorLayerCache : public QObject { Q_OBJECT diff --git a/tests/src/core/testqgsvectorlayerjoinbuffer.cpp b/tests/src/core/testqgsvectorlayerjoinbuffer.cpp index 3fea0c0960c..bbc13817c56 100644 --- a/tests/src/core/testqgsvectorlayerjoinbuffer.cpp +++ b/tests/src/core/testqgsvectorlayerjoinbuffer.cpp @@ -29,7 +29,7 @@ * * @see QgsVectorLayerJoinBuffer */ -class TestVectorLayerJoinBuffer: public QObject +class TestVectorLayerJoinBuffer : public QObject { Q_OBJECT diff --git a/tests/src/core/testziplayer.cpp b/tests/src/core/testziplayer.cpp index 2bd1d7959e9..72dd5017d2a 100644 --- a/tests/src/core/testziplayer.cpp +++ b/tests/src/core/testziplayer.cpp @@ -153,10 +153,10 @@ bool TestZipLayer::testZipItem( QString myFileName, QString myChildName, QString time.start(); while ( myZipItem->state() != QgsDataItem::Populated && time.elapsed() < 5000 ) { - QTest::qSleep ( 100 ); + QTest::qSleep( 100 ); QCoreApplication::processEvents(); } - QgsDebugMsg( QString( "time.elapsed() = %1 ms" ).arg ( time.elapsed() ) ); + QgsDebugMsg( QString( "time.elapsed() = %1 ms" ).arg( time.elapsed() ) ); bool ok = false; QString driverName; QVector myChildren = myZipItem->children(); diff --git a/tests/src/gui/testprojectionissues.cpp b/tests/src/gui/testprojectionissues.cpp index 9e57643c12e..96c46f8793e 100644 --- a/tests/src/gui/testprojectionissues.cpp +++ b/tests/src/gui/testprojectionissues.cpp @@ -24,7 +24,7 @@ #include #include -class TestProjectionIssues: public QObject +class TestProjectionIssues : public QObject { Q_OBJECT private slots: diff --git a/tests/src/gui/testqgsdualview.cpp b/tests/src/gui/testqgsdualview.cpp index fe207809a04..ecfaac2bfdf 100644 --- a/tests/src/gui/testqgsdualview.cpp +++ b/tests/src/gui/testqgsdualview.cpp @@ -24,7 +24,7 @@ #include #include -class TestQgsDualView: public QObject +class TestQgsDualView : public QObject { Q_OBJECT private slots: diff --git a/tests/src/gui/testqgsmaptoolzoom.cpp b/tests/src/gui/testqgsmaptoolzoom.cpp index 9b801da0f2a..2da9fe9948e 100644 --- a/tests/src/gui/testqgsmaptoolzoom.cpp +++ b/tests/src/gui/testqgsmaptoolzoom.cpp @@ -25,7 +25,7 @@ #include #include -class TestQgsMapToolZoom: public QObject +class TestQgsMapToolZoom : public QObject { Q_OBJECT private slots: diff --git a/tests/src/gui/testqgsquickprint.cpp b/tests/src/gui/testqgsquickprint.cpp index 2b6d15971e2..2cef76c17fb 100644 --- a/tests/src/gui/testqgsquickprint.cpp +++ b/tests/src/gui/testqgsquickprint.cpp @@ -36,7 +36,7 @@ /** \ingroup UnitTests * This is a unit test for the different renderers for vector layers. */ -class TestQgsQuickPrint: public QObject +class TestQgsQuickPrint : public QObject { Q_OBJECT private slots: