Skip to content
Permalink
Browse files

add 'foreach' to astyle and re-run indentation

  • Loading branch information
jef-n committed Aug 3, 2012
1 parent f8f034c commit 5ae312cfad46871b3d854fff543775301419a76b
Showing with 849 additions and 840 deletions.
  1. +1 −1 src/app/composer/qgscomposer.cpp
  2. +2 −2 src/app/legend/qgslayerorder.cpp
  3. +22 −22 src/app/legend/qgslegend.cpp
  4. +1 −1 src/app/legend/qgslegendgroup.cpp
  5. +2 −2 src/app/nodetool/qgsmaptoolnodetool.cpp
  6. +3 −3 src/app/nodetool/qgsselectedfeature.cpp
  7. +1 −1 src/app/ogr/qgsogrsublayersdialog.cpp
  8. +22 −22 src/app/qgisapp.cpp
  9. +1 −1 src/app/qgsattributedialog.cpp
  10. +2 −2 src/app/qgsattributetypedialog.cpp
  11. +1 −1 src/app/qgsattributetypeloaddialog.cpp
  12. +2 −2 src/app/qgsbookmarks.cpp
  13. +11 −11 src/app/qgscustomization.cpp
  14. +2 −2 src/app/qgshandlebadlayers.cpp
  15. +3 −3 src/app/qgsidentifyresults.cpp
  16. +1 −1 src/app/qgsmaptoolcapture.cpp
  17. +1 −1 src/app/qgsmaptoolfeatureaction.cpp
  18. +1 −1 src/app/qgsmaptoolfreezelabels.cpp
  19. +1 −1 src/app/qgsmaptoolmovefeature.cpp
  20. +8 −8 src/app/qgsoptions.cpp
  21. +2 −2 src/app/qgspluginregistry.cpp
  22. +2 −2 src/app/qgsprojectproperties.cpp
  23. +1 −1 src/app/qgsrasterlayerproperties.cpp
  24. +1 −1 src/app/qgsshortcutsmanager.cpp
  25. +2 −2 src/app/qgssnappingdialog.cpp
  26. +5 −0 src/astyle/ASResource.cpp
  27. +3 −3 src/core/gps/qgsgpsdetector.cpp
  28. +4 −4 src/core/qgsbrowsermodel.cpp
  29. +3 −3 src/core/qgscoordinatereferencesystem.cpp
  30. +12 −12 src/core/qgsdataitem.cpp
  31. +4 −4 src/core/qgsdatasourceuri.cpp
  32. +16 −16 src/core/qgsexpression.cpp
  33. +6 −6 src/core/qgsexpression.h
  34. +1 −1 src/core/qgsmaplayerregistry.cpp
  35. +1 −1 src/core/qgsmimedatautils.cpp
  36. +2 −2 src/core/qgsnetworkaccessmanager.cpp
  37. +1 −1 src/core/qgspallabeling.cpp
  38. +3 −3 src/core/qgspluginlayerregistry.cpp
  39. +1 −1 src/core/qgsproviderregistry.cpp
  40. +4 −4 src/core/qgsrasterdataprovider.cpp
  41. +1 −1 src/core/qgsvectordataprovider.cpp
  42. +2 −2 src/core/qgsvectorfilewriter.cpp
  43. +7 −7 src/core/qgsvectorlayer.cpp
  44. +1 −1 src/core/raster/qgsrasterlayer.cpp
  45. +1 −1 src/core/raster/qgsrasterpipe.cpp
  46. +408 −404 src/core/symbology-ng/qgscolorrampv2data.h
  47. +2 −2 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  48. +2 −2 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
  49. +7 −7 src/core/symbology-ng/qgsrendererv2.cpp
  50. +1 −1 src/core/symbology-ng/qgsrendererv2registry.cpp
  51. +10 −10 src/core/symbology-ng/qgsrulebasedrendererv2.cpp
  52. +1 −1 src/core/symbology-ng/qgsrulebasedrendererv2.h
  53. +2 −2 src/core/symbology-ng/qgssymbollayerv2.cpp
  54. +1 −1 src/core/symbology-ng/qgssymbollayerv2registry.cpp
  55. +1 −1 src/core/symbology-ng/qgssymbollayerv2utils.cpp
  56. +4 −4 src/core/symbology-ng/qgssymbologyv2conversion.cpp
  57. +5 −5 src/core/symbology-ng/qgsvectorcolorrampv2.cpp
  58. +2 −2 src/core/symbology/qgsmarkercatalogue.cpp
  59. +1 −1 src/gui/attributetable/qgsattributetablemodel.cpp
  60. +1 −1 src/gui/qgisgui.cpp
  61. +3 −3 src/gui/qgsexpressionbuilderwidget.cpp
  62. +3 −3 src/gui/qgsexpressionhighlighter.cpp
  63. +1 −1 src/gui/qgsmapcanvas.cpp
  64. +1 −1 src/gui/qgsowssourceselect.cpp
  65. +2 −2 src/gui/qgsprojectionselector.cpp
  66. +5 −5 src/gui/qgsrasterformatsaveoptionswidget.cpp
  67. +1 −1 src/gui/qgsrasterlayersaveasdialog.cpp
  68. +1 −1 src/gui/raster/qgsrasterhistogramwidget.cpp
  69. +1 −1 src/gui/raster/qgsrasterminmaxwidget.cpp
  70. +3 −3 src/gui/raster/qgsrasterminmaxwidget.h
  71. +7 −7 src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
  72. +5 −5 src/gui/symbology-ng/qgscptcitycolorrampv2dialog.cpp
  73. +1 −1 src/gui/symbology-ng/qgscptcitycolorrampv2dialog.h
  74. +1 −1 src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
  75. +1 −1 src/gui/symbology-ng/qgsrendererv2widget.cpp
  76. +10 −10 src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
  77. +2 −2 src/gui/symbology-ng/qgsvectorcolorbrewercolorrampv2dialog.cpp
  78. +1 −1 src/mapserver/qgsconfigcache.cpp
  79. +8 −8 src/mapserver/qgsconfigparser.cpp
  80. +1 −1 src/mapserver/qgshttprequesthandler.cpp
  81. +1 −1 src/mapserver/qgsmslayerbuilder.cpp
  82. +2 −2 src/mapserver/qgsmslayercache.cpp
  83. +6 −6 src/mapserver/qgsprojectparser.cpp
  84. +7 −7 src/mapserver/qgswmsserver.cpp
  85. +1 −1 src/plugins/diagram_overlay/qgssvgdiagramfactorywidget.cpp
  86. +2 −2 src/plugins/georeferencer/qgsgeorefplugingui.cpp
  87. +1 −1 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
  88. +4 −4 src/plugins/grass/qgsgrassbrowser.cpp
  89. +1 −1 src/plugins/heatmap/heatmapgui.cpp
  90. +1 −1 src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp
  91. +6 −6 src/providers/gdal/qgsgdaldataitems.cpp
  92. +3 −3 src/providers/gdal/qgsgdalprovider.cpp
  93. +1 −1 src/providers/gdal/qgswcssourceselect.cpp
  94. +4 −4 src/providers/grass/qgsgrassprovidermodule.cpp
  95. +1 −1 src/providers/grass/qgsgrassrasterprovider.cpp
  96. +11 −11 src/providers/mssql/qgsmssqldataitems.cpp
  97. +1 −1 src/providers/mssql/qgsmssqlprovider.cpp
  98. +11 −11 src/providers/mssql/qgsmssqlsourceselect.cpp
  99. +3 −3 src/providers/mssql/qgsmssqltablemodel.cpp
  100. +1 −1 src/providers/ogr/qgsogrdataitems.cpp
  101. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  102. +1 −1 src/providers/osm/osmprovider.cpp
  103. +6 −6 src/providers/ows/qgsowsdataitems.cpp
  104. +1 −1 src/providers/postgres/qgscolumntypethread.cpp
  105. +11 −11 src/providers/postgres/qgspgsourceselect.cpp
  106. +3 −3 src/providers/postgres/qgspgtablemodel.cpp
  107. +3 −3 src/providers/postgres/qgspostgresdataitems.cpp
  108. +7 −7 src/providers/postgres/qgspostgresprovider.cpp
  109. +3 −3 src/providers/spatialite/qgsspatialitedataitems.cpp
  110. +2 −2 src/providers/spatialite/qgsspatialitesourceselect.cpp
  111. +2 −2 src/providers/wfs/qgswfsdataitems.cpp
  112. +2 −2 src/providers/wfs/qgswfssourceselect.cpp
  113. +1 −1 src/providers/wms/qgstilescalewidget.cpp
  114. +5 −5 src/providers/wms/qgswmsdataitems.cpp
  115. +13 −13 src/providers/wms/qgswmsprovider.cpp
  116. +10 −10 src/providers/wms/qgswmssourceselect.cpp
  117. +1 −1 src/python/qgspythonutilsimpl.cpp
  118. +1 −1 tests/bench/main.cpp
  119. +1 −1 tests/qt_modeltest/dynamictreemodel.cpp
  120. +2 −2 tests/qt_modeltest/tst_modeltest.cpp
  121. +2 −2 tests/src/core/testqgsexpression.cpp
  122. +4 −4 tests/src/core/testqgsrulebasedrenderer.cpp
  123. +2 −2 tests/src/core/testqgsstylev2.cpp
  124. +15 −15 tests/src/core/testziplayer.cpp
  125. +1 −1 tests/src/gui/testqgsrasterhistogram.cpp
  126. +1 −1 tests/src/gui/testrendererv2gui.cpp
@@ -348,7 +348,7 @@ void QgsComposer::setIconSizes( int size )

//Change all current icon sizes.
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
foreach( QToolBar * toolbar, toolbars )
foreach ( QToolBar * toolbar, toolbars )
{
toolbar->setIconSize( QSize( size, size ) );
}
@@ -85,7 +85,7 @@ void QgsLayerOrder::refreshLayerList()
{
clear();

foreach( QgsLegendLayer *layer, mLegend->legendLayers() )
foreach ( QgsLegendLayer *layer, mLegend->legendLayers() )
{
QListWidgetItem *item = new QListWidgetItem( layer->layer()->name() );
item->setData( 1, QString::number( layer->drawingOrder() ) );
@@ -234,7 +234,7 @@ void QgsLayerOrder::mouseReleaseEvent( QMouseEvent * e )

setCursor( QCursor( Qt::ArrowCursor ) );

foreach( QListWidgetItem *item, mItemsBeingMoved )
foreach ( QListWidgetItem *item, mItemsBeingMoved )
{
if ( mInsertRow >= count() )
{
@@ -65,7 +65,7 @@ static QString getUniqueGroupName( QString prefix, QStringList groups )
match.replaceInStrings( prefix, QString( "" ) );
// find the maximum
int max = 0;
foreach( QString m, match )
foreach ( QString m, match )
{
if ( m.toInt() > max )
max = m.toInt();
@@ -286,7 +286,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;

@@ -364,7 +364,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
QgsDebugMsg( "layers prior to move: " + mLayersPriorToMove.join( ", " ) );

// record which items were selected and hide them
foreach( QTreeWidgetItem * item, selectedItems() )
foreach ( QTreeWidgetItem * item, selectedItems() )
{
//prevent to drag out content under groups that are embedded from other
//project files.
@@ -377,7 +377,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
}

// remove and unhide items, whose parent is already to be moved
foreach( QTreeWidgetItem * item, mItemsBeingMoved )
foreach ( QTreeWidgetItem * item, mItemsBeingMoved )
{
QTreeWidgetItem *parent = item->parent();

@@ -556,7 +556,7 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )
hideLine();

// unhide
foreach( QTreeWidgetItem * item, mItemsBeingMoved )
foreach ( QTreeWidgetItem * item, mItemsBeingMoved )
{
item->setHidden( false );
}
@@ -574,7 +574,7 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )

showItem( "prev sibling", mDropTarget );

foreach( QTreeWidgetItem * item, mItemsBeingMoved )
foreach ( QTreeWidgetItem * item, mItemsBeingMoved )
{
moveItem( item, mDropTarget );
mDropTarget = item;
@@ -601,7 +601,7 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )
{
showItem( "drop after", mDropTarget );

foreach( QTreeWidgetItem * item, mItemsBeingMoved )
foreach ( QTreeWidgetItem * item, mItemsBeingMoved )
{
moveItem( item, mDropTarget );
mDropTarget = item;
@@ -612,7 +612,7 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )
{
showItem( "insert into", mDropTarget );

foreach( QTreeWidgetItem * item, mItemsBeingMoved )
foreach ( QTreeWidgetItem * item, mItemsBeingMoved )
{
insertItem( item, mDropTarget );
}
@@ -968,7 +968,7 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
!mMapCanvas->mapRenderer()->hasCrsTransformEnabled() )
{
// Verify if all layers have the same CRS
foreach( QgsMapLayer *l, layers() )
foreach ( QgsMapLayer *l, layers() )
{
if ( myPreviousCrs != l->crs() )
{
@@ -1040,7 +1040,7 @@ QList<QgsMapLayer *> QgsLegend::selectedLayers()
{
QList<QgsMapLayer *> layers;

foreach( QTreeWidgetItem * item, selectedItems() )
foreach ( QTreeWidgetItem * item, selectedItems() )
{
QgsLegendLayer *ll = dynamic_cast<QgsLegendLayer *>( item );
if ( ll )
@@ -1087,7 +1087,7 @@ QList<QgsLegendLayer *> QgsLegend::legendLayers()

QList< QgsLegendLayer * > ls;

foreach( int o, items.uniqueKeys() )
foreach ( int o, items.uniqueKeys() )
{
QgsDebugMsgLevel( QString( "o=%1" ).arg( o ), 3 );
QList< QgsLegendLayer *> values = items.values( o );
@@ -1106,7 +1106,7 @@ QList<QgsMapLayer *> QgsLegend::layers()
{
QList<QgsMapLayer *> ls;

foreach( QgsLegendLayer *l, legendLayers() )
foreach ( QgsLegendLayer *l, legendLayers() )
{
ls << l->layer();
}
@@ -1118,7 +1118,7 @@ QList<QgsMapCanvasLayer> QgsLegend::canvasLayers()
{
QList<QgsMapCanvasLayer> ls;

foreach( QgsLegendLayer *l, legendLayers() )
foreach ( QgsLegendLayer *l, legendLayers() )
{
ls << l->canvasLayer();
}
@@ -1234,7 +1234,7 @@ void QgsLegend::setGroupCRS( QgsLegendGroup *lg, const QgsCoordinateReferenceSys
return;
}

foreach( QgsLegendLayer *cl, lg->legendLayers() )
foreach ( QgsLegendLayer *cl, lg->legendLayers() )
{
if ( cl )
{
@@ -1310,7 +1310,7 @@ bool QgsLegend::writeXML( QDomNode &legendnode, QDomDocument &document )

bool QgsLegend::writeXML( QList<QTreeWidgetItem *> items, QDomNode &node, QDomDocument &document )
{
foreach( QTreeWidgetItem * currentItem, items )
foreach ( QTreeWidgetItem * currentItem, items )
{
QgsLegendItem *item = dynamic_cast<QgsLegendItem *>( currentItem );
if ( !item )
@@ -2002,7 +2002,7 @@ QStringList QgsLegend::layerIDs()

#ifdef QGISDEBUG
QgsDebugMsg( "QgsLegend::layerIDs()" );
foreach( QString id, layers )
foreach ( QString id, layers )
{
QgsDebugMsg( id );
}
@@ -2119,7 +2119,7 @@ void QgsLegend::handleItemChange( QTreeWidgetItem* item, int column )

if ( item->isSelected() )
{
foreach( QTreeWidgetItem * i, selectedItems() )
foreach ( QTreeWidgetItem * i, selectedItems() )
{
if ( i != item )
{
@@ -2449,7 +2449,7 @@ void QgsLegend::removeSelectedLayers()
// Turn off rendering to improve speed.
mMapCanvas->freeze();

foreach( QTreeWidgetItem * item, selectedItems() )
foreach ( QTreeWidgetItem * item, selectedItems() )
{
QgsLegendGroup* lg = dynamic_cast<QgsLegendGroup *>( item );
if ( lg )
@@ -2476,7 +2476,7 @@ void QgsLegend::setCRSForSelectedLayers( const QgsCoordinateReferenceSystem &crs
// Turn off rendering to improve speed.
mMapCanvas->freeze();

foreach( QTreeWidgetItem * item, selectedItems() )
foreach ( QTreeWidgetItem * item, selectedItems() )
{
QgsLegendGroup* lg = dynamic_cast<QgsLegendGroup *>( item );
if ( lg )
@@ -2564,7 +2564,7 @@ void QgsLegend::groupSelectedLayers()
blockSignals( true );

QTreeWidgetItem * parent = 0;
foreach( QTreeWidgetItem* item, selectedItems() )
foreach ( QTreeWidgetItem* item, selectedItems() )
{
parent = item->parent();
}
@@ -2585,7 +2585,7 @@ void QgsLegend::groupSelectedLayers()
QList< QModelIndex > oldIndexes;
QList< QTreeWidgetItem* > selected;

foreach( QTreeWidgetItem * item, selectedItems() )
foreach ( QTreeWidgetItem * item, selectedItems() )
{
QgsLegendLayer* layer = dynamic_cast<QgsLegendLayer *>( item );
if ( layer )
@@ -2594,7 +2594,7 @@ void QgsLegend::groupSelectedLayers()
selected.append( item );
}
}
foreach( QTreeWidgetItem * item, selected )
foreach ( QTreeWidgetItem * item, selected )
{
insertItem( item, group );
}
@@ -109,7 +109,7 @@ Qt::CheckState QgsLegendGroup::pendingCheckState()
return Qt::PartiallyChecked;

Qt::CheckState theState = elements[0]->checkState( 0 );
foreach( QgsLegendItem * li, elements )
foreach ( QgsLegendItem * li, elements )
{
if ( theState != li->checkState( 0 ) )
{
@@ -604,13 +604,13 @@ void QgsMapToolNodeTool::deactivate()
void QgsMapToolNodeTool::removeRubberBands()
{
// cleanup rubberbands and list
foreach( QgsRubberBand *rb, mRubberBands )
foreach ( QgsRubberBand *rb, mRubberBands )
{
delete rb;
}
mRubberBands.clear();

foreach( QgsRubberBand *rb, mTopologyRubberBand )
foreach ( QgsRubberBand *rb, mTopologyRubberBand )
{
delete rb;
}
@@ -228,7 +228,7 @@ void QgsSelectedFeature::validationFinished()
void QgsSelectedFeature::deleteSelectedVertexes()
{
int nSelected = 0;
foreach( QgsVertexEntry *entry, mVertexMap )
foreach ( QgsVertexEntry *entry, mVertexMap )
{
if ( entry->isSelected() )
nSelected++;
@@ -303,7 +303,7 @@ void QgsSelectedFeature::deleteSelectedVertexes()
void QgsSelectedFeature::moveSelectedVertexes( const QgsVector &v )
{
int nUpdates = 0;
foreach( QgsVertexEntry *entry, mVertexMap )
foreach ( QgsVertexEntry *entry, mVertexMap )
{
if ( entry->isSelected() )
nUpdates++;
@@ -370,7 +370,7 @@ void QgsSelectedFeature::replaceVertexMap()

void QgsSelectedFeature::deleteVertexMap()
{
foreach( QgsVertexEntry *entry, mVertexMap )
foreach ( QgsVertexEntry *entry, mVertexMap )
{
delete entry;
}
@@ -58,7 +58,7 @@ QList<int> QgsOGRSublayersDialog::getSelectionIndexes()

void QgsOGRSublayersDialog::populateLayerTable( QStringList theList, QString delim )
{
foreach( QString item, theList )
foreach ( QString item, theList )
{
layersTable->addTopLevelItem( new QTreeWidgetItem( item.split( delim ) ) );
}

0 comments on commit 5ae312c

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