Skip to content

Commit

Permalink
Fix more classes which violate the rule-of-three
Browse files Browse the repository at this point in the history
Also remove some empty destructors
  • Loading branch information
nyalldawson committed Jan 26, 2016
1 parent 492c1a9 commit 24d9c65
Show file tree
Hide file tree
Showing 87 changed files with 78 additions and 222 deletions.
1 change: 0 additions & 1 deletion python/analysis/interpolation/qgsgridfilewriter.sip
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions python/analysis/network/qgsgraph.sip
Expand Up @@ -91,8 +91,6 @@ class QgsGraph
public:
QgsGraph();

~QgsGraph();

// begin graph constructing methods
/**
* add vertex to a grap
Expand Down
3 changes: 3 additions & 0 deletions python/analysis/openstreetmap/qgsosmdatabase.sip
Expand Up @@ -77,6 +77,9 @@ class QgsOSMDatabase
QString quotedIdentifier( QString id );
QString quotedValue( QString value );

private:

QgsOSMDatabase( const QgsOSMDatabase& rh );
};


4 changes: 4 additions & 0 deletions python/analysis/raster/qgsalignraster.sip
Expand Up @@ -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 );

};


Expand Down
2 changes: 0 additions & 2 deletions python/analysis/raster/qgsrastercalculator.sip
Expand Up @@ -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*/
Expand Down
1 change: 0 additions & 1 deletion python/analysis/vector/qgspointsample.sip
Expand Up @@ -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*/
Expand Down
1 change: 0 additions & 1 deletion python/analysis/vector/qgstransectsample.sip
Expand Up @@ -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 );
};
1 change: 0 additions & 1 deletion python/analysis/vector/qgszonalstatistics.sip
Expand Up @@ -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*/
Expand Down
6 changes: 0 additions & 6 deletions python/core/auth/qgsauthconfig.sip
Expand Up @@ -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 );

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -102,7 +97,6 @@ class QgsPkiConfigBundle
QgsPkiConfigBundle( const QgsAuthMethodConfig& config,
const QSslCertificate& cert,
const QSslKey& certkey );
~QgsPkiConfigBundle();

bool isValid();

Expand Down
1 change: 0 additions & 1 deletion python/core/composer/qgscomposerlegendstyle.sip
Expand Up @@ -22,7 +22,6 @@ class QgsComposerLegendStyle
Right,
};
QgsComposerLegendStyle();
~QgsComposerLegendStyle();

QFont font() const;
QFont & rfont();
Expand Down
2 changes: 2 additions & 0 deletions python/core/effects/qgspainteffectregistry.sip
Expand Up @@ -126,6 +126,8 @@ class QgsPaintEffectRegistry
QgsPaintEffectRegistry();
~QgsPaintEffectRegistry();

private:
QgsPaintEffectRegistry( const QgsPaintEffectRegistry& rh );

};

1 change: 0 additions & 1 deletion python/core/qgscrscache.sip
Expand Up @@ -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 );
Expand Down
1 change: 0 additions & 1 deletion python/core/qgsexpression.sip
Expand Up @@ -478,7 +478,6 @@ class QgsExpression
{
public:
Interval( int seconds = 0 );
~Interval();
double years();
double months();
double weeks();
Expand Down
6 changes: 0 additions & 6 deletions python/core/qgsfeaturestore.sip
Expand Up @@ -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();

Expand Down
1 change: 0 additions & 1 deletion python/core/qgsgeometrycache.sip
Expand Up @@ -5,7 +5,6 @@ class QgsGeometryCache
%End
public:
QgsGeometryCache();
~QgsGeometryCache();

QgsGeometryMap& cachedGeometries();

Expand Down
2 changes: 0 additions & 2 deletions python/core/qgsgmlschema.sip
Expand Up @@ -7,8 +7,6 @@ class QgsGmlFeatureClass
QgsGmlFeatureClass();
QgsGmlFeatureClass( const QString& name, const QString& path );

~QgsGmlFeatureClass();

QList<QgsField> & fields();

int fieldIndex( const QString & name );
Expand Down
2 changes: 0 additions & 2 deletions python/core/qgslabelattributes.sip
Expand Up @@ -11,8 +11,6 @@ public:
*/
QgsLabelAttributes( bool def = true );

~QgsLabelAttributes();

/* Units type */
enum Units
{
Expand Down
3 changes: 1 addition & 2 deletions python/core/qgsmaptopixel.sip
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions python/core/qgsscalecalculator.sip
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions python/core/qgssnapper.sip
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion python/core/raster/qgsrasterdrawer.sip
Expand Up @@ -5,7 +5,6 @@ class QgsRasterDrawer
%End
public:
QgsRasterDrawer( QgsRasterIterator *iterator );
~QgsRasterDrawer();

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

Expand Down
1 change: 0 additions & 1 deletion python/core/raster/qgsrasterfilewriter.sip
Expand Up @@ -25,7 +25,6 @@ class QgsRasterFileWriter
};

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

/** Write raster file
@param pipe raster pipe
Expand Down
1 change: 0 additions & 1 deletion python/core/raster/qgsrasteriterator.sip
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions python/core/raster/qgsrasterrange.sip
Expand Up @@ -17,8 +17,6 @@ class QgsRasterRange
*/
QgsRasterRange( double theMin, double theMax );

~QgsRasterRange();

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

Expand Down
5 changes: 5 additions & 0 deletions python/core/symbology-ng/qgsrendererv2registry.sip
Expand Up @@ -84,4 +84,9 @@ class QgsRendererV2Registry
//! protected constructor
QgsRendererV2Registry();
~QgsRendererV2Registry();

private:

QgsRendererV2Registry( const QgsRendererV2Registry& rh );

};
3 changes: 3 additions & 0 deletions python/core/symbology-ng/qgsrulebasedrendererv2.sip
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions python/core/symbology-ng/qgssymbollayerv2registry.sip
Expand Up @@ -78,4 +78,9 @@ class QgsSymbolLayerV2Registry
protected:
QgsSymbolLayerV2Registry();
~QgsSymbolLayerV2Registry();

private:

QgsSymbolLayerV2Registry( const QgsSymbolLayerV2Registry& rh );

};
1 change: 0 additions & 1 deletion python/gui/qgsdetaileditemdata.sip
Expand Up @@ -6,7 +6,6 @@ class QgsDetailedItemData

public:
QgsDetailedItemData();
~QgsDetailedItemData();
void setTitle( const QString& theTitle );
void setDetail( const QString& theDetail );
void setCategory( const QString& theCategory );
Expand Down
5 changes: 0 additions & 5 deletions src/analysis/interpolation/qgsgridfilewriter.cpp
Expand Up @@ -44,11 +44,6 @@ QgsGridFileWriter::QgsGridFileWriter()

}

QgsGridFileWriter::~QgsGridFileWriter()
{

}

int QgsGridFileWriter::writeFile( bool showProgressDialog )
{
QFile outputFile( mOutputFilePath );
Expand Down