Skip to content
Permalink
Browse files

Use =default, =delete where possible

  • Loading branch information
nyalldawson committed Nov 11, 2017
1 parent bcd9071 commit 2e6d125a6f28871215df9e19585d961e2333141c
Showing with 181 additions and 281 deletions.
  1. +0 −1 python/core/effects/qgsimageoperation.sip
  2. +6 −0 python/core/fieldformatter/qgsvaluerelationfieldformatter.sip
  3. +3 −0 python/core/qgsdartmeasurement.sip
  4. +3 −0 python/core/qgsdiagramrenderer.sip
  5. +6 −0 python/core/qgseditformconfig.sip
  6. +3 −0 python/core/qgseditorwidgetsetup.sip
  7. +3 −0 python/core/qgserror.sip
  8. +3 −0 python/core/qgsexpressioncontext.sip
  9. +4 −0 python/core/qgspallabeling.sip
  10. +3 −0 python/core/qgsvectorfilewriter.sip
  11. +3 −0 python/core/qgsvectorlayereditbuffer.sip
  12. +3 −0 python/core/qgsvectorlayerutils.sip
  13. +1 −0 python/core/symbology/qgssymbol.sip
  14. +3 −0 python/gui/qgsattributeeditorcontext.sip
  15. +3 −0 python/gui/qgsidentifymenu.sip
  16. +0 −2 python/gui/qgslonglongvalidator.sip
  17. +3 −0 python/gui/qgsmaptoolidentify.sip
  18. +0 −2 python/gui/qgssublayersdialog.sip
  19. +1 −0 python/server/qgsbufferserverresponse.sip
  20. +0 −4 src/3d/terrain/qgsdemterraintilegeometry_p.cpp
  21. +0 −4 src/3d/terrain/qgsdemterraintileloader_p.cpp
  22. +0 −1 src/3d/terrain/qgsdemterraintileloader_p.h
  23. +0 −5 src/3d/terrain/qgsflatterraingenerator.cpp
  24. +1 −1 src/3d/terrain/qgsflatterraingenerator.h
  25. +0 −5 src/3d/terrain/qgsterraintextureimage_p.cpp
  26. +0 −1 src/3d/terrain/qgsterraintextureimage_p.h
  27. +0 −6 src/analysis/interpolation/Bezier3D.h
  28. +1 −7 src/analysis/interpolation/HalfEdge.h
  29. +1 −12 src/analysis/interpolation/LinTriangleInterpolator.h
  30. +2 −12 src/analysis/interpolation/ParametricLine.h
  31. +2 −12 src/analysis/interpolation/TriDecorator.h
  32. +1 −7 src/analysis/interpolation/Triangulation.h
  33. +1 −6 src/analysis/interpolation/Vector3D.h
  34. +1 −1 src/analysis/network/qgsgraph.h
  35. +1 −2 src/analysis/network/qgsgraphbuilderinterface.h
  36. +1 −1 src/analysis/network/qgsnetworkstrategy.h
  37. +4 −2 src/analysis/vector/qgsgeometrysnapper.h
  38. +0 −4 src/app/3d/qgs3dmapconfigwidget.cpp
  39. +0 −1 src/app/3d/qgs3dmapconfigwidget.h
  40. +0 −4 src/app/3d/qgsvectorlayer3drendererwidget.cpp
  41. +1 −2 src/app/3d/qgsvectorlayer3drendererwidget.h
  42. +1 −2 src/app/qgisapp.h
  43. +0 −4 src/app/qgsattributerelationedit.cpp
  44. +0 −1 src/app/qgsattributerelationedit.h
  45. +0 −3 src/app/qgsattributesforminitcode.cpp
  46. +0 −1 src/app/qgsattributesforminitcode.h
  47. +0 −6 src/app/qgsattributesformproperties.cpp
  48. +0 −1 src/app/qgsattributesformproperties.h
  49. +1 −1 src/app/qgsmaptoollabel.h
  50. +1 −7 src/app/qgssourcefieldsproperties.cpp
  51. +0 −1 src/app/qgssourcefieldsproperties.h
  52. +0 −10 src/app/qgsversionmigration.cpp
  53. +2 −2 src/app/qgsversionmigration.h
  54. +0 −2 src/core/effects/qgsimageoperation.h
  55. +2 −1 src/core/expression/qgsexpression.h
  56. +3 −2 src/core/fieldformatter/qgsvaluerelationfieldformatter.h
  57. +5 −7 src/core/pal/rtree.hpp
  58. +2 −2 src/core/pal/util.h
  59. +1 −2 src/core/qgsaction.h
  60. +3 −1 src/core/qgsattributes.h
  61. +1 −2 src/core/qgsattributetableconfig.h
  62. +2 −2 src/core/qgsdartmeasurement.h
  63. +2 −2 src/core/qgsdiagramrenderer.h
  64. +4 −2 src/core/qgseditformconfig.h
  65. +2 −1 src/core/qgseditorwidgetsetup.h
  66. +3 −3 src/core/qgserror.h
  67. +1 −2 src/core/qgsexception.h
  68. +2 −1 src/core/qgsexpressioncontext.h
  69. +1 −2 src/core/qgsfeaturefiltermodel.h
  70. +0 −4 src/core/qgsfeaturefiltermodel_p.h
  71. +1 −1 src/core/qgsfeaturefilterprovider.h
  72. +1 −5 src/core/qgsfeatureiterator.h
  73. +1 −1 src/core/qgsfeaturerequest.h
  74. +1 −1 src/core/qgsfield_p.h
  75. +1 −1 src/core/qgsgml.h
  76. +2 −2 src/core/qgslegendrenderer.h
  77. +1 −1 src/core/qgsogcutils.h
  78. +1 −3 src/core/qgsoptional.h
  79. +3 −2 src/core/qgspallabeling.h
  80. +1 −2 src/core/qgspointlocator.h
  81. +1 −2 src/core/qgspointxy.h
  82. +1 −2 src/core/qgsprojectversion.h
  83. +1 −2 src/core/qgsproperty_p.h
  84. +1 −1 src/core/qgsrelation.h
  85. +2 −2 src/core/qgssqlstatement.h
  86. +0 −3 src/core/qgstextrenderer.h
  87. +2 −2 src/core/qgsvectorfilewriter.h
  88. +2 −1 src/core/qgsvectorlayereditbuffer.h
  89. +2 −1 src/core/qgsvectorlayerutils.h
  90. +1 −1 src/core/raster/qgscolorrampshader.h
  91. +6 −0 src/core/symbology/qgssymbol.h
  92. +2 −2 src/gui/qgsattributeeditorcontext.h
  93. +0 −3 src/gui/qgsattributeform.h
  94. +2 −2 src/gui/qgsidentifymenu.h
  95. +0 −3 src/gui/qgslonglongvalidator.h
  96. +2 −1 src/gui/qgsmaptoolidentify.h
  97. +1 −1 src/gui/qgsoptionswidgetfactory.h
  98. +1 −1 src/gui/qgssqlcomposerdialog.h
  99. +0 −2 src/gui/qgssublayersdialog.h
  100. +2 −2 src/gui/qgstabwidget.h
  101. +1 −1 src/plugins/geometry_checker/qgsgeometrycheckfactory.h
  102. +1 −1 src/plugins/georeferencer/qgsgeoreftransform.h
  103. +0 −4 src/plugins/georeferencer/qgsmapcoordsdialog.h
  104. +1 −1 src/plugins/gps_importer/qgsbabelformat.h
  105. +1 −1 src/plugins/gps_importer/qgsgpsdevice.h
  106. +1 −2 src/plugins/qgsapplydialog.h
  107. +1 −2 src/plugins/topology/topolError.h
  108. +2 −3 src/providers/ogr/qgscplerrorhandler.h
  109. +0 −12 src/providers/ogr/qgsogrprovider.cpp
  110. +4 −4 src/providers/ogr/qgsogrprovider.h
  111. +2 −1 src/providers/postgres/qgspostgresconn.h
  112. +1 −1 src/providers/virtual/qgsslottofunction.h
  113. +1 −1 src/providers/virtual/qgsvirtuallayerprovider.h
  114. +1 −2 src/providers/virtual/qgsvirtuallayerqueryparser.h
  115. +1 −1 src/providers/virtual/qgsvirtuallayersqlitehelper.h
  116. +1 −1 src/python/qgspythonutils.h
  117. +6 −0 src/server/qgsbufferserverresponse.h
  118. +5 −2 src/server/qgsfilterrestorer.h
  119. +1 −5 tests/src/core/testqgscadutils.cpp
  120. +1 −1 tests/src/providers/testqgswcspublicservers.h
@@ -93,7 +93,6 @@ class QgsImageOperation

struct DistanceTransformProperties
{
DistanceTransformProperties();

bool shadeExterior;
%Docstring
@@ -25,8 +25,14 @@ class QgsValueRelationFieldFormatter : QgsFieldFormatter
struct ValueRelationItem
{
ValueRelationItem( const QVariant &key, const QString &value );
%Docstring
Constructor for ValueRelationItem
%End

ValueRelationItem();
%Docstring
Constructor for ValueRelationItem
%End

QVariant key;
QString value;
@@ -24,6 +24,9 @@ class QgsDartMeasurement
};

QgsDartMeasurement();
%Docstring
Constructor for QgsDartMeasurement
%End

QgsDartMeasurement( const QString &name, Type type, const QString &value );

@@ -319,6 +319,9 @@ class QgsDiagramSettings
};

QgsDiagramSettings();
%Docstring
Constructor for QgsDiagramSettings
%End

bool enabled;
QFont font;
@@ -29,6 +29,9 @@ class QgsEditFormConfig
struct GroupData
{
GroupData();
%Docstring
Constructor for GroupData
%End
GroupData( const QString &name, const QList<QString> &fields );
QString mName;
QList<QString> mFields;
@@ -37,6 +40,9 @@ class QgsEditFormConfig
struct TabData
{
TabData();
%Docstring
Constructor for TabData
%End
TabData( const QString &name, const QList<QString> &fields, const QList<QgsEditFormConfig::GroupData> &groups );
QString mName;
QList<QString> mFields;
@@ -27,6 +27,9 @@ class QgsEditorWidgetSetup
%End

QgsEditorWidgetSetup();
%Docstring
Constructor for QgsEditorWidgetSetup
%End

QString type() const;
%Docstring
@@ -27,6 +27,9 @@ class QgsErrorMessage
};

QgsErrorMessage();
%Docstring
Constructor for QgsErrorMessage
%End

QgsErrorMessage( const QString &message, const QString &tag = QString(), const QString &file = QString(), const QString &function = QString(), int line = 0 );
%Docstring
@@ -345,6 +345,9 @@ class QgsExpressionContext
public:

QgsExpressionContext();
%Docstring
Constructor for QgsExpressionContext
%End

explicit QgsExpressionContext( const QList<QgsExpressionContextScope *> &scopes /Transfer/ );
%Docstring
@@ -20,7 +20,11 @@ class QgsLabelPosition
%End
public:
QgsLabelPosition( int id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString() );

QgsLabelPosition();
%Docstring
Constructor for QgsLabelPosition
%End

int featureId;
double rotation;
@@ -107,6 +107,9 @@ There are two possibilities how to use this class:
struct MetaData
{
MetaData();
%Docstring
Constructor for MetaData
%End

MetaData( const QString &longName, const QString &trLongName, const QString &glob, const QString &ext, const QMap<QString, QgsVectorFileWriter::Option *> &driverOptions, const QMap<QString, QgsVectorFileWriter::Option *> &layerOptions, const QString &compulsoryEncoding = QString() );

@@ -249,6 +249,9 @@ Signals emitted after committing changes
protected:

QgsVectorLayerEditBuffer();
%Docstring
Constructor for QgsVectorLayerEditBuffer
%End

void updateFields( QgsFields &fields );

@@ -36,6 +36,9 @@ class QgsVectorLayerUtils
public:

QgsDuplicateFeatureContext();
%Docstring
Constructor for QgsDuplicateFeatureContext
%End

QList<QgsVectorLayer *> layers() const;
%Docstring
@@ -404,6 +404,7 @@ class QgsSymbolRenderContext
\param mapUnitScale
%End


QgsRenderContext &renderContext();
%Docstring
:rtype: QgsRenderContext
@@ -39,6 +39,9 @@ class QgsAttributeEditorContext
};

QgsAttributeEditorContext();
%Docstring
Constructor for QgsAttributeEditorContext
%End

QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, FormMode formMode );

@@ -32,6 +32,9 @@ class QgsIdentifyMenu : QMenu
struct ActionData
{
ActionData();
%Docstring
Constructor for ActionData
%End

ActionData( QgsMapLayer *layer, QgsMapLayerAction *mapLayerAction = 0 );

@@ -20,8 +20,6 @@ class QgsLongLongValidator : QValidator

QgsLongLongValidator( qint64 bottom, qint64 top, QObject *parent );

~QgsLongLongValidator();

virtual QValidator::State validate( QString &input, int & ) const;

void setBottom( qint64 bottom );
@@ -47,6 +47,9 @@ after selecting a point, performs the identification:
struct IdentifyResult
{
IdentifyResult();
%Docstring
Constructor for IdentifyResult
%End

IdentifyResult( QgsMapLayer *layer, const QgsFeature &feature, const QMap< QString, QString > &derivedAttributes );
IdentifyResult( QgsMapLayer *layer, const QString &label, const QMap< QString, QString > &attributes, const QMap< QString, QString > &derivedAttributes );
@@ -25,8 +25,6 @@ class QgsSublayersDialog : QDialog

struct LayerDefinition
{
LayerDefinition();

int layerId;
QString layerName; //!< Name of the layer (not necessarily unique)
int count;
@@ -22,6 +22,7 @@ class QgsBufferServerResponse: QgsServerResponse

QgsBufferServerResponse();


virtual void setHeader( const QString &key, const QString &value );

%Docstring
@@ -141,8 +141,6 @@ class PlaneVertexBufferFunctor : public QBufferDataGenerator
, mHeightMap( heightMap )
{}

~PlaneVertexBufferFunctor() {}

QByteArray operator()() final
{
return createPlaneVertexData( mResolution, mSkirtHeight, mHeightMap );
@@ -175,8 +173,6 @@ class PlaneIndexBufferFunctor : public QBufferDataGenerator
: mResolution( resolution )
{}

~PlaneIndexBufferFunctor() {}

QByteArray operator()() final
{
return createPlaneIndexData( mResolution );
@@ -57,10 +57,6 @@ QgsDemTerrainTileLoader::QgsDemTerrainTileLoader( QgsTerrainEntity *terrain, Qgs
mSkirtHeight = generator->skirtHeight();
}

QgsDemTerrainTileLoader::~QgsDemTerrainTileLoader()
{
}

Qt3DCore::QEntity *QgsDemTerrainTileLoader::createEntity( Qt3DCore::QEntity *parent )
{
QgsTerrainTileEntity *entity = new QgsTerrainTileEntity;
@@ -49,7 +49,6 @@ class QgsDemTerrainTileLoader : public QgsTerrainTileLoader
public:
//! Constructs loader for the given chunk node
QgsDemTerrainTileLoader( QgsTerrainEntity *terrain, QgsChunkNode *node );
~QgsDemTerrainTileLoader();

virtual Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent );

@@ -92,11 +92,6 @@ Qt3DCore::QEntity *FlatTerrainChunkLoader::createEntity( Qt3DCore::QEntity *pare

// ---------------


QgsFlatTerrainGenerator::QgsFlatTerrainGenerator()
{
}

QgsChunkLoader *QgsFlatTerrainGenerator::createChunkLoader( QgsChunkNode *node ) const
{
return new FlatTerrainChunkLoader( mTerrain, node );
@@ -33,7 +33,7 @@ class _3D_EXPORT QgsFlatTerrainGenerator : public QgsTerrainGenerator
{
public:
//! Creates flat terrain generator object
QgsFlatTerrainGenerator();
QgsFlatTerrainGenerator() = default;

virtual QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const override SIP_FACTORY;

@@ -76,11 +76,6 @@ QgsTerrainTextureImage::QgsTerrainTextureImage( const QImage &image, const QgsRe
{
}


QgsTerrainTextureImage::~QgsTerrainTextureImage()
{
}

Qt3DRender::QTextureImageDataGeneratorPtr QgsTerrainTextureImage::dataGenerator() const
{
return Qt3DRender::QTextureImageDataGeneratorPtr( new TerrainTextureImageDataGenerator( mExtent, mDebugText, mImage, mVersion ) );
@@ -47,7 +47,6 @@ class QgsTerrainTextureImage : public Qt3DRender::QAbstractTextureImage
public:
//! Constructs the object with given image and map extent
QgsTerrainTextureImage( const QImage &image, const QgsRectangle &extent, const QString &debugText, Qt3DCore::QNode *parent = nullptr );
~QgsTerrainTextureImage();

virtual Qt3DRender::QTextureImageDataGeneratorPtr dataGenerator() const override;

@@ -38,7 +38,6 @@ class ANALYSIS_EXPORT Bezier3D: public ParametricLine
//! Constructor, par is a pointer to the parent, controlpoly a controlpolygon
Bezier3D( ParametricLine *par, QVector<QgsPoint *> *controlpoly );

virtual ~Bezier3D();
//! Do not use this method, since a Bezier curve does not consist of other curves
virtual void add( ParametricLine *pl SIP_TRANSFER ) override;
//! Calculates the first derivative and assigns it to v
@@ -83,11 +82,6 @@ inline Bezier3D::Bezier3D( ParametricLine *parent, QVector<QgsPoint *> *controlp
mDegree = mControlPoly->count() - 1;
}

inline Bezier3D::~Bezier3D()
{

}

//----------------------------------------------invalid methods add and remove (because of inheritance from ParametricLine)

inline void Bezier3D::add( ParametricLine *pl )
@@ -42,7 +42,7 @@ class ANALYSIS_EXPORT HalfEdge

public:
//! Default constructor. Values for mDual, mNext, mPoint are set to -10 which means that they are undefined
HalfEdge();
HalfEdge() = default;
HalfEdge( int dual, int next, int point, bool mbreak, bool forced );

//! Returns the number of the dual HalfEdge
@@ -69,12 +69,6 @@ class ANALYSIS_EXPORT HalfEdge

#ifndef SIP_RUN


inline HalfEdge::HalfEdge()
{

}

inline HalfEdge::HalfEdge( int dual, int next, int point, bool mbreak, bool forced ): mDual( dual ), mNext( next ), mPoint( point ), mBreak( mbreak ), mForced( forced )
{

@@ -32,10 +32,9 @@ class ANALYSIS_EXPORT LinTriangleInterpolator : public TriangleInterpolator
{
public:
//! Default constructor
LinTriangleInterpolator();
LinTriangleInterpolator() = default;
//! Constructor with reference to a DualEdgeTriangulation object
LinTriangleInterpolator( DualEdgeTriangulation *tin );
virtual ~LinTriangleInterpolator();
//! Calculates the normal vector and assigns it to vec
virtual bool calcNormVec( double x, double y, Vector3D *result SIP_OUT ) override;
bool calcPoint( double x, double y, QgsPoint &result SIP_OUT ) override;
@@ -55,21 +54,11 @@ class ANALYSIS_EXPORT LinTriangleInterpolator : public TriangleInterpolator

#ifndef SIP_RUN

inline LinTriangleInterpolator::LinTriangleInterpolator()
{

}

inline LinTriangleInterpolator::LinTriangleInterpolator( DualEdgeTriangulation *tin ): mTIN( tin )
{

}

inline LinTriangleInterpolator::~LinTriangleInterpolator()
{

}

inline DualEdgeTriangulation *LinTriangleInterpolator::getTriangulation() const
{
return mTIN;
@@ -43,13 +43,13 @@ class ANALYSIS_EXPORT ParametricLine
QVector<QgsPoint *> *mControlPoly = nullptr;
public:
//! Default constructor
ParametricLine();
ParametricLine() = default;

/**
* Constructor, par is a pointer to the parent object, controlpoly the controlpolygon
*/
ParametricLine( ParametricLine *par SIP_TRANSFER, QVector<QgsPoint *> *controlpoly );
virtual ~ParametricLine();
virtual ~ParametricLine() = default;
virtual void add( ParametricLine *pl SIP_TRANSFER ) = 0;
virtual void calcFirstDer( float t, Vector3D *v SIP_OUT ) = 0;
virtual void calcSecDer( float t, Vector3D *v SIP_OUT ) = 0;
@@ -71,23 +71,13 @@ class ANALYSIS_EXPORT ParametricLine

//-----------------------------------------constructors and destructor----------------------

inline ParametricLine::ParametricLine()
{

}

inline ParametricLine::ParametricLine( ParametricLine *par, QVector<QgsPoint *> *controlpoly )
: mParent( par )
, mControlPoly( controlpoly )
{

}

inline ParametricLine::~ParametricLine()
{
//delete mParent;
}

#endif

#endif

0 comments on commit 2e6d125

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