Skip to content
Permalink
Browse files

fix all occurrences of multiple statements in a single line

This was accomplished by running scripts/astyle-all.sh.
  • Loading branch information
SebDieBln committed Dec 20, 2015
1 parent 95fa866 commit c28c493b657e530c7f88b045c208649d74f177f1
Showing with 1,582 additions and 659 deletions.
  1. +6 −3 src/analysis/interpolation/DualEdgeTriangulation.cc
  2. +8 −3 src/analysis/raster/qgsrastermatrix.cpp
  3. +3 −1 src/analysis/raster/qgsrelief.cpp
  4. +26 −12 src/analysis/vector/qgsgeometryanalyzer.cpp
  5. +20 −8 src/analysis/vector/qgstransectsample.cpp
  6. +4 −1 src/analysis/vector/qgszonalstatistics.cpp
  7. +4 −2 src/app/composer/qgscomposerpicturewidget.cpp
  8. +48 −16 src/app/qgisapp.cpp
  9. +2 −1 src/app/qgsconfigureshortcutsdialog.cpp
  10. +2 −1 src/app/qgsidentifyresultsdialog.cpp
  11. +8 −3 src/app/qgsmaptooladdcircularstring.cpp
  12. +6 −2 src/app/qgsmaptoolannotation.cpp
  13. +4 −1 src/app/qgsmaptoolcircularstringcurvepoint.cpp
  14. +7 −3 src/app/qgsmaptoolcircularstringradius.cpp
  15. +6 −3 src/app/qgsmaptoollabel.cpp
  16. +4 −2 src/app/qgsmaptooloffsetcurve.cpp
  17. +24 −12 src/app/qgsrulebasedlabelingwidget.cpp
  18. +9 −3 src/app/qgssnappingdialog.cpp
  19. +4 −2 src/core/composer/qgscomposerarrow.cpp
  20. +4 −2 src/core/composer/qgscomposermapgrid.cpp
  21. +41 −12 src/core/composer/qgscomposermousehandles.cpp
  22. +2 −1 src/core/diagram/qgstextdiagram.cpp
  23. +2 −1 src/core/geometry/qgsabstractgeometryv2.cpp
  24. +9 −3 src/core/geometry/qgscircularstringv2.cpp
  25. +4 −1 src/core/geometry/qgscompoundcurvev2.cpp
  26. +2 −1 src/core/geometry/qgscurvepolygonv2.cpp
  27. +2 −1 src/core/geometry/qgsgeometry.cpp
  28. +8 −3 src/core/geometry/qgsgeometrycollectionv2.cpp
  29. +14 −7 src/core/geometry/qgsgeometryeditutils.cpp
  30. +2 −1 src/core/geometry/qgsgeometryfactory.cpp
  31. +18 −6 src/core/geometry/qgsgeometryutils.cpp
  32. +4 −2 src/core/geometry/qgsgeos.cpp
  33. +5 −2 src/core/geometry/qgslinestringv2.cpp
  34. +4 −2 src/core/geometry/qgspointv2.cpp
  35. +2 −1 src/core/gps/gmath.c
  36. +2 −1 src/core/gps/tok.c
  37. +7 −3 src/core/layertree/qgslayertreeutils.cpp
  38. +2 −1 src/core/pal/labelposition.h
  39. +4 −2 src/core/pal/pointset.h
  40. +142 −71 src/core/qgis.cpp
  41. +14 −7 src/core/qgis.h
  42. +12 −4 src/core/qgsattributeaction.cpp
  43. +4 −2 src/core/qgsclipper.cpp
  44. +10 −5 src/core/qgscoordinatetransform.cpp
  45. +21 −7 src/core/qgsdataitem.cpp
  46. +124 −60 src/core/qgsexpression.cpp
  47. +48 −16 src/core/qgslabelingenginev2.cpp
  48. +12 −4 src/core/qgslabelsearchtree.cpp
  49. +11 −4 src/core/qgslegendrenderer.cpp
  50. +4 −2 src/core/qgsmaptopixel.cpp
  51. +50 −26 src/core/qgsmaptopixelgeometrysimplifier.cpp
  52. +2 −1 src/core/qgspallabeling.cpp
  53. +2 −1 src/core/qgspointlocator.cpp
  54. +6 −2 src/core/qgsrectangle.cpp
  55. +4 −2 src/core/qgssnappingutils.cpp
  56. +2 −1 src/core/qgsvectorlayer.cpp
  57. +8 −4 src/core/qgsvectorlayereditutils.cpp
  58. +88 −36 src/core/raster/qgscubicrasterresampler.cpp
  59. +64 −8 src/core/raster/qgscubicrasterresampler.h
  60. +6 −3 src/core/raster/qgsmultibandcolorrenderer.cpp
  61. +4 −2 src/core/raster/qgsrasterdataprovider.h
  62. +4 −2 src/core/raster/qgsrasterdrawer.cpp
  63. +7 −2 src/core/raster/qgsrasterfilewriter.cpp
  64. +2 −1 src/core/raster/qgsrasterprojector.h
  65. +4 −2 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  66. +4 −2 src/core/symbology-ng/qgslinesymbollayerv2.cpp
  67. +4 −2 src/core/symbology-ng/qgsrendererv2.cpp
  68. +112 −55 src/core/symbology-ng/qgssymbollayerv2utils.cpp
  69. +35 −13 src/core/symbology-ng/qgssymbolv2.cpp
  70. +4 −1 src/gui/qgsannotationitem.cpp
  71. +4 −2 src/gui/qgsmapcanvasmap.cpp
  72. +3 −1 src/gui/qgsmaptoolcapture.cpp
  73. +14 −7 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
  74. +10 −5 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  75. +20 −10 src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
  76. +2 −1 src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
  77. +12 −6 src/gui/symbology-ng/qgsstylev2managerdialog.cpp
  78. +8 −4 src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
  79. +4 −2 src/plugins/georeferencer/qgsgeorefplugingui.cpp
  80. +16 −8 src/plugins/georeferencer/qgsgeoreftransform.cpp
  81. +19 −7 src/plugins/georeferencer/qgsleastsquares.cpp
  82. +12 −4 src/plugins/gps_importer/qgsgpsplugin.cpp
  83. +56 −28 src/providers/gdal/qgsgdalproviderbase.cpp
  84. +36 −12 src/providers/gpx/qgsgpxprovider.cpp
  85. +8 −4 src/providers/grass/qgsgrassfeatureiterator.cpp
  86. +4 −1 src/providers/grass/qgsgrassrasterprovider.cpp
  87. +2 −1 src/providers/grass/qgsgrassvectormap.cpp
  88. +10 −3 src/providers/mssql/qgsmssqltablemodel.cpp
  89. +12 −4 src/providers/ogr/qgsogrfeatureiterator.cpp
  90. +10 −4 src/providers/ogr/qgsogrgeometrysimplifier.cpp
  91. +78 −28 src/providers/ogr/qgsogrprovider.cpp
  92. +15 −5 src/providers/spatialite/qgsspatialitedataitems.cpp
  93. +34 −17 src/providers/virtual/qgsvirtuallayerblob.cpp
  94. +12 −4 src/providers/wfs/qgswfssourceselect.cpp
  95. +4 −1 src/server/qgshttprequesthandler.cpp
  96. +2 −1 src/server/qgswcsprojectparser.cpp
  97. +4 −1 src/server/qgswcsserver.cpp
  98. +2 −1 src/server/qgswfsprojectparser.cpp
  99. +4 −1 src/server/qgswfsserver.cpp
  100. +9 −3 src/server/qgswmsconfigparser.cpp
  101. +9 −3 tests/src/core/testqgsrulebasedrenderer.cpp
@@ -1527,7 +1527,8 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )

//set the necessary nexts of leftPolygon(exept the first)
int actedgel = leftPolygon[1];
leftiter = leftPolygon.constBegin(); leftiter += 2;
leftiter = leftPolygon.constBegin();
leftiter += 2;
for ( ; leftiter != leftPolygon.constEnd(); ++leftiter )
{
mHalfEdge[actedgel]->setNext(( *leftiter ) );
@@ -1536,7 +1537,8 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )

//set all the necessary nexts of rightPolygon
int actedger = rightPolygon[1];
rightiter = rightPolygon.constBegin(); rightiter += 2;
rightiter = rightPolygon.constBegin();
rightiter += 2;
for ( ; rightiter != rightPolygon.constEnd(); ++rightiter )
{
mHalfEdge[actedger]->setNext(( *rightiter ) );
@@ -2526,7 +2528,8 @@ void DualEdgeTriangulation::triangulatePolygon( QList<int>* poly, QList<int>* fr
mHalfEdge[( *( --poly->end() ) )]->setNext( inserta );

QList<int> polya;
iterator = poly->constBegin(); iterator += 2;
iterator = poly->constBegin();
iterator += 2;
while ( iterator != poly->constEnd() )
{
polya.append(( *iterator ) );
@@ -72,7 +72,9 @@ void QgsRasterMatrix::setData( int cols, int rows, double* data, double nodataVa
double* QgsRasterMatrix::takeData()
{
double* data = mData;
mData = nullptr; mColumns = 0; mRows = 0;
mData = nullptr;
mColumns = 0;
mRows = 0;
return data;
}

@@ -337,7 +339,8 @@ bool QgsRasterMatrix::twoArgumentOperation( TwoArgOperator op, const QgsRasterMa

for ( int i = 0; i < nEntries; ++i )
{
value1 = mData[i]; value2 = matrix[i];
value1 = mData[i];
value2 = matrix[i];
if ( value1 == mNodataValue || value2 == other.mNodataValue )
{
mData[i] = mNodataValue;
@@ -357,7 +360,9 @@ bool QgsRasterMatrix::twoArgumentOperation( TwoArgOperator op, const QgsRasterMa
int nEntries = other.nColumns() * other.nRows();
double value = mData[0];
delete[] mData;
mData = new double[nEntries]; mColumns = other.nColumns(); mRows = other.nRows();
mData = new double[nEntries];
mColumns = other.nColumns();
mRows = other.nRows();
mNodataValue = other.nodataValue();

if ( value == mNodataValue )
@@ -330,7 +330,9 @@ bool QgsRelief::processNineCellWindow( float* x1, float* x2, float* x3, float* x
}
else
{
r2 = hillShadeValue315; g2 = hillShadeValue315; b2 = hillShadeValue315;
r2 = hillShadeValue315;
g2 = hillShadeValue315;
b2 = hillShadeValue315;
}

//combine with r,g,b with 70 percentage coverage
@@ -1303,7 +1303,9 @@ const unsigned char* QgsGeometryAnalyzer::locateBetweenWkbString( const unsigned
}
}
}
prevx = *x; prevy = *y; prevz = *z;
prevx = *x;
prevy = *y;
prevz = *z;
}
return ptr;
}
@@ -1339,7 +1341,9 @@ const unsigned char* QgsGeometryAnalyzer::locateAlongWkbString( const unsigned c
result.append( pt2 );
}
}
prevx = *x; prevy = *y; prevz = *z;
prevx = *x;
prevy = *y;
prevz = *z;
}
return ptr;
}
@@ -1385,13 +1389,17 @@ bool QgsGeometryAnalyzer::clipSegmentByRange( double x1, double y1, double m1, d
{
if ( reversed )
{
pt1.setX( x2 ); pt1.setY( y2 );
pt2.setX( x1 ); pt2.setY( y1 );
pt1.setX( x2 );
pt1.setY( y2 );
pt2.setX( x1 );
pt2.setY( y1 );
}
else
{
pt1.setX( x1 ); pt1.setY( y1 );
pt2.setX( x2 ); pt2.setY( y2 );
pt1.setX( x1 );
pt1.setY( y1 );
pt2.setX( x2 );
pt2.setY( y2 );
}
secondPointClipped = false;
return true;
@@ -1400,7 +1408,8 @@ bool QgsGeometryAnalyzer::clipSegmentByRange( double x1, double y1, double m1, d
//m1 inside and m2 not
if ( m1 >= range1 && m1 <= range2 )
{
pt1.setX( x1 ); pt1.setY( y1 );
pt1.setX( x1 );
pt1.setY( y1 );
double dist = ( range2 - m1 ) / ( m2 - m1 );
pt2.setX( x1 + ( x2 - x1 ) * dist );
pt2.setY( y1 + ( y2 - y1 ) * dist );
@@ -1410,7 +1419,8 @@ bool QgsGeometryAnalyzer::clipSegmentByRange( double x1, double y1, double m1, d
//m2 inside and m1 not
if ( m2 >= range1 && m2 <= range2 )
{
pt2.setX( x2 ); pt2.setY( y2 );
pt2.setX( x2 );
pt2.setY( y2 );
double dist = ( m2 - range1 ) / ( m2 - m1 );
pt1.setX( x2 - ( x2 - x1 ) * dist );
pt1.setY( y2 - ( y2 - y1 ) * dist );
@@ -1468,12 +1478,14 @@ void QgsGeometryAnalyzer::locateAlongSegment( double x1, double y1, double m1, d
if ( reversed )
{
pt2Ok = true;
pt2.setX( x2 ); pt2.setY( y2 );
pt2.setX( x2 );
pt2.setY( y2 );
}
else
{
pt1Ok = true;
pt1.setX( x1 ); pt1.setY( y1 );
pt1.setX( x1 );
pt1.setY( y1 );
}
}

@@ -1483,12 +1495,14 @@ void QgsGeometryAnalyzer::locateAlongSegment( double x1, double y1, double m1, d
if ( reversed )
{
pt1Ok = true;
pt1.setX( x1 ); pt1.setY( y1 );
pt1.setX( x1 );
pt1.setY( y1 );
}
else
{
pt2Ok = true;
pt2.setX( x2 ); pt2.setY( y2 );
pt2.setX( x2 );
pt2.setY( y2 );
}
}

@@ -235,14 +235,16 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
QgsGeometry* lineClipStratum = lineFarAwayGeom->intersection( strataGeom );
if ( !lineClipStratum )
{
delete lineFarAwayGeom; delete lineClipStratum;
delete lineFarAwayGeom;
delete lineClipStratum;
continue;
}

//cancel if distance between sample point and line is too large (line does not start at point
if ( lineClipStratum->distance( *samplePoint ) > 0.000001 )
{
delete lineFarAwayGeom; delete lineClipStratum;
delete lineFarAwayGeom;
delete lineClipStratum;
continue;
}

@@ -262,14 +264,16 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
double transectLength = distanceArea.measureLength( lineClipStratum );
if ( transectLength < mMinTransectLength )
{
delete lineFarAwayGeom; delete lineClipStratum;
delete lineFarAwayGeom;
delete lineClipStratum;
continue;
}

//search closest existing profile. Cancel if dist < minDist
if ( otherTransectWithinDistance( lineClipStratum, minDistanceLayerUnits, minDistance, sIndex, lineFeatureMap, distanceArea ) )
{
delete lineFarAwayGeom; delete lineClipStratum;
delete lineFarAwayGeom;
delete lineClipStratum;
continue;
}

@@ -441,22 +445,30 @@ bool QgsTransectSample::closestSegmentPoints( QgsGeometry& g1, QgsGeometry& g2,

if ( d1 <= d2 && d1 <= d3 && d1 <= d4 )
{
dist = sqrt( d1 ); pt1 = p11; pt2 = minDistPoint1;
dist = sqrt( d1 );
pt1 = p11;
pt2 = minDistPoint1;
return true;
}
else if ( d2 <= d1 && d2 <= d3 && d2 <= d4 )
{
dist = sqrt( d2 ); pt1 = p12; pt2 = minDistPoint2;
dist = sqrt( d2 );
pt1 = p12;
pt2 = minDistPoint2;
return true;
}
else if ( d3 <= d1 && d3 <= d2 && d3 <= d4 )
{
dist = sqrt( d3 ); pt1 = p21; pt2 = minDistPoint3;
dist = sqrt( d3 );
pt1 = p21;
pt2 = minDistPoint3;
return true;
}
else
{
dist = sqrt( d4 ); pt1 = p21; pt2 = minDistPoint4;
dist = sqrt( d4 );
pt1 = p21;
pt2 = minDistPoint4;
return true;
}
}
@@ -392,7 +392,10 @@ int QgsZonalStatistics::cellInfoForBBox( const QgsRectangle& rasterBBox, const Q
QgsRectangle intersectBox = rasterBBox.intersect( &featureBBox );
if ( intersectBox.isEmpty() )
{
nCellsX = 0; nCellsY = 0; offsetX = 0; offsetY = 0;
nCellsX = 0;
nCellsY = 0;
offsetX = 0;
offsetY = 0;
return 0;
}

@@ -475,7 +475,8 @@ int QgsComposerPictureWidget::addDirectoryToPreview( const QString& path )
//exclude files that are not svg or image
if ( !fileIsSvg && !fileIsPixel )
{
++counter; continue;
++counter;
continue;
}

QListWidgetItem * listItem = new QListWidgetItem( mPreviewListWidget );
@@ -491,7 +492,8 @@ int QgsComposerPictureWidget::addDirectoryToPreview( const QString& path )
QPixmap iconPixmap( filePath );
if ( iconPixmap.isNull() )
{
++counter; continue; //unknown file format or other problem
++counter;
continue; //unknown file format or other problem
}
//set pixmap hardcoded to 30/30, same as icon size for mPreviewListWidget
QPixmap scaledPixmap( iconPixmap.scaled( QSize( 30, 30 ), Qt::KeepAspectRatio ) );
@@ -1831,11 +1831,21 @@ void QgisApp::createToolBars()
QAction* defSelectAction = mActionSelectFeatures;
switch ( settings.value( "/UI/selectTool", 0 ).toInt() )
{
case 0: defSelectAction = mActionSelectFeatures; break;
case 1: defSelectAction = mActionSelectFeatures; break;
case 2: defSelectAction = mActionSelectRadius; break;
case 3: defSelectAction = mActionSelectPolygon; break;
case 4: defSelectAction = mActionSelectFreehand; break;
case 0:
defSelectAction = mActionSelectFeatures;
break;
case 1:
defSelectAction = mActionSelectFeatures;
break;
case 2:
defSelectAction = mActionSelectRadius;
break;
case 3:
defSelectAction = mActionSelectPolygon;
break;
case 4:
defSelectAction = mActionSelectFreehand;
break;
}
bt->setDefaultAction( defSelectAction );
QAction* selectAction = mAttributesToolBar->insertWidget( mActionDeselectAll, bt );
@@ -1865,9 +1875,15 @@ void QgisApp::createToolBars()
QAction* defMeasureAction = mActionMeasure;
switch ( settings.value( "/UI/measureTool", 0 ).toInt() )
{
case 0: defMeasureAction = mActionMeasure; break;
case 1: defMeasureAction = mActionMeasureArea; break;
case 2: defMeasureAction = mActionMeasureAngle; break;
case 0:
defMeasureAction = mActionMeasure;
break;
case 1:
defMeasureAction = mActionMeasureArea;
break;
case 2:
defMeasureAction = mActionMeasureAngle;
break;
}
bt->setDefaultAction( defMeasureAction );
QAction* measureAction = mAttributesToolBar->insertWidget( mActionMapTips, bt );
@@ -1887,11 +1903,21 @@ void QgisApp::createToolBars()
QAction* defAnnotationAction = mActionTextAnnotation;
switch ( settings.value( "/UI/annotationTool", 0 ).toInt() )
{
case 0: defAnnotationAction = mActionTextAnnotation; break;
case 1: defAnnotationAction = mActionFormAnnotation; break;
case 2: defAnnotationAction = mActionHtmlAnnotation; break;
case 3: defAnnotationAction = mActionSvgAnnotation; break;
case 4: defAnnotationAction = mActionAnnotation; break;
case 0:
defAnnotationAction = mActionTextAnnotation;
break;
case 1:
defAnnotationAction = mActionFormAnnotation;
break;
case 2:
defAnnotationAction = mActionHtmlAnnotation;
break;
case 3:
defAnnotationAction = mActionSvgAnnotation;
break;
case 4:
defAnnotationAction = mActionAnnotation;
break;

}
bt->setDefaultAction( defAnnotationAction );
@@ -1914,9 +1940,15 @@ void QgisApp::createToolBars()
QAction* defNewLayerAction = mActionNewVectorLayer;
switch ( settings.value( "/UI/defaultNewLayer", 1 ).toInt() )
{
case 0: defNewLayerAction = mActionNewSpatiaLiteLayer; break;
case 1: defNewLayerAction = mActionNewVectorLayer; break;
case 2: defNewLayerAction = mActionNewMemoryLayer; break;
case 0:
defNewLayerAction = mActionNewSpatiaLiteLayer;
break;
case 1:
defNewLayerAction = mActionNewVectorLayer;
break;
case 2:
defNewLayerAction = mActionNewMemoryLayer;
break;
}
bt->setDefaultAction( defNewLayerAction );
QAction* newLayerAction = mLayerToolBar->addWidget( bt );
@@ -81,7 +81,8 @@ void QgsConfigureShortcutsDialog::populateActions()
QString actionText = actions[i]->text();
actionText.remove( '&' ); // remove the accelerator

QStringList lst; lst << actionText << actions[i]->shortcut().toString();
QStringList lst;
lst << actionText << actions[i]->shortcut().toString();
QTreeWidgetItem* item = new QTreeWidgetItem( lst );
item->setIcon( 0, actions[i]->icon() );
item->setData( 0, Qt::UserRole, qVariantFromValue(( QObject* )actions[i] ) );
@@ -795,7 +795,8 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,

tblResults->resizeRowToContents( j );

j++; i++;
j++;
i++;
}
//tblResults->resizeColumnToContents( 1 );

0 comments on commit c28c493

Please sign in to comment.
You can’t perform that action at this time.