Skip to content
Permalink
Browse files

Cleanup some constructors

  • Loading branch information
nyalldawson committed Nov 11, 2017
1 parent 871f713 commit c97fa5bdd063f059919f157c96a294b629515a22
@@ -300,6 +300,9 @@ class QgsDrawSourceEffect : QgsPaintEffect
public:

QgsDrawSourceEffect();
%Docstring
Constructor for QgsDrawSourceEffect
%End

static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/;
%Docstring
@@ -614,7 +614,11 @@ class QgsSingleCategoryDiagramRenderer : QgsDiagramRenderer
#include "qgsdiagramrenderer.h"
%End
public:

QgsSingleCategoryDiagramRenderer();
%Docstring
Constructor for QgsSingleCategoryDiagramRenderer
%End

virtual QgsSingleCategoryDiagramRenderer *clone() const /Factory/;

@@ -226,11 +226,6 @@ QRectF QgsPaintEffect::imageBoundingRect( const QgsRenderContext &context ) cons
// QgsDrawSourceEffect
//

QgsDrawSourceEffect::QgsDrawSourceEffect()
: QgsPaintEffect()
{
}

QgsPaintEffect *QgsDrawSourceEffect::create( const QgsStringMap &map )
{
QgsDrawSourceEffect *effect = new QgsDrawSourceEffect();
@@ -326,7 +326,8 @@ class CORE_EXPORT QgsDrawSourceEffect : public QgsPaintEffect
{
public:

QgsDrawSourceEffect();
//! Constructor for QgsDrawSourceEffect
QgsDrawSourceEffect() = default;

/**
* Creates a new QgsDrawSource effect from a properties string map.
@@ -21,8 +21,7 @@
#include <QUndoStack>

QgsLayoutUndoStack::QgsLayoutUndoStack( QgsLayout *layout )
: QObject()
, mLayout( layout )
: mLayout( layout )
, mUndoStack( new QUndoStack( layout ) )
{
connect( mUndoStack.get(), &QUndoStack::indexChanged, this, &QgsLayoutUndoStack::indexChanged );
@@ -75,7 +74,6 @@ void QgsLayoutUndoStack::cancelCommand()
QUndoStack *QgsLayoutUndoStack::stack()
{
return mUndoStack.get();

}

void QgsLayoutUndoStack::notifyUndoRedoOccurred( QgsLayoutItem *item )
@@ -287,8 +287,7 @@ bool QgsGplColorScheme::setColors( const QgsNamedColorList &colors, const QStrin
//

QgsUserColorScheme::QgsUserColorScheme( const QString &filename )
: QgsGplColorScheme()
, mFilename( filename )
: mFilename( filename )
{
QFile sourceFile( gplFilePath() );

@@ -539,10 +539,6 @@ void QgsDiagramRenderer::_writeXml( QDomElement &rendererElem, QDomDocument &doc
rendererElem.setAttribute( QStringLiteral( "attributeLegend" ), mShowAttributeLegend );
}

QgsSingleCategoryDiagramRenderer::QgsSingleCategoryDiagramRenderer(): QgsDiagramRenderer()
{
}

QgsSingleCategoryDiagramRenderer *QgsSingleCategoryDiagramRenderer::clone() const
{
return new QgsSingleCategoryDiagramRenderer( *this );
@@ -589,7 +585,6 @@ void QgsSingleCategoryDiagramRenderer::writeXml( QDomElement &layerElem, QDomDoc


QgsLinearlyInterpolatedDiagramRenderer::QgsLinearlyInterpolatedDiagramRenderer()
: QgsDiagramRenderer()
{
mInterpolationSettings.classificationAttributeIsExpression = false;
}
@@ -646,7 +646,9 @@ class CORE_EXPORT QgsDiagramRenderer
class CORE_EXPORT QgsSingleCategoryDiagramRenderer : public QgsDiagramRenderer
{
public:
QgsSingleCategoryDiagramRenderer();

//! Constructor for QgsSingleCategoryDiagramRenderer
QgsSingleCategoryDiagramRenderer() = default;

QgsSingleCategoryDiagramRenderer *clone() const override SIP_FACTORY;

@@ -108,8 +108,7 @@ QString QgsMultiRenderChecker::controlImagePath() const
///@cond PRIVATE

QgsCompositionChecker::QgsCompositionChecker( const QString &testName, QgsComposition *composition )
: QgsMultiRenderChecker()
, mTestName( testName )
: mTestName( testName )
, mComposition( composition )
, mSize( 1122, 794 )
, mDotsPerMeter( 96 / 25.4 * 1000 )
@@ -178,8 +177,7 @@ bool QgsCompositionChecker::testComposition( QString &checkedReport, int page, i
//

QgsLayoutChecker::QgsLayoutChecker( const QString &testName, QgsLayout *layout )
: QgsMultiRenderChecker()
, mTestName( testName )
: mTestName( testName )
, mLayout( layout )
, mSize( 1122, 794 )
, mDotsPerMeter( 96 / 25.4 * 1000 )
@@ -1384,7 +1384,6 @@ void QgsGrassMapcalc::clear()
/**************************** OBJECT ************************/
QgsGrassMapcalcObject::QgsGrassMapcalcObject( int type )
: QGraphicsRectItem( -1000, -1000, 50, 20, 0 )
, QgsGrassMapcalcItem()
, mType( type )
, mRound( 0. )
, mCenter( -1000, -1000 )
@@ -1794,10 +1793,7 @@ QString QgsGrassMapcalcObject::expression()

/************************* CONNECTOR **********************************/
QgsGrassMapcalcConnector::QgsGrassMapcalcConnector( QGraphicsScene *canvas )
: QgsGrassMapcalcItem()
, mSelectedEnd( -1 )
{

canvas->addItem( this );

QGraphicsLineItem::setZValue( 10 );
@@ -504,7 +504,7 @@ class QgsGrassMapcalcConnector: public QGraphicsLineItem, public QgsGrassMapcalc
std::vector<QPoint> mPoints;

// Selected end, -1 for whole connector
int mSelectedEnd;
int mSelectedEnd = -1;

// Connected objects
std::vector<QgsGrassMapcalcObject *> mSocketObjects;

0 comments on commit c97fa5b

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