Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Dec 30, 2014
1 parent e6561ce commit bff64fdef944e302c360778ca92db05d701682dc
Showing with 122 additions and 114 deletions.
  1. +2 −2 python/core/qgsdatadefined.sip
  2. +2 −2 python/plugins/db_manager/dlg_sql_window.py
  3. +1 −1 src/app/qgisapp.h
  4. +1 −1 src/app/qgisappinterface.cpp
  5. +1 −1 src/app/qgsadvanceddigitizingcanvasitem.h
  6. +1 −1 src/astyle/ASBeautifier.cpp
  7. +9 −5 src/core/qgsexpression.cpp
  8. +1 −1 src/core/qgslogger.cpp
  9. +1 −1 src/core/qgsmapsettings.cpp
  10. +19 −15 src/core/qgspallabeling.cpp
  11. +2 −2 src/core/qgssnapper.cpp
  12. +2 −2 src/gui/qgsmapcanvas.cpp
  13. +2 −2 src/gui/qgsmapcanvasitem.cpp
  14. +1 −1 src/gui/qgsmapcanvassnapper.cpp
  15. +1 −1 src/providers/grass/qgis.g.info.c
  16. +1 −1 tests/src/analysis/testqgsvectoranalyzer.cpp
  17. +1 −1 tests/src/analysis/testqgszonalstatistics.cpp
  18. +1 −1 tests/src/app/testqgisappclipboard.cpp
  19. +1 −1 tests/src/core/regression992.cpp
  20. +1 −1 tests/src/core/testqgsatlascomposition.cpp
  21. +1 −1 tests/src/core/testqgsblendmodes.cpp
  22. +1 −1 tests/src/core/testqgscomposerdd.cpp
  23. +1 −1 tests/src/core/testqgscomposereffects.cpp
  24. +1 −1 tests/src/core/testqgscomposergroup.cpp
  25. +1 −1 tests/src/core/testqgscomposerhtml.cpp
  26. +1 −1 tests/src/core/testqgscomposerlabel.cpp
  27. +1 −1 tests/src/core/testqgscomposermap.cpp
  28. +1 −1 tests/src/core/testqgscomposermapgrid.cpp
  29. +1 −1 tests/src/core/testqgscomposermapoverview.cpp
  30. +1 −1 tests/src/core/testqgscomposermodel.cpp
  31. +1 −1 tests/src/core/testqgscomposermultiframe.cpp
  32. +1 −1 tests/src/core/testqgscomposerobject.cpp
  33. +1 −1 tests/src/core/testqgscomposerpaper.cpp
  34. +1 −1 tests/src/core/testqgscomposerpicture.cpp
  35. +1 −1 tests/src/core/testqgscomposerrotation.cpp
  36. +1 −1 tests/src/core/testqgscomposerscalebar.cpp
  37. +1 −1 tests/src/core/testqgscomposershapes.cpp
  38. +1 −1 tests/src/core/testqgscomposertable.cpp
  39. +1 −1 tests/src/core/testqgscomposertablev2.cpp
  40. +1 −1 tests/src/core/testqgscomposerutils.cpp
  41. +1 −1 tests/src/core/testqgscomposition.cpp
  42. +1 −1 tests/src/core/testqgsdataitem.cpp
  43. +1 −1 tests/src/core/testqgsdiagram.cpp
  44. +1 −1 tests/src/core/testqgsdiagramexpression.cpp
  45. +2 −2 tests/src/core/testqgsexpression.cpp
  46. +1 −1 tests/src/core/testqgsgeometry.cpp
  47. +1 −1 tests/src/core/testqgsgradients.cpp
  48. +1 −1 tests/src/core/testqgsinvertedpolygonrenderer.cpp
  49. +1 −1 tests/src/core/testqgsmaplayer.cpp
  50. +1 −1 tests/src/core/testqgsmaprenderer.cpp
  51. +24 −24 tests/src/core/testqgsmaptopixel.cpp
  52. +1 −1 tests/src/core/testqgsnetworkcontentfetcher.cpp
  53. +1 −1 tests/src/core/testqgsrasterfill.cpp
  54. +1 −1 tests/src/core/testqgsrasterlayer.cpp
  55. +1 −1 tests/src/core/testqgsrastersublayer.cpp
  56. +1 −1 tests/src/core/testqgsrenderers.cpp
  57. +1 −1 tests/src/core/testqgsshapeburst.cpp
  58. +1 −1 tests/src/core/testqgsstylev2.cpp
  59. +1 −1 tests/src/core/testqgsvectorlayer.cpp
  60. +1 −1 tests/src/core/testqgsvectorlayercache.cpp
  61. +1 −1 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
  62. +2 −2 tests/src/core/testziplayer.cpp
  63. +1 −1 tests/src/gui/testprojectionissues.cpp
  64. +1 −1 tests/src/gui/testqgsdualview.cpp
  65. +1 −1 tests/src/gui/testqgsmaptoolzoom.cpp
  66. +1 −1 tests/src/gui/testqgsquickprint.cpp
@@ -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;

@@ -130,13 +130,13 @@ def clearSql(self):
self.editSql.setFocus()

def executeSql(self):

sql = ""
if self.editSql.hasSelectedText():
sql = self.editSql.selectedText()
else:
sql = self.editSql.text()

if sql == "":
return

@@ -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 );
@@ -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()
@@ -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 );

@@ -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;
@@ -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 );
}
@@ -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
@@ -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 )
@@ -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 );
}
}
@@ -44,11 +44,11 @@ QgsSnapper::~QgsSnapper()
int QgsSnapper::snapPoint( const QPoint& startPoint, QList<QgsSnappingResult>& snappingResult, const QList<QgsPoint>& 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<QgsSnappingResult>& snappingResult, const QList<QgsPoint>& excludePoints )
{
{
snappingResult.clear();

QMultiMap<double, QgsSnappingResult> snappingResultList;//all snapping results
@@ -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 );
}
@@ -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)
@@ -117,7 +117,7 @@ int QgsMapCanvasSnapper::snapToCurrentLayer( const QPoint& p, QList<QgsSnappingR
int QgsMapCanvasSnapper::snapToBackgroundLayers( const QPoint& p, QList<QgsSnappingResult>& results, const QList<QgsPoint>& 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<QgsSnappingResult>& results, const QList<QgsPoint>& excludePoints )
@@ -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 )
@@ -19,7 +19,7 @@ Email : sherman at mrcc dot com
#include <qgsapplication.h>
#include <qgsproviderregistry.h>

class TestQgsVectorAnalyzer: public QObject
class TestQgsVectorAnalyzer : public QObject
{
Q_OBJECT
private slots:
@@ -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:
@@ -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:
@@ -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:
@@ -33,7 +33,7 @@
#include <QtTest/QSignalSpy>
#include <QtTest/QtTest>

class TestQgsAtlasComposition: public QObject
class TestQgsAtlasComposition : public QObject
{
Q_OBJECT
private slots:
@@ -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:
@@ -32,7 +32,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerDD: public QObject
class TestQgsComposerDD : public QObject
{
Q_OBJECT
private slots:
@@ -25,7 +25,7 @@
#include <QColor>
#include <QPainter>

class TestQgsComposerEffects: public QObject
class TestQgsComposerEffects : public QObject
{
Q_OBJECT
private slots:
@@ -22,7 +22,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerGroup: public QObject
class TestQgsComposerGroup : public QObject
{
Q_OBJECT
private slots:
@@ -24,7 +24,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerHtml: public QObject
class TestQgsComposerHtml : public QObject
{
Q_OBJECT
private slots:
@@ -26,7 +26,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerLabel: public QObject
class TestQgsComposerLabel : public QObject
{
Q_OBJECT
private slots:
@@ -26,7 +26,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerMap: public QObject
class TestQgsComposerMap : public QObject
{
Q_OBJECT
private slots:
@@ -26,7 +26,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerMapGrid: public QObject
class TestQgsComposerMapGrid : public QObject
{
Q_OBJECT
private slots:
@@ -28,7 +28,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerMapOverview: public QObject
class TestQgsComposerMapOverview : public QObject
{
Q_OBJECT
private slots:
@@ -22,7 +22,7 @@
#include <QtTest/QtTest>
#include <QList>

class TestQgsComposerModel: public QObject
class TestQgsComposerModel : public QObject
{
Q_OBJECT

@@ -23,7 +23,7 @@
#include <QObject>
#include <QtTest/QtTest>

class TestQgsComposerMultiFrame: public QObject
class TestQgsComposerMultiFrame : public QObject
{
Q_OBJECT
private slots:

0 comments on commit bff64fd

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