Skip to content
Permalink
Browse files

scripts/astyle-all.sh run

  • Loading branch information
jef-n committed Mar 3, 2017
1 parent 24954f8 commit b9162dccdf2050c3c6368a29c91f31090f30c109
Showing with 2,713 additions and 2,712 deletions.
  1. +6 −6 tests/bench/main.cpp
  2. +18 −18 tests/bench/qgsbench.cpp
  3. +8 −8 tests/bench/qgsbench.h
  4. +10 −10 tests/qt_modeltest/dynamictreemodel.cpp
  5. +4 −4 tests/qt_modeltest/dynamictreemodel.h
  6. +3 −3 tests/qt_modeltest/modeltest.cpp
  7. +2 −2 tests/qt_modeltest/modeltest.h
  8. +1 −1 tests/qt_modeltest/tst_modeltest.cpp
  9. +1 −1 tests/src/analysis/testqgsalignraster.cpp
  10. +11 −11 tests/src/analysis/testqgsgeometrysnapper.cpp
  11. +22 −22 tests/src/analysis/testqgsrastercalculator.cpp
  12. +6 −6 tests/src/analysis/testqgsvectoranalyzer.cpp
  13. +2 −2 tests/src/analysis/testqgszonalstatistics.cpp
  14. +6 −6 tests/src/app/testqgisappclipboard.cpp
  15. +2 −2 tests/src/app/testqgisapppython.cpp
  16. +2 −2 tests/src/app/testqgsattributetable.cpp
  17. +2 −2 tests/src/app/testqgsfieldcalculator.cpp
  18. +17 −17 tests/src/app/testqgsmaptoolidentifyaction.cpp
  19. +4 −4 tests/src/app/testqgsmaptoolselect.cpp
  20. +4 −4 tests/src/app/testqgsmeasuretool.cpp
  21. +5 −5 tests/src/app/testqgsvectorlayersaveasdialog.cpp
  22. +3 −3 tests/src/core/testmaprendererjob.cpp
  23. +9 −9 tests/src/core/testqgs25drenderer.cpp
  24. +29 −29 tests/src/core/testqgsatlascomposition.cpp
  25. +8 −8 tests/src/core/testqgsauthcrypto.cpp
  26. +9 −9 tests/src/core/testqgsauthmanager.cpp
  27. +19 −19 tests/src/core/testqgsblendmodes.cpp
  28. +12 −12 tests/src/core/testqgscentroidfillsymbol.cpp
  29. +2 −2 tests/src/core/testqgsclipper.cpp
  30. +1 −1 tests/src/core/testqgscolorscheme.cpp
  31. +5 −5 tests/src/core/testqgscolorschemeregistry.cpp
  32. +9 −9 tests/src/core/testqgscomposerdd.cpp
  33. +4 −4 tests/src/core/testqgscomposereffects.cpp
  34. +19 −19 tests/src/core/testqgscomposergroup.cpp
  35. +20 −20 tests/src/core/testqgscomposerhtml.cpp
  36. +6 −6 tests/src/core/testqgscomposerlabel.cpp
  37. +22 −22 tests/src/core/testqgscomposermap.cpp
  38. +5 −5 tests/src/core/testqgscomposermapgrid.cpp
  39. +20 −20 tests/src/core/testqgscomposermapoverview.cpp
  40. +15 −15 tests/src/core/testqgscomposermodel.cpp
  41. +14 −14 tests/src/core/testqgscomposermultiframe.cpp
  42. +12 −12 tests/src/core/testqgscomposerobject.cpp
  43. +10 −10 tests/src/core/testqgscomposerpaper.cpp
  44. +4 −4 tests/src/core/testqgscomposerpicture.cpp
  45. +13 −13 tests/src/core/testqgscomposerrotation.cpp
  46. +10 −10 tests/src/core/testqgscomposerscalebar.cpp
  47. +6 −6 tests/src/core/testqgscomposershapes.cpp
  48. +25 −25 tests/src/core/testqgscomposertablev2.cpp
  49. +21 −21 tests/src/core/testqgscomposerutils.cpp
  50. +52 −52 tests/src/core/testqgscomposition.cpp
  51. +9 −9 tests/src/core/testqgsconnectionpool.cpp
  52. +2 −2 tests/src/core/testqgscoordinatereferencesystem.cpp
  53. +7 −7 tests/src/core/testqgsdataitem.cpp
  54. +76 −76 tests/src/core/testqgsdatasourceuri.cpp
  55. +8 −8 tests/src/core/testqgsdiagram.cpp
  56. +16 −16 tests/src/core/testqgsdistancearea.cpp
  57. +12 −12 tests/src/core/testqgsellipsemarker.cpp
  58. +48 −48 tests/src/core/testqgsexpression.cpp
  59. +32 −32 tests/src/core/testqgsexpressioncontext.cpp
  60. +3 −3 tests/src/core/testqgsfeature.cpp
  61. +18 −18 tests/src/core/testqgsfields.cpp
  62. +14 −14 tests/src/core/testqgsfilledmarker.cpp
  63. +12 −12 tests/src/core/testqgsfontmarker.cpp
  64. +201 −201 tests/src/core/testqgsgeometry.cpp
  65. +7 −7 tests/src/core/testqgsgeometryimport.cpp
  66. +11 −11 tests/src/core/testqgsgeometryutils.cpp
  67. +2 −2 tests/src/core/testqgsgml.cpp
  68. +15 −15 tests/src/core/testqgsgradients.cpp
  69. +1 −1 tests/src/core/testqgshistogram.cpp
  70. +5 −5 tests/src/core/testqgsimageoperation.cpp
  71. +9 −9 tests/src/core/testqgsinvertedpolygonrenderer.cpp
  72. +3 −2 tests/src/core/testqgsjsonutils.cpp
  73. +40 −40 tests/src/core/testqgslabelingengine.cpp
  74. +50 −50 tests/src/core/testqgslayertree.cpp
  75. +54 −54 tests/src/core/testqgslegendrenderer.cpp
  76. +14 −14 tests/src/core/testqgslinefillsymbol.cpp
  77. +5 −5 tests/src/core/testqgsmaplayer.cpp
  78. +14 −14 tests/src/core/testqgsmaplayerstylemanager.cpp
  79. +8 −8 tests/src/core/testqgsmaprendererjob.cpp
  80. +13 −13 tests/src/core/testqgsmaprotation.cpp
  81. +11 −11 tests/src/core/testqgsmapsettings.cpp
  82. +18 −18 tests/src/core/testqgsmarkerlinesymbol.cpp
  83. +1 −1 tests/src/core/testqgsnetworkcontentfetcher.cpp
  84. +451 −451 tests/src/core/testqgsogcutils.cpp
  85. +3 −3 tests/src/core/testqgsogrutils.cpp
  86. +92 −92 tests/src/core/testqgspainteffect.cpp
  87. +18 −18 tests/src/core/testqgspainteffectregistry.cpp
  88. +5 −5 tests/src/core/testqgspallabeling.cpp
  89. +7 −7 tests/src/core/testqgspoint.cpp
  90. +11 −11 tests/src/core/testqgspointlocator.cpp
  91. +14 −14 tests/src/core/testqgspointpatternfillsymbol.cpp
  92. +12 −12 tests/src/core/testqgsprocessing.cpp
  93. +3 −3 tests/src/core/testqgsproject.cpp
  94. +78 −78 tests/src/core/testqgsproperty.cpp
  95. +11 −11 tests/src/core/testqgsrasterblock.cpp
  96. +11 −11 tests/src/core/testqgsrasterfilewriter.cpp
  97. +14 −14 tests/src/core/testqgsrasterfill.cpp
  98. +53 −53 tests/src/core/testqgsrasterlayer.cpp
  99. +4 −4 tests/src/core/testqgsrastersublayer.cpp
  100. +13 −13 tests/src/core/testqgsrenderers.cpp
  101. +20 −20 tests/src/core/testqgsrulebasedrenderer.cpp
  102. +15 −15 tests/src/core/testqgsshapeburst.cpp
  103. +12 −12 tests/src/core/testqgssimplemarker.cpp
  104. +6 −6 tests/src/core/testqgssnappingutils.cpp
  105. +11 −11 tests/src/core/testqgsspatialindex.cpp
  106. +16 −16 tests/src/core/testqgsstyle.cpp
  107. +12 −12 tests/src/core/testqgssvgmarker.cpp
  108. +19 −19 tests/src/core/testqgssymbol.cpp
  109. +64 −64 tests/src/core/testqgstaskmanager.cpp
  110. +31 −31 tests/src/core/testqgstracer.cpp
  111. +10 −10 tests/src/core/testqgsvectordataprovider.cpp
  112. +1 −1 tests/src/core/testqgsvectorfilewriter.cpp
  113. +20 −20 tests/src/core/testqgsvectorlayer.cpp
  114. +9 −9 tests/src/core/testqgsvectorlayercache.cpp
  115. +40 −40 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
  116. +35 −35 tests/src/core/testziplayer.cpp
  117. +7 −7 tests/src/gui/testprojectionissues.cpp
  118. +18 −18 tests/src/gui/testqgsattributeform.cpp
  119. +6 −6 tests/src/gui/testqgsdockwidget.cpp
  120. +2 −2 tests/src/gui/testqgsdoublespinbox.cpp
  121. +39 −39 tests/src/gui/testqgsdualview.cpp
  122. +2 −2 tests/src/gui/testqgseditorwidgetregistry.cpp
  123. +9 −9 tests/src/gui/testqgsfieldexpressionwidget.cpp
  124. +12 −12 tests/src/gui/testqgsfiledownloader.cpp
  125. +2 −2 tests/src/gui/testqgsfilewidget.cpp
  126. +5 −5 tests/src/gui/testqgsfocuswatcher.cpp
  127. +4 −4 tests/src/gui/testqgskeyvaluewidget.cpp
  128. +8 −8 tests/src/gui/testqgslistwidget.cpp
  129. +6 −6 tests/src/gui/testqgsmapcanvas.cpp
  130. +3 −3 tests/src/gui/testqgsmaptooledit.cpp
  131. +4 −4 tests/src/gui/testqgsmaptoolzoom.cpp
  132. +8 −8 tests/src/gui/testqgsquickprint.cpp
  133. +11 −11 tests/src/gui/testqgsrasterhistogram.cpp
  134. +6 −6 tests/src/gui/testqgsrubberband.cpp
  135. +3 −3 tests/src/gui/testqgsscalecombobox.cpp
  136. +2 −2 tests/src/gui/testqgsspinbox.cpp
  137. +32 −32 tests/src/gui/testqgssqlcomposerdialog.cpp
  138. +7 −7 tests/src/gui/testrenderergui.cpp
  139. +1 −1 tests/src/gui/testrenderergui.h
  140. +63 −63 tests/src/providers/grass/testqgsgrassprovider.cpp
  141. +11 −11 tests/src/providers/testqgsgdalprovider.cpp
  142. +5 −5 tests/src/providers/testqgswcsprovider.cpp
  143. +44 −44 tests/src/providers/testqgswcspublicservers.cpp
  144. +12 −12 tests/src/providers/testqgswcspublicservers.h
  145. +1 −1 tests/src/providers/testqgswmsprovider.cpp
@@ -63,7 +63,7 @@ typedef SInt32 SRefCon;

/** Print usage text
*/
void usage( std::string const & appName )
void usage( std::string const &appName )
{
std::cerr << "QGIS Benchmark - " << VERSION << " '" << RELEASE_NAME << "' ("
<< QGSVERSION << ")\n"
@@ -413,9 +413,9 @@ int main( int argc, char *argv[] )
QStringList gdalShares;
QString appResources( QDir::cleanPath( QgsApplication::pkgDataPath() ) );
gdalShares << QCoreApplication::applicationDirPath().append( "/share/gdal" )
<< appResources.append( "/share/gdal" )
<< appResources.append( "/gdal" );
Q_FOREACH ( const QString& gdalShare, gdalShares )
<< appResources.append( "/share/gdal" )
<< appResources.append( "/gdal" );
Q_FOREACH ( const QString &gdalShare, gdalShares )
{
if ( QFile::exists( gdalShare ) )
{
@@ -499,7 +499,7 @@ int main( int argc, char *argv[] )
{
QPainter::RenderHints hints;
QStringList list = myQuality.split( ',' );
Q_FOREACH ( const QString& q, list )
Q_FOREACH ( const QString &q, list )
{
if ( q == QLatin1String( "Antialiasing" ) ) hints |= QPainter::Antialiasing;
else if ( q == QLatin1String( "TextAntialiasing" ) ) hints |= QPainter::TextAntialiasing;
@@ -523,7 +523,7 @@ int main( int argc, char *argv[] )
QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( sFileList.count() ) );
for ( QStringList::Iterator myIterator = sFileList.begin(); myIterator != sFileList.end(); ++myIterator )
{
QgsDebugMsg( QString( "Trying to load file : %1" ).arg(( *myIterator ) ) );
QgsDebugMsg( QString( "Trying to load file : %1" ).arg( ( *myIterator ) ) );
QString myLayerName = *myIterator;
// don't load anything with a .qgs extension - these are project files
if ( !myLayerName.contains( QLatin1String( ".qgs" ) ) )
@@ -75,7 +75,7 @@ struct rusage
*/


int getrusage( int who, struct rusage * rusage )
int getrusage( int who, struct rusage *rusage )
{
FILETIME starttime;
FILETIME exittime;
@@ -119,14 +119,14 @@ int getrusage( int who, struct rusage * rusage )
#endif

QgsBench::QgsBench( int width, int height, int iterations )
: QObject()
, mWidth( width )
, mHeight( height )
, mIterations( iterations )
, mSetExtent( false )
, mUserStart( 0.0 )
, mSysStart( 0.0 )
, mParallel( false )
: QObject()
, mWidth( width )
, mHeight( height )
, mIterations( iterations )
, mSetExtent( false )
, mUserStart( 0.0 )
, mSysStart( 0.0 )
, mParallel( false )
{

QgsDebugMsg( QString( "mIterations = %1" ).arg( mIterations ) );
@@ -139,7 +139,7 @@ QgsBench::~QgsBench()
{
}

bool QgsBench::openProject( const QString & fileName )
bool QgsBench::openProject( const QString &fileName )
{
if ( ! QgsProject::instance()->read( fileName ) )
{
@@ -163,7 +163,7 @@ void QgsBench::readProject( const QDomDocument &doc )
}
}

void QgsBench::setExtent( const QgsRectangle & extent )
void QgsBench::setExtent( const QgsRectangle &extent )
{
mExtent = extent;
mSetExtent = true;
@@ -174,7 +174,7 @@ void QgsBench::render()

QgsDebugMsg( "extent: " + mMapSettings.extent().toString() );

QMap<QString, QgsMapLayer*> layersMap = QgsProject::instance()->mapLayers();
QMap<QString, QgsMapLayer *> layersMap = QgsProject::instance()->mapLayers();

mMapSettings.setLayers( layersMap.values() );

@@ -198,7 +198,7 @@ void QgsBench::render()

for ( int i = 0; i < mIterations; i++ )
{
QgsMapRendererQImageJob* job = nullptr;
QgsMapRendererQImageJob *job = nullptr;
if ( mParallel )
job = new QgsMapRendererParallelJob( mMapSettings );
else
@@ -264,13 +264,13 @@ void QgsBench::render()
mLogMap.insert( QStringLiteral( "times" ), timesMap );
}

void QgsBench::saveSnapsot( const QString & fileName )
void QgsBench::saveSnapsot( const QString &fileName )
{
// If format is 0, QImage will attempt to guess the format by looking at fileName's suffix.
mImage.save( fileName );
}

void QgsBench::printLog( const QString& printTime )
void QgsBench::printLog( const QString &printTime )
{
std::cout << "iterations: " << mLogMap[QStringLiteral( "iterations" )].toString().toAscii().constData() << std::endl;

@@ -296,7 +296,7 @@ void QgsBench::printLog( const QString& printTime )
}
}

QString QgsBench::serialize( const QMap<QString, QVariant>& map, int level )
QString QgsBench::serialize( const QMap<QString, QVariant> &map, int level )
{
QStringList list;
QString space = QStringLiteral( " " ).repeated( level * 2 );
@@ -315,7 +315,7 @@ QString QgsBench::serialize( const QMap<QString, QVariant>& map, int level )
case QMetaType::QString:
list.append( space2 + '\"' + i.key() + "\": \"" + i.value().toString().replace( '\\', QLatin1String( "\\\\" ) ).replace( '\"', QLatin1String( "\\\"" ) ) + '\"' );
break;
//case QMetaType::QMap: QMap is not in QMetaType
//case QMetaType::QMap: QMap is not in QMetaType
default:
list.append( space2 + '\"' + i.key() + "\": " + serialize( i.value().toMap(), level + 1 ) );
break;
@@ -325,7 +325,7 @@ QString QgsBench::serialize( const QMap<QString, QVariant>& map, int level )
return space + "{\n" + list.join( QStringLiteral( ",\n" ) ) + '\n' + space + '}';
}

void QgsBench::saveLog( const QString & fileName )
void QgsBench::saveLog( const QString &fileName )
{
QFile file( fileName );
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate ) )
@@ -44,19 +44,19 @@ class QgsBench : public QObject

void render();

void printLog( const QString& printTime );
void printLog( const QString &printTime );

bool openProject( const QString & fileName );
bool openProject( const QString &fileName );

void setExtent( const QgsRectangle & extent );
void setExtent( const QgsRectangle &extent );

void saveSnapsot( const QString & fileName );
void saveSnapsot( const QString &fileName );

void saveLog( const QString & fileName );
void saveLog( const QString &fileName );

QString serialize( const QMap<QString, QVariant>& map, int level = 0 );
QString serialize( const QMap<QString, QVariant> &map, int level = 0 );

void setRenderHints( const QPainter::RenderHints& hints ) { mRendererHints = hints; }
void setRenderHints( const QPainter::RenderHints &hints ) { mRendererHints = hints; }

void setParallel( bool enabled ) { mParallel = enabled; }

@@ -87,7 +87,7 @@ class QgsBench : public QObject
QTime mWallTime; // 'wall clock' time

// user, sys, total times
QVector<double*> mTimes;
QVector<double *> mTimes;

QImage mImage;

@@ -52,8 +52,8 @@


DynamicTreeModel::DynamicTreeModel( QObject *parent )
: QAbstractItemModel( parent )
, nextId( 1 )
: QAbstractItemModel( parent )
, nextId( 1 )
{
}

@@ -182,7 +182,7 @@ void DynamicTreeModel::clear()


ModelChangeCommand::ModelChangeCommand( DynamicTreeModel *model, QObject *parent )
: QObject( parent ), m_model( model ), m_numCols( 1 ), m_startRow( -1 ), m_endRow( -1 )
: QObject( parent ), m_model( model ), m_numCols( 1 ), m_startRow( -1 ), m_endRow( -1 )
{

}
@@ -201,7 +201,7 @@ QModelIndex ModelChangeCommand::findIndex( QList<int> rows )
}

ModelInsertCommand::ModelInsertCommand( DynamicTreeModel *model, QObject *parent )
: ModelChangeCommand( model, parent )
: ModelChangeCommand( model, parent )
{

}
@@ -233,8 +233,8 @@ void ModelInsertCommand::doCommand()


ModelMoveCommand::ModelMoveCommand( DynamicTreeModel *model, QObject *parent )
: ModelChangeCommand( model, parent )
, m_destRow( 0 )
: ModelChangeCommand( model, parent )
, m_destRow( 0 )
{

}
@@ -286,8 +286,8 @@ void ModelMoveCommand::emitPostSignal()
m_model->endMoveRows();
}

ModelResetCommand::ModelResetCommand( DynamicTreeModel* model, QObject* parent )
: ModelMoveCommand( model, parent )
ModelResetCommand::ModelResetCommand( DynamicTreeModel *model, QObject *parent )
: ModelMoveCommand( model, parent )
{

}
@@ -313,8 +313,8 @@ void ModelResetCommand::emitPostSignal()
m_model->reset();
}

ModelResetCommandFixed::ModelResetCommandFixed( DynamicTreeModel* model, QObject* parent )
: ModelMoveCommand( model, parent )
ModelResetCommandFixed::ModelResetCommandFixed( DynamicTreeModel *model, QObject *parent )
: ModelMoveCommand( model, parent )
{

}
@@ -119,15 +119,15 @@ class ModelChangeCommand : public QObject
virtual void doCommand() = 0;

protected:
DynamicTreeModel* m_model = nullptr;
DynamicTreeModel *m_model = nullptr;
QList<int> m_rowNumbers;
int m_numCols;
int m_startRow;
int m_endRow;

};

typedef QList<ModelChangeCommand*> ModelChangeCommandList;
typedef QList<ModelChangeCommand *> ModelChangeCommandList;

class ModelInsertCommand : public ModelChangeCommand
{
@@ -172,7 +172,7 @@ class ModelResetCommand : public ModelMoveCommand
{
Q_OBJECT
public:
ModelResetCommand( DynamicTreeModel* model, QObject* parent = 0 );
ModelResetCommand( DynamicTreeModel *model, QObject *parent = 0 );

virtual ~ModelResetCommand();

@@ -188,7 +188,7 @@ class ModelResetCommandFixed : public ModelMoveCommand
{
Q_OBJECT
public:
ModelResetCommandFixed( DynamicTreeModel* model, QObject* parent = 0 );
ModelResetCommandFixed( DynamicTreeModel *model, QObject *parent = 0 );

virtual ~ModelResetCommandFixed();

@@ -384,7 +384,7 @@ void ModelTest::checkChildren( const QModelIndex &parent, int currentDepth )
if ( model->parent( index ) != parent )
{
qDebug() << r << c << currentDepth << model->data( index ).toString()
<< model->data( parent ).toString();
<< model->data( parent ).toString();
qDebug() << index << parent << model->parent( index );
// And a view that you can even use to show the model.
// QTreeView view;
@@ -514,7 +514,7 @@ void ModelTest::rowsAboutToBeInserted( const QModelIndex &parent, int start, int
\sa rowsAboutToBeInserted()
*/
void ModelTest::rowsInserted( const QModelIndex & parent, int start, int end )
void ModelTest::rowsInserted( const QModelIndex &parent, int start, int end )
{
Changing c = insert.pop();
Q_ASSERT( c.parent == parent );
@@ -578,7 +578,7 @@ void ModelTest::rowsAboutToBeRemoved( const QModelIndex &parent, int start, int
\sa rowsAboutToBeRemoved()
*/
void ModelTest::rowsRemoved( const QModelIndex & parent, int start, int end )
void ModelTest::rowsRemoved( const QModelIndex &parent, int start, int end )
{
qDebug() << "rr" << parent << start << end;
Changing c = remove.pop();
@@ -75,9 +75,9 @@ class CORE_EXPORT ModelTest : public QObject
void layoutAboutToBeChanged();
void layoutChanged();
void rowsAboutToBeInserted( const QModelIndex &parent, int start, int end );
void rowsInserted( const QModelIndex & parent, int start, int end );
void rowsInserted( const QModelIndex &parent, int start, int end );
void rowsAboutToBeRemoved( const QModelIndex &parent, int start, int end );
void rowsRemoved( const QModelIndex & parent, int start, int end );
void rowsRemoved( const QModelIndex &parent, int start, int end );

private:
void checkChildren( const QModelIndex &parent, int currentDepth = 0 );
@@ -207,7 +207,7 @@ class ObservingObject : public QObject
Q_OBJECT
public:
ObservingObject( AccessibleProxyModel *proxy, QObject *parent = 0 )
: QObject( parent ),
: QObject( parent ),
m_proxy( proxy )
{
connect( m_proxy, SIGNAL( layoutAboutToBeChanged() ), SLOT( storePersistent() ) );
@@ -26,7 +26,7 @@



static QString _tempFile( const QString& name )
static QString _tempFile( const QString &name )
{
return QStringLiteral( "%1/aligntest-%2.tif" ).arg( QDir::tempPath(), name );
}

0 comments on commit b9162dc

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