Skip to content

Commit 24d9c65

Browse files
committed
Fix more classes which violate the rule-of-three
Also remove some empty destructors
1 parent 492c1a9 commit 24d9c65

File tree

87 files changed

+78
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+78
-222
lines changed

python/analysis/interpolation/qgsgridfilewriter.sip

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class QgsGridFileWriter
66

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

1110
/** Writes the grid file.
1211
@param showProgressDialog shows a dialog with the possibility to cancel

python/analysis/network/qgsgraph.sip

-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ class QgsGraph
9191
public:
9292
QgsGraph();
9393

94-
~QgsGraph();
95-
9694
// begin graph constructing methods
9795
/**
9896
* add vertex to a grap

python/analysis/openstreetmap/qgsosmdatabase.sip

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ class QgsOSMDatabase
7777
QString quotedIdentifier( QString id );
7878
QString quotedValue( QString value );
7979

80+
private:
81+
82+
QgsOSMDatabase( const QgsOSMDatabase& rh );
8083
};
8184

8285

python/analysis/raster/qgsalignraster.sip

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class QgsAlignRaster
3939

4040
//! Get raster value at the given coordinates (from the first band)
4141
double identify( double mx, double my );
42+
43+
private:
44+
RasterInfo( const QgsAlignRaster::RasterInfo& rh );
45+
4246
};
4347

4448

python/analysis/raster/qgsrastercalculator.sip

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ class QgsRasterCalculator
4444
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat,
4545
const QgsRectangle& outputExtent, const QgsCoordinateReferenceSystem& outputCrs, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries );
4646

47-
~QgsRasterCalculator();
48-
4947
/** Starts the calculation and writes new raster
5048
@param p progress bar (or 0 if called from non-gui code)
5149
@return 0 in case of success*/

python/analysis/vector/qgspointsample.sip

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class QgsPointSample
88
%End
99
public:
1010
QgsPointSample( QgsVectorLayer* inputLayer, const QString& outputLayer, const QString& nPointsAttribute, const QString& minDistAttribute = QString() );
11-
~QgsPointSample();
1211

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

python/analysis/vector/qgstransectsample.sip

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class QgsTransectSample
2020
DistanceUnits minDistUnits, QgsVectorLayer* baselineLayer, bool shareBaseline,
2121
const QString& baselineStrataId, const QString& outputPointLayer, const QString& outputLineLayer, const QString& usedBaselineLayer,
2222
double minTransectLength = 0.0, double baselineBufferDistance = -1.0, double baselineSimplificationTolerance = -1.0 );
23-
~QgsTransectSample();
2423

2524
int createSample( QProgressDialog* pd );
2625
};

python/analysis/vector/qgszonalstatistics.sip

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class QgsZonalStatistics
3232

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

3736
/** Starts the calculation
3837
@return 0 in case of success*/

python/core/auth/qgsauthconfig.sip

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ class QgsAuthMethodConfig
77

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

10-
QgsAuthMethodConfig( const QgsAuthMethodConfig& methodconfig );
11-
1210
bool operator==( const QgsAuthMethodConfig& other ) const;
1311

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

16-
~QgsAuthMethodConfig();
17-
1814
const QString id() const;
1915
void setId( const QString& id );
2016

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

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

107101
bool isValid();
108102

python/core/composer/qgscomposerlegendstyle.sip

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class QgsComposerLegendStyle
2222
Right,
2323
};
2424
QgsComposerLegendStyle();
25-
~QgsComposerLegendStyle();
2625

2726
QFont font() const;
2827
QFont & rfont();

python/core/effects/qgspainteffectregistry.sip

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ class QgsPaintEffectRegistry
126126
QgsPaintEffectRegistry();
127127
~QgsPaintEffectRegistry();
128128

129+
private:
130+
QgsPaintEffectRegistry( const QgsPaintEffectRegistry& rh );
129131

130132
};
131133

python/core/qgscrscache.sip

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class QgsCRSCache
2626

2727
public:
2828
static QgsCRSCache* instance();
29-
~QgsCRSCache();
3029
/** Returns the CRS for authid, e.g. 'EPSG:4326' (or an invalid CRS in case of error)*/
3130
const QgsCoordinateReferenceSystem& crsByAuthId( const QString& authid );
3231
const QgsCoordinateReferenceSystem& crsByEpsgId( long epsg );

python/core/qgsexpression.sip

-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ class QgsExpression
478478
{
479479
public:
480480
Interval( int seconds = 0 );
481-
~Interval();
482481
double years();
483482
double months();
484483
double weeks();

python/core/qgsfeaturestore.sip

-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,9 @@ class QgsFeatureStore
77
//! Constructor
88
QgsFeatureStore();
99

10-
//! Constructor
11-
QgsFeatureStore( const QgsFeatureStore &rhs );
12-
1310
//! Constructor
1411
QgsFeatureStore( const QgsFields& fields, const QgsCoordinateReferenceSystem& crs );
1512

16-
//! Destructor
17-
~QgsFeatureStore();
18-
1913
/** Get fields list */
2014
QgsFields& fields();
2115

python/core/qgsgeometrycache.sip

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ class QgsGeometryCache
55
%End
66
public:
77
QgsGeometryCache();
8-
~QgsGeometryCache();
98

109
QgsGeometryMap& cachedGeometries();
1110

python/core/qgsgmlschema.sip

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ class QgsGmlFeatureClass
77
QgsGmlFeatureClass();
88
QgsGmlFeatureClass( const QString& name, const QString& path );
99

10-
~QgsGmlFeatureClass();
11-
1210
QList<QgsField> & fields();
1311

1412
int fieldIndex( const QString & name );

python/core/qgslabelattributes.sip

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ public:
1111
*/
1212
QgsLabelAttributes( bool def = true );
1313

14-
~QgsLabelAttributes();
15-
1614
/* Units type */
1715
enum Units
1816
{

python/core/qgsmaptopixel.sip

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ class QgsMapToPixel
1818
* @param xmin Minimum x value of the map canvas
1919
*/
2020
QgsMapToPixel( double mapUnitsPerPixel = 0, double height = 0, double ymin = 0, double xmin = 0 );
21-
//! destructor
22-
~QgsMapToPixel();
21+
2322
/** Transform the point from map (world) coordinates to device coordinates
2423
* @param p Point to transform
2524
* @return QgsPoint in device coordinates

python/core/qgsscalecalculator.sip

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ class QgsScaleCalculator
2121
QgsScaleCalculator( double dpi = 0,
2222
QGis::UnitType mapUnits = QGis::Meters );
2323

24-
//! Destructor
25-
~QgsScaleCalculator();
26-
2724
/**
2825
* Set the dpi to be used in scale calculations
2926
* @param dpi Dots per inch of monitor resolution

python/core/qgssnapper.sip

-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ class QgsSnapper
7474

7575
explicit QgsSnapper( const QgsMapSettings& mapSettings );
7676

77-
~QgsSnapper();
78-
7977
/** Does the snapping operation
8078
@param startPoint the start point for snapping (in pixel coordinates)
8179
@param snappingResult the list where the results are inserted (everything in map coordinate system)

python/core/raster/qgsrasterdrawer.sip

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ class QgsRasterDrawer
55
%End
66
public:
77
QgsRasterDrawer( QgsRasterIterator *iterator );
8-
~QgsRasterDrawer();
98

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

python/core/raster/qgsrasterfilewriter.sip

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class QgsRasterFileWriter
2525
};
2626

2727
QgsRasterFileWriter( const QString& outputUrl );
28-
~QgsRasterFileWriter();
2928

3029
/** Write raster file
3130
@param pipe raster pipe

python/core/raster/qgsrasteriterator.sip

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class QgsRasterIterator
66
public:
77

88
QgsRasterIterator( QgsRasterInterface* input );
9-
~QgsRasterIterator();
109

1110
/** Start reading of raster band. Raster data can then be retrieved by calling readNextRasterPart until it returns false.
1211
@param bandNumber number of raster band to read

python/core/raster/qgsrasterrange.sip

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class QgsRasterRange
1717
*/
1818
QgsRasterRange( double theMin, double theMax );
1919

20-
~QgsRasterRange();
21-
2220
double min() const;
2321
double max() const;
2422

python/core/symbology-ng/qgsrendererv2registry.sip

+5
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,9 @@ class QgsRendererV2Registry
8484
//! protected constructor
8585
QgsRendererV2Registry();
8686
~QgsRendererV2Registry();
87+
88+
private:
89+
90+
QgsRendererV2Registry( const QgsRendererV2Registry& rh );
91+
8792
};

python/core/symbology-ng/qgsrulebasedrendererv2.sip

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
3838
~RenderLevel();
3939
int zIndex;
4040
QList<QgsRuleBasedRendererV2::RenderJob*> jobs;
41+
42+
RenderLevel( const QgsRuleBasedRendererV2::RenderLevel& other );
43+
4144
};
4245

4346
// rendering queue: a list of rendering levels

python/core/symbology-ng/qgssymbollayerv2registry.sip

+5
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,9 @@ class QgsSymbolLayerV2Registry
7878
protected:
7979
QgsSymbolLayerV2Registry();
8080
~QgsSymbolLayerV2Registry();
81+
82+
private:
83+
84+
QgsSymbolLayerV2Registry( const QgsSymbolLayerV2Registry& rh );
85+
8186
};

python/gui/qgsdetaileditemdata.sip

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class QgsDetailedItemData
66

77
public:
88
QgsDetailedItemData();
9-
~QgsDetailedItemData();
109
void setTitle( const QString& theTitle );
1110
void setDetail( const QString& theDetail );
1211
void setCategory( const QString& theCategory );

src/analysis/interpolation/qgsgridfilewriter.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ QgsGridFileWriter::QgsGridFileWriter()
4444

4545
}
4646

47-
QgsGridFileWriter::~QgsGridFileWriter()
48-
{
49-
50-
}
51-
5247
int QgsGridFileWriter::writeFile( bool showProgressDialog )
5348
{
5449
QFile outputFile( mOutputFilePath );

src/analysis/interpolation/qgsgridfilewriter.h

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class ANALYSIS_EXPORT QgsGridFileWriter
3030
{
3131
public:
3232
QgsGridFileWriter( QgsInterpolator* i, const QString& outputPath, const QgsRectangle& extent, int nCols, int nRows, double cellSizeX, double cellSizeY );
33-
~QgsGridFileWriter();
3433

3534
/** Writes the grid file.
3635
@param showProgressDialog shows a dialog with the possibility to cancel

src/analysis/network/qgsgraph.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ QgsGraph::QgsGraph()
2020
{
2121
}
2222

23-
24-
QgsGraph::~QgsGraph()
25-
{
26-
27-
}
28-
2923
int QgsGraph::addVertex( const QgsPoint& pt )
3024
{
3125
mGraphVertexes.append( QgsGraphVertex( pt ) );

src/analysis/network/qgsgraph.h

-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ class ANALYSIS_EXPORT QgsGraph
133133
public:
134134
QgsGraph();
135135

136-
~QgsGraph();
137-
138136
// begin graph constructing methods
139137
/**
140138
* add vertex to a grap

src/analysis/openstreetmap/qgsosmdatabase.h

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ class ANALYSIS_EXPORT QgsOSMDatabase
119119
sqlite3_stmt* mStmtWayNode;
120120
sqlite3_stmt* mStmtWayNodePoints;
121121
sqlite3_stmt* mStmtWayTags;
122+
123+
QgsOSMDatabase( const QgsOSMDatabase& rh );
124+
QgsOSMDatabase& operator=( const QgsOSMDatabase& rh );
122125
};
123126

124127

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

164167
sqlite3_stmt* mStmt;
165168

169+
private:
170+
166171
friend class QgsOSMDatabase;
167172
};
168173

src/analysis/raster/qgsalignraster.h

+5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ class ANALYSIS_EXPORT QgsAlignRaster
8484
//! number of raster's bands
8585
int mBandCnt;
8686

87+
private:
88+
89+
RasterInfo( const RasterInfo& rh );
90+
RasterInfo& operator=( const RasterInfo& rh );
91+
8792
friend class QgsAlignRaster;
8893
};
8994

src/analysis/raster/qgsrastercalculator.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ QgsRasterCalculator::QgsRasterCalculator( const QString& formulaString, const QS
6161
{
6262
}
6363

64-
65-
QgsRasterCalculator::~QgsRasterCalculator()
66-
{
67-
}
68-
6964
int QgsRasterCalculator::processCalculation( QProgressDialog* p )
7065
{
7166
//prepare search string / tree

src/analysis/raster/qgsrastercalculator.h

-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ class ANALYSIS_EXPORT QgsRasterCalculator
6767
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat,
6868
const QgsRectangle& outputExtent, const QgsCoordinateReferenceSystem& outputCrs, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries );
6969

70-
~QgsRasterCalculator();
71-
7270
/** Starts the calculation and writes new raster
7371
@param p progress bar (or 0 if called from non-gui code)
7472
@return 0 in case of success*/

src/analysis/vector/qgspointsample.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ QgsPointSample::QgsPointSample()
1818
{
1919
}
2020

21-
QgsPointSample::~QgsPointSample()
22-
{
23-
}
24-
2521
int QgsPointSample::createRandomPoints( QProgressDialog* pd )
2622
{
2723
Q_UNUSED( pd );

src/analysis/vector/qgspointsample.h

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class ANALYSIS_EXPORT QgsPointSample
1616
{
1717
public:
1818
QgsPointSample( QgsVectorLayer* inputLayer, const QString& outputLayer, const QString& nPointsAttribute, const QString& minDistAttribute = QString() );
19-
~QgsPointSample();
2019

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

0 commit comments

Comments
 (0)