Skip to content
Permalink
Browse files

Fix more classes which violate the rule-of-three

Also remove some empty destructors
  • Loading branch information
nyalldawson committed Jan 26, 2016
1 parent 492c1a9 commit 24d9c65494a9260b1c7339d3655039def888bdf4
Showing with 78 additions and 222 deletions.
  1. +0 −1 python/analysis/interpolation/qgsgridfilewriter.sip
  2. +0 −2 python/analysis/network/qgsgraph.sip
  3. +3 −0 python/analysis/openstreetmap/qgsosmdatabase.sip
  4. +4 −0 python/analysis/raster/qgsalignraster.sip
  5. +0 −2 python/analysis/raster/qgsrastercalculator.sip
  6. +0 −1 python/analysis/vector/qgspointsample.sip
  7. +0 −1 python/analysis/vector/qgstransectsample.sip
  8. +0 −1 python/analysis/vector/qgszonalstatistics.sip
  9. +0 −6 python/core/auth/qgsauthconfig.sip
  10. +0 −1 python/core/composer/qgscomposerlegendstyle.sip
  11. +2 −0 python/core/effects/qgspainteffectregistry.sip
  12. +0 −1 python/core/qgscrscache.sip
  13. +0 −1 python/core/qgsexpression.sip
  14. +0 −6 python/core/qgsfeaturestore.sip
  15. +0 −1 python/core/qgsgeometrycache.sip
  16. +0 −2 python/core/qgsgmlschema.sip
  17. +0 −2 python/core/qgslabelattributes.sip
  18. +1 −2 python/core/qgsmaptopixel.sip
  19. +0 −3 python/core/qgsscalecalculator.sip
  20. +0 −2 python/core/qgssnapper.sip
  21. +0 −1 python/core/raster/qgsrasterdrawer.sip
  22. +0 −1 python/core/raster/qgsrasterfilewriter.sip
  23. +0 −1 python/core/raster/qgsrasteriterator.sip
  24. +0 −2 python/core/raster/qgsrasterrange.sip
  25. +5 −0 python/core/symbology-ng/qgsrendererv2registry.sip
  26. +3 −0 python/core/symbology-ng/qgsrulebasedrendererv2.sip
  27. +5 −0 python/core/symbology-ng/qgssymbollayerv2registry.sip
  28. +0 −1 python/gui/qgsdetaileditemdata.sip
  29. +0 −5 src/analysis/interpolation/qgsgridfilewriter.cpp
  30. +0 −1 src/analysis/interpolation/qgsgridfilewriter.h
  31. +0 −6 src/analysis/network/qgsgraph.cpp
  32. +0 −2 src/analysis/network/qgsgraph.h
  33. +5 −0 src/analysis/openstreetmap/qgsosmdatabase.h
  34. +5 −0 src/analysis/raster/qgsalignraster.h
  35. +0 −5 src/analysis/raster/qgsrastercalculator.cpp
  36. +0 −2 src/analysis/raster/qgsrastercalculator.h
  37. +0 −4 src/analysis/vector/qgspointsample.cpp
  38. +0 −1 src/analysis/vector/qgspointsample.h
  39. +0 −4 src/analysis/vector/qgstransectsample.cpp
  40. +0 −1 src/analysis/vector/qgstransectsample.h
  41. +0 −5 src/analysis/vector/qgszonalstatistics.cpp
  42. +0 −1 src/analysis/vector/qgszonalstatistics.h
  43. +0 −18 src/core/auth/qgsauthconfig.cpp
  44. +0 −7 src/core/auth/qgsauthconfig.h
  45. +0 −4 src/core/composer/qgscomposerlegendstyle.cpp
  46. +0 −1 src/core/composer/qgscomposerlegendstyle.h
  47. +5 −0 src/core/effects/qgspainteffectregistry.h
  48. +4 −0 src/core/geometry/qgsgeos.cpp
  49. +0 −4 src/core/qgscrscache.cpp
  50. +0 −1 src/core/qgscrscache.h
  51. +0 −2 src/core/qgsexpression.cpp
  52. +1 −1 src/core/qgsexpression.h
  53. +0 −12 src/core/qgsfeaturestore.cpp
  54. +0 −6 src/core/qgsfeaturestore.h
  55. +0 −6 src/core/qgsgeometrycache.cpp
  56. +0 −1 src/core/qgsgeometrycache.h
  57. +0 −4 src/core/qgsgmlschema.cpp
  58. +0 −2 src/core/qgsgmlschema.h
  59. +0 −3 src/core/qgslabelattributes.cpp
  60. +0 −2 src/core/qgslabelattributes.h
  61. +0 −4 src/core/qgsmaptopixel.cpp
  62. +0 −3 src/core/qgsmaptopixel.h
  63. +0 −3 src/core/qgsscalecalculator.cpp
  64. +0 −3 src/core/qgsscalecalculator.h
  65. +0 −5 src/core/qgssnapper.cpp
  66. +0 −2 src/core/qgssnapper.h
  67. +0 −4 src/core/raster/qgsrasterdrawer.cpp
  68. +0 −1 src/core/raster/qgsrasterdrawer.h
  69. +0 −5 src/core/raster/qgsrasterfilewriter.cpp
  70. +0 −1 src/core/raster/qgsrasterfilewriter.h
  71. +0 −4 src/core/raster/qgsrasteriterator.cpp
  72. +0 −1 src/core/raster/qgsrasteriterator.h
  73. +0 −4 src/core/raster/qgsrasterrange.cpp
  74. +0 −2 src/core/raster/qgsrasterrange.h
  75. +0 −4 src/core/raster/qgsrasterrendererregistry.cpp
  76. +0 −1 src/core/raster/qgsrasterrendererregistry.h
  77. +4 −0 src/core/symbology-ng/qgsrendererv2registry.h
  78. +22 −0 src/core/symbology-ng/qgsrulebasedrendererv2.h
  79. +3 −0 src/core/symbology-ng/qgssymbollayerv2registry.h
  80. +0 −4 src/gui/qgsdetaileditemdata.cpp
  81. +0 −1 src/gui/qgsdetaileditemdata.h
  82. +6 −0 src/gui/symbology-ng/qgssizescalewidget.cpp
  83. +0 −4 src/providers/gdal/qgsgdalproviderbase.cpp
  84. +0 −2 src/providers/gdal/qgsgdalproviderbase.h
  85. +0 −7 src/providers/postgres/qgspostgresprovider.h
  86. +0 −4 tests/src/core/qgscompositionchecker.cpp
  87. +0 −1 tests/src/core/qgscompositionchecker.h
@@ -6,7 +6,6 @@ class QgsGridFileWriter

public:
QgsGridFileWriter( QgsInterpolator* i, const QString& outputPath, const QgsRectangle& extent, int nCols, int nRows, double cellSizeX, double cellSizeY );
~QgsGridFileWriter();

/** Writes the grid file.
@param showProgressDialog shows a dialog with the possibility to cancel
@@ -91,8 +91,6 @@ class QgsGraph
public:
QgsGraph();

~QgsGraph();

// begin graph constructing methods
/**
* add vertex to a grap
@@ -77,6 +77,9 @@ class QgsOSMDatabase
QString quotedIdentifier( QString id );
QString quotedValue( QString value );

private:

QgsOSMDatabase( const QgsOSMDatabase& rh );
};


@@ -39,6 +39,10 @@ class QgsAlignRaster

//! Get raster value at the given coordinates (from the first band)
double identify( double mx, double my );

private:
RasterInfo( const QgsAlignRaster::RasterInfo& rh );

};


@@ -44,8 +44,6 @@ class QgsRasterCalculator
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat,
const QgsRectangle& outputExtent, const QgsCoordinateReferenceSystem& outputCrs, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries );

~QgsRasterCalculator();

/** Starts the calculation and writes new raster
@param p progress bar (or 0 if called from non-gui code)
@return 0 in case of success*/
@@ -8,7 +8,6 @@ class QgsPointSample
%End
public:
QgsPointSample( QgsVectorLayer* inputLayer, const QString& outputLayer, const QString& nPointsAttribute, const QString& minDistAttribute = QString() );
~QgsPointSample();

/** Starts calculation of random points
@return 0 in case of success*/
@@ -20,7 +20,6 @@ class QgsTransectSample
DistanceUnits minDistUnits, QgsVectorLayer* baselineLayer, bool shareBaseline,
const QString& baselineStrataId, const QString& outputPointLayer, const QString& outputLineLayer, const QString& usedBaselineLayer,
double minTransectLength = 0.0, double baselineBufferDistance = -1.0, double baselineSimplificationTolerance = -1.0 );
~QgsTransectSample();

int createSample( QProgressDialog* pd );
};
@@ -32,7 +32,6 @@ class QgsZonalStatistics

QgsZonalStatistics( QgsVectorLayer* polygonLayer, const QString& rasterFile, const QString& attributePrefix = "", int rasterBand = 1,
const QgsZonalStatistics::Statistics& stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean) );
~QgsZonalStatistics();

/** Starts the calculation
@return 0 in case of success*/
@@ -7,14 +7,10 @@ class QgsAuthMethodConfig

QgsAuthMethodConfig( const QString& method = QString(), int version = 0 );

QgsAuthMethodConfig( const QgsAuthMethodConfig& methodconfig );

bool operator==( const QgsAuthMethodConfig& other ) const;

bool operator!=( const QgsAuthMethodConfig& other ) const;

~QgsAuthMethodConfig();

const QString id() const;
void setId( const QString& id );

@@ -66,7 +62,6 @@ class QgsPkiBundle
QgsPkiBundle( const QSslCertificate &clientCert = QSslCertificate(),
const QSslKey &clientKey = QSslKey(),
const QList<QSslCertificate> &caChain = QList<QSslCertificate>() );
~QgsPkiBundle();

static const QgsPkiBundle fromPemPaths( const QString &certPath,
const QString &keyPath,
@@ -102,7 +97,6 @@ class QgsPkiConfigBundle
QgsPkiConfigBundle( const QgsAuthMethodConfig& config,
const QSslCertificate& cert,
const QSslKey& certkey );
~QgsPkiConfigBundle();

bool isValid();

@@ -22,7 +22,6 @@ class QgsComposerLegendStyle
Right,
};
QgsComposerLegendStyle();
~QgsComposerLegendStyle();

QFont font() const;
QFont & rfont();
@@ -126,6 +126,8 @@ class QgsPaintEffectRegistry
QgsPaintEffectRegistry();
~QgsPaintEffectRegistry();

private:
QgsPaintEffectRegistry( const QgsPaintEffectRegistry& rh );

};

@@ -26,7 +26,6 @@ class QgsCRSCache

public:
static QgsCRSCache* instance();
~QgsCRSCache();
/** Returns the CRS for authid, e.g. 'EPSG:4326' (or an invalid CRS in case of error)*/
const QgsCoordinateReferenceSystem& crsByAuthId( const QString& authid );
const QgsCoordinateReferenceSystem& crsByEpsgId( long epsg );
@@ -478,7 +478,6 @@ class QgsExpression
{
public:
Interval( int seconds = 0 );
~Interval();
double years();
double months();
double weeks();
@@ -7,15 +7,9 @@ class QgsFeatureStore
//! Constructor
QgsFeatureStore();

//! Constructor
QgsFeatureStore( const QgsFeatureStore &rhs );

//! Constructor
QgsFeatureStore( const QgsFields& fields, const QgsCoordinateReferenceSystem& crs );

//! Destructor
~QgsFeatureStore();

/** Get fields list */
QgsFields& fields();

@@ -5,7 +5,6 @@ class QgsGeometryCache
%End
public:
QgsGeometryCache();
~QgsGeometryCache();

QgsGeometryMap& cachedGeometries();

@@ -7,8 +7,6 @@ class QgsGmlFeatureClass
QgsGmlFeatureClass();
QgsGmlFeatureClass( const QString& name, const QString& path );

~QgsGmlFeatureClass();

QList<QgsField> & fields();

int fieldIndex( const QString & name );
@@ -11,8 +11,6 @@ public:
*/
QgsLabelAttributes( bool def = true );

~QgsLabelAttributes();

/* Units type */
enum Units
{
@@ -18,8 +18,7 @@ class QgsMapToPixel
* @param xmin Minimum x value of the map canvas
*/
QgsMapToPixel( double mapUnitsPerPixel = 0, double height = 0, double ymin = 0, double xmin = 0 );
//! destructor
~QgsMapToPixel();

/** Transform the point from map (world) coordinates to device coordinates
* @param p Point to transform
* @return QgsPoint in device coordinates
@@ -21,9 +21,6 @@ class QgsScaleCalculator
QgsScaleCalculator( double dpi = 0,
QGis::UnitType mapUnits = QGis::Meters );

//! Destructor
~QgsScaleCalculator();

/**
* Set the dpi to be used in scale calculations
* @param dpi Dots per inch of monitor resolution
@@ -74,8 +74,6 @@ class QgsSnapper

explicit QgsSnapper( const QgsMapSettings& mapSettings );

~QgsSnapper();

/** Does the snapping operation
@param startPoint the start point for snapping (in pixel coordinates)
@param snappingResult the list where the results are inserted (everything in map coordinate system)
@@ -5,7 +5,6 @@ class QgsRasterDrawer
%End
public:
QgsRasterDrawer( QgsRasterIterator *iterator );
~QgsRasterDrawer();

void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );

@@ -25,7 +25,6 @@ class QgsRasterFileWriter
};

QgsRasterFileWriter( const QString& outputUrl );
~QgsRasterFileWriter();

/** Write raster file
@param pipe raster pipe
@@ -6,7 +6,6 @@ class QgsRasterIterator
public:

QgsRasterIterator( QgsRasterInterface* input );
~QgsRasterIterator();

/** Start reading of raster band. Raster data can then be retrieved by calling readNextRasterPart until it returns false.
@param bandNumber number of raster band to read
@@ -17,8 +17,6 @@ class QgsRasterRange
*/
QgsRasterRange( double theMin, double theMax );

~QgsRasterRange();

double min() const;
double max() const;

@@ -84,4 +84,9 @@ class QgsRendererV2Registry
//! protected constructor
QgsRendererV2Registry();
~QgsRendererV2Registry();

private:

QgsRendererV2Registry( const QgsRendererV2Registry& rh );

};
@@ -38,6 +38,9 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
~RenderLevel();
int zIndex;
QList<QgsRuleBasedRendererV2::RenderJob*> jobs;

RenderLevel( const QgsRuleBasedRendererV2::RenderLevel& other );

};

// rendering queue: a list of rendering levels
@@ -78,4 +78,9 @@ class QgsSymbolLayerV2Registry
protected:
QgsSymbolLayerV2Registry();
~QgsSymbolLayerV2Registry();

private:

QgsSymbolLayerV2Registry( const QgsSymbolLayerV2Registry& rh );

};
@@ -6,7 +6,6 @@ class QgsDetailedItemData

public:
QgsDetailedItemData();
~QgsDetailedItemData();
void setTitle( const QString& theTitle );
void setDetail( const QString& theDetail );
void setCategory( const QString& theCategory );
@@ -44,11 +44,6 @@ QgsGridFileWriter::QgsGridFileWriter()

}

QgsGridFileWriter::~QgsGridFileWriter()
{

}

int QgsGridFileWriter::writeFile( bool showProgressDialog )
{
QFile outputFile( mOutputFilePath );
@@ -30,7 +30,6 @@ class ANALYSIS_EXPORT QgsGridFileWriter
{
public:
QgsGridFileWriter( QgsInterpolator* i, const QString& outputPath, const QgsRectangle& extent, int nCols, int nRows, double cellSizeX, double cellSizeY );
~QgsGridFileWriter();

/** Writes the grid file.
@param showProgressDialog shows a dialog with the possibility to cancel
@@ -20,12 +20,6 @@ QgsGraph::QgsGraph()
{
}


QgsGraph::~QgsGraph()
{

}

int QgsGraph::addVertex( const QgsPoint& pt )
{
mGraphVertexes.append( QgsGraphVertex( pt ) );
@@ -133,8 +133,6 @@ class ANALYSIS_EXPORT QgsGraph
public:
QgsGraph();

~QgsGraph();

// begin graph constructing methods
/**
* add vertex to a grap
@@ -119,6 +119,9 @@ class ANALYSIS_EXPORT QgsOSMDatabase
sqlite3_stmt* mStmtWayNode;
sqlite3_stmt* mStmtWayNodePoints;
sqlite3_stmt* mStmtWayTags;

QgsOSMDatabase( const QgsOSMDatabase& rh );
QgsOSMDatabase& operator=( const QgsOSMDatabase& rh );
};


@@ -163,6 +166,8 @@ class ANALYSIS_EXPORT QgsOSMWayIterator

sqlite3_stmt* mStmt;

private:

friend class QgsOSMDatabase;
};

@@ -84,6 +84,11 @@ class ANALYSIS_EXPORT QgsAlignRaster
//! number of raster's bands
int mBandCnt;

private:

RasterInfo( const RasterInfo& rh );
RasterInfo& operator=( const RasterInfo& rh );

friend class QgsAlignRaster;
};

@@ -61,11 +61,6 @@ QgsRasterCalculator::QgsRasterCalculator( const QString& formulaString, const QS
{
}


QgsRasterCalculator::~QgsRasterCalculator()
{
}

int QgsRasterCalculator::processCalculation( QProgressDialog* p )
{
//prepare search string / tree
@@ -67,8 +67,6 @@ class ANALYSIS_EXPORT QgsRasterCalculator
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat,
const QgsRectangle& outputExtent, const QgsCoordinateReferenceSystem& outputCrs, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries );

~QgsRasterCalculator();

/** Starts the calculation and writes new raster
@param p progress bar (or 0 if called from non-gui code)
@return 0 in case of success*/
@@ -18,10 +18,6 @@ QgsPointSample::QgsPointSample()
{
}

QgsPointSample::~QgsPointSample()
{
}

int QgsPointSample::createRandomPoints( QProgressDialog* pd )
{
Q_UNUSED( pd );
@@ -16,7 +16,6 @@ class ANALYSIS_EXPORT QgsPointSample
{
public:
QgsPointSample( QgsVectorLayer* inputLayer, const QString& outputLayer, const QString& nPointsAttribute, const QString& minDistAttribute = QString() );
~QgsPointSample();

/** Starts calculation of random points
@return 0 in case of success*/

0 comments on commit 24d9c65

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