Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
indentation update
  • Loading branch information
jef-n committed May 7, 2015
1 parent b91cbee commit da69e0f
Show file tree
Hide file tree
Showing 25 changed files with 171 additions and 133 deletions.
4 changes: 2 additions & 2 deletions src/app/ogr/qgsnewogrconnection.cpp
Expand Up @@ -32,8 +32,8 @@
#endif

QgsNewOgrConnection::QgsNewOgrConnection( QWidget *parent, const QString& connType, const QString& connName, Qt::WindowFlags fl )
: QDialog( parent, fl ),
mOriginalConnName( connName )
: QDialog( parent, fl )
, mOriginalConnName( connName )
{
setupUi( this );

Expand Down
56 changes: 28 additions & 28 deletions src/core/composer/qgscomposition.cpp
Expand Up @@ -147,34 +147,34 @@ void QgsComposition::init()

/*
QgsComposition::QgsComposition()
: QGraphicsScene( 0 ),
mMapRenderer( 0 ),
mPlotStyle( QgsComposition::Preview ),
mPageWidth( 297 ),
mPageHeight( 210 ),
mSpaceBetweenPages( 10 ),
mPageStyleSymbol( 0 ),
mPrintAsRaster( false ),
mGenerateWorldFile( false ),
mWorldFileMap( 0 ),
mUseAdvancedEffects( true ),
mSnapToGrid( false ),
mGridVisible( false ),
mSnapGridResolution( 0 ),
mSnapGridTolerance( 0 ),
mSnapGridOffsetX( 0 ),
mSnapGridOffsetY( 0 ),
mAlignmentSnap( true ),
mGuidesVisible( true ),
mSmartGuides( true ),
mAlignmentSnapTolerance( 0 ),
mSelectionHandles( 0 ),
mActiveItemCommand( 0 ),
mActiveMultiFrameCommand( 0 ),
mAtlasComposition( this ),
mAtlasMode( QgsComposition::AtlasOff ),
mPreventCursorChange( false ),
mItemsModel( 0 )
: QGraphicsScene( 0 )
, mMapRenderer( 0 )
, mPlotStyle( QgsComposition::Preview )
, mPageWidth( 297 )
, mPageHeight( 210 )
, mSpaceBetweenPages( 10 )
, mPageStyleSymbol( 0 )
, mPrintAsRaster( false )
, mGenerateWorldFile( false )
, mWorldFileMap( 0 )
, mUseAdvancedEffects( true )
, mSnapToGrid( false )
, mGridVisible( false )
, mSnapGridResolution( 0 )
, mSnapGridTolerance( 0 )
, mSnapGridOffsetX( 0 )
, mSnapGridOffsetY( 0 )
, mAlignmentSnap( true )
, mGuidesVisible( true )
, mSmartGuides( true )
, mAlignmentSnapTolerance( 0 )
, mSelectionHandles( 0 )
, mActiveItemCommand( 0 )
, mActiveMultiFrameCommand( 0 )
, mAtlasComposition( this )
, mAtlasMode( QgsComposition::AtlasOff )
, mPreventCursorChange( false )
, mItemsModel( 0 )
{
//load default composition settings
loadDefaults();
Expand Down
14 changes: 7 additions & 7 deletions src/core/gps/qgsqtlocationconnection.h
Expand Up @@ -23,15 +23,15 @@
#include <QtCore/QPointer>

#if defined(HAVE_QT_MOBILITY_LOCATION )
#include <QtLocation/QGeoPositionInfoSource>
#include <QtLocation/QGeoSatelliteInfo>
#include <QtLocation/QGeoSatelliteInfoSource>
#include <QtLocation/QGeoPositionInfoSource>
#include <QtLocation/QGeoSatelliteInfo>
#include <QtLocation/QGeoSatelliteInfoSource>

QTM_USE_NAMESPACE
QTM_USE_NAMESPACE
#else // Using QtPositioning
#include <QtPositioning/QGeoPositionInfoSource>
#include <QtPositioning/QGeoSatelliteInfo>
#include <QtPositioning/QGeoSatelliteInfoSource>
#include <QtPositioning/QGeoPositionInfoSource>
#include <QtPositioning/QGeoSatelliteInfo>
#include <QtPositioning/QGeoSatelliteInfoSource>
#endif

class CORE_EXPORT QgsQtLocationConnection: public QgsGPSConnection
Expand Down
15 changes: 13 additions & 2 deletions src/core/pal/labelposition.cpp
Expand Up @@ -55,8 +55,19 @@
namespace pal
{
LabelPosition::LabelPosition( int id, double x1, double y1, double w, double h, double alpha, double cost, FeaturePart *feature, bool isReversed, Quadrant quadrant )
: id( id ), cost( cost ), feature( feature ), probFeat( 0 ), nbOverlap( 0 ), alpha( alpha ), w( w ), h( h ), nextPart( NULL ), partId( -1 ), reversed( isReversed ), upsideDown( false ),
quadrant( quadrant )
: id( id )
, cost( cost )
, feature( feature )
, probFeat( 0 )
, nbOverlap( 0 )
, alpha( alpha )
, w( w )
, h( h )
, nextPart( NULL )
, partId( -1 )
, reversed( isReversed )
, upsideDown( false )
, quadrant( quadrant )
{

// alpha take his value bw 0 and 2*pi rad
Expand Down
19 changes: 14 additions & 5 deletions src/core/pal/layer.cpp
Expand Up @@ -59,11 +59,20 @@ namespace pal
{

Layer::Layer( const char *lyrName, double min_scale, double max_scale, Arrangement arrangement, Units label_unit, double defaultPriority, bool obstacle, bool active, bool toLabel, Pal *pal, bool displayAll )
: pal( pal ), obstacle( obstacle ), active( active ),
toLabel( toLabel ), displayAll( displayAll ), centroidInside( false ), label_unit( label_unit ),
min_scale( min_scale ), max_scale( max_scale ),
arrangement( arrangement ), arrangementFlags( 0 ), mode( LabelPerFeature ), mergeLines( false ),
upsidedownLabels( Upright )
: pal( pal )
, obstacle( obstacle )
, active( active )
, toLabel( toLabel )
, displayAll( displayAll )
, centroidInside( false )
, label_unit( label_unit )
, min_scale( min_scale )
, max_scale( max_scale )
, arrangement( arrangement )
, arrangementFlags( 0 )
, mode( LabelPerFeature )
, mergeLines( false )
, upsidedownLabels( Upright )
{

this->name = new char[strlen( lyrName ) +1];
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgslabel.cpp
Expand Up @@ -45,9 +45,9 @@
#endif

QgsLabel::QgsLabel( const QgsFields & fields )
: mMinScale( 0 ),
mMaxScale( 100000000 ),
mScaleBasedVisibility( false )
: mMinScale( 0 )
, mMaxScale( 100000000 )
, mScaleBasedVisibility( false )
{
mFields = fields;
mLabelFieldIdx.resize( LabelFieldCount );
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsogcutils.cpp
Expand Up @@ -1946,12 +1946,12 @@ QDomElement QgsOgcUtils::expressionUnaryOperatorToOgcFilter( const QgsExpression
// operand expression already created a Literal node:
// take the literal value, prepend - and remove old literal node
uoElem.appendChild( doc.createTextNode( "-" + operandElem.text() ) );
doc.removeChild(operandElem);
doc.removeChild( operandElem );
}
else
{
errorMessage = QString( "This use of unary operator not implemented yet" );
return QDomElement();
errorMessage = QString( "This use of unary operator not implemented yet" );
return QDomElement();
}
break;
case QgsExpression::uoNot:
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsprovidercountcalcevent.cpp
Expand Up @@ -20,8 +20,8 @@
#include "qgis.h"

QgsProviderCountCalcEvent::QgsProviderCountCalcEvent( long featuresCounted )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderCountCalcEvent ) ),
n( featuresCounted )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderCountCalcEvent ) )
, n( featuresCounted )
{
// NO-OP
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsproviderextentcalcevent.cpp
Expand Up @@ -20,8 +20,8 @@
#include "qgis.h"

QgsProviderExtentCalcEvent::QgsProviderExtentCalcEvent( QgsRectangle* layerExtent )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderExtentCalcEvent ) ),
le( layerExtent )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderExtentCalcEvent ) )
, le( layerExtent )
{
// NO-OP
}
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsprovidermetadata.cpp
Expand Up @@ -23,9 +23,9 @@
QgsProviderMetadata::QgsProviderMetadata( QString const & _key,
QString const & _description,
QString const & _library )
: key_( _key ),
description_( _description ),
library_( _library )
: key_( _key )
, description_( _description )
, library_( _library )
{}

QString const & QgsProviderMetadata::key() const
Expand Down
24 changes: 12 additions & 12 deletions src/core/qgsrendercontext.cpp
Expand Up @@ -21,18 +21,18 @@
#include "qgsmapsettings.h"

QgsRenderContext::QgsRenderContext()
: mPainter( 0 ),
mCoordTransform( 0 ),
mDrawEditingInformation( true ),
mForceVectorOutput( false ),
mUseAdvancedEffects( true ),
mRenderingStopped( false ),
mScaleFactor( 1.0 ),
mRasterScaleFactor( 1.0 ),
mRendererScale( 1.0 ),
mLabelingEngine( NULL ),
mShowSelection( true ),
mUseRenderingOptimization( true )
: mPainter( 0 )
, mCoordTransform( 0 )
, mDrawEditingInformation( true )
, mForceVectorOutput( false )
, mUseAdvancedEffects( true )
, mRenderingStopped( false )
, mScaleFactor( 1.0 )
, mRasterScaleFactor( 1.0 )
, mRendererScale( 1.0 )
, mLabelingEngine( NULL )
, mShowSelection( true )
, mUseRenderingOptimization( true )
{
mVectorSimplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification );
}
Expand Down
6 changes: 3 additions & 3 deletions src/core/raster/qgsbrightnesscontrastfilter.cpp
Expand Up @@ -23,9 +23,9 @@
#include <QDomElement>

QgsBrightnessContrastFilter::QgsBrightnessContrastFilter( QgsRasterInterface* input )
: QgsRasterInterface( input ),
mBrightness( 0 ),
mContrast( 0 )
: QgsRasterInterface( input )
, mBrightness( 0 )
, mContrast( 0 )
{
}

Expand Down
18 changes: 9 additions & 9 deletions src/core/raster/qgshuesaturationfilter.cpp
Expand Up @@ -23,15 +23,15 @@


QgsHueSaturationFilter::QgsHueSaturationFilter( QgsRasterInterface* input )
: QgsRasterInterface( input ),
mSaturation( 0 ),
mSaturationScale( 1 ),
mGrayscaleMode( QgsHueSaturationFilter::GrayscaleOff ),
mColorizeOn( false ),
mColorizeColor( QColor::fromRgb( 255, 128, 128 ) ),
mColorizeH( 0 ),
mColorizeS( 50 ),
mColorizeStrength( 100 )
: QgsRasterInterface( input )
, mSaturation( 0 )
, mSaturationScale( 1 )
, mGrayscaleMode( QgsHueSaturationFilter::GrayscaleOff )
, mColorizeOn( false )
, mColorizeColor( QColor::fromRgb( 255, 128, 128 ) )
, mColorizeH( 0 )
, mColorizeS( 50 )
, mColorizeStrength( 100 )
{
}

Expand Down
7 changes: 4 additions & 3 deletions src/core/raster/qgsrasterresamplefilter.cpp
Expand Up @@ -33,9 +33,10 @@
#include <QPainter>

QgsRasterResampleFilter::QgsRasterResampleFilter( QgsRasterInterface* input )
: QgsRasterInterface( input ),
mZoomedInResampler( 0 ), mZoomedOutResampler( 0 ),
mMaxOversampling( 2.0 )
: QgsRasterInterface( input )
, mZoomedInResampler( 0 )
, mZoomedOutResampler( 0 )
, mMaxOversampling( 2.0 )
{
}

Expand Down
21 changes: 13 additions & 8 deletions src/core/symbology-ng/qgscptcityarchive.cpp
Expand Up @@ -43,7 +43,8 @@ QMap< QString, QgsCptCityArchive* > QgsCptCityArchive::archiveRegistry() { retur
QMap< QString, QMap< QString, QString > > QgsCptCityArchive::mCopyingInfoMap;

QgsCptCityArchive::QgsCptCityArchive( QString archiveName, QString baseDir )
: mArchiveName( archiveName ), mBaseDir( baseDir )
: mArchiveName( archiveName )
, mBaseDir( baseDir )
{
QgsDebugMsg( "archiveName = " + archiveName + " baseDir = " + baseDir );

Expand Down Expand Up @@ -496,8 +497,9 @@ void QgsCptCityArchive::clearArchives()
QgsCptCityDataItem::QgsCptCityDataItem( QgsCptCityDataItem::Type type, QgsCptCityDataItem* parent,
QString name, QString path )
// Do not pass parent to QObject, Qt would delete this when parent is deleted
: QObject(), mType( type ), mParent( parent ), mPopulated( false ),
mName( name ), mPath( path ), mValid( true )
: QObject()
, mType( type ), mParent( parent ), mPopulated( false )
, mName( name ), mPath( path ), mValid( true )
{
}

Expand Down Expand Up @@ -709,8 +711,9 @@ bool QgsCptCityDataItem::equal( const QgsCptCityDataItem *other )

QgsCptCityColorRampItem::QgsCptCityColorRampItem( QgsCptCityDataItem* parent,
QString name, QString path, QString variantName, bool initialize )
: QgsCptCityDataItem( ColorRamp, parent, name, path ),
mInitialised( false ), mRamp( path, variantName, false )
: QgsCptCityDataItem( ColorRamp, parent, name, path )
, mInitialised( false )
, mRamp( path, variantName, false )
{
// QgsDebugMsg( "name= " + name + " path= " + path );
mPopulated = true;
Expand All @@ -720,8 +723,9 @@ QgsCptCityColorRampItem::QgsCptCityColorRampItem( QgsCptCityDataItem* parent,

QgsCptCityColorRampItem::QgsCptCityColorRampItem( QgsCptCityDataItem* parent,
QString name, QString path, QStringList variantList, bool initialize )
: QgsCptCityDataItem( ColorRamp, parent, name, path ),
mInitialised( false ), mRamp( path, variantList, QString(), false )
: QgsCptCityDataItem( ColorRamp, parent, name, path )
, mInitialised( false )
, mRamp( path, variantList, QString(), false )
{
// QgsDebugMsg( "name= " + name + " path= " + path );
mPopulated = true;
Expand Down Expand Up @@ -836,7 +840,8 @@ QIcon QgsCptCityColorRampItem::icon( const QSize& size )
// ---------------------------------------------------------------------
QgsCptCityCollectionItem::QgsCptCityCollectionItem( QgsCptCityDataItem* parent,
QString name, QString path )
: QgsCptCityDataItem( Collection, parent, name, path ), mPopulatedRamps( false )
: QgsCptCityDataItem( Collection, parent, name, path )
, mPopulatedRamps( false )
{
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Expand Up @@ -495,10 +495,10 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV
double angle = mAngle;
if ( hasDataDefinedProperty( "angle" ) )
{
angle = evaluateDataDefinedProperty("angle", context.feature() ).toDouble();
angle = evaluateDataDefinedProperty( "angle", context.feature() ).toDouble();
}

bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation || hasDataDefinedProperty("angle");
bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation || hasDataDefinedProperty( "angle" );
if ( hasDataDefinedRotation )
{
// For non-point markers, "dataDefinedRotation" means following the
Expand All @@ -523,9 +523,9 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV

//data defined shape?
bool createdNewPath = false;
if ( hasDataDefinedProperty("name") )
if ( hasDataDefinedProperty( "name" ) )
{
QString name = evaluateDataDefinedProperty("name", context.feature() ).toString();
QString name = evaluateDataDefinedProperty( "name", context.feature() ).toString();
if ( !prepareShape( name ) ) // drawing as a polygon
{
preparePath( name ); // drawing as a painter path
Expand Down

0 comments on commit da69e0f

Please sign in to comment.