Skip to content

Commit 950ed68

Browse files
committedApr 7, 2017
Don't try to deepcopy QgsProcessingAlgorithm class
1 parent b3142a0 commit 950ed68

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
 

‎python/core/processing/qgsprocessingalgorithm.sip

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class QgsProcessingAlgorithm
3838

3939
virtual ~QgsProcessingAlgorithm();
4040

41+
// QgsProcessingAlgorithm &operator=( const QgsProcessingAlgorithm &other ) = delete;
42+
4143
virtual QString name() const = 0;
4244
%Docstring
4345
Returns the algorithm name, used for identifying the algorithm. This string
@@ -91,6 +93,8 @@ class QgsProcessingAlgorithm
9193
Returns the provider to which this algorithm belongs.
9294
%End
9395

96+
private:
97+
QgsProcessingAlgorithm( const QgsProcessingAlgorithm &other );
9498
};
9599
QFlags<QgsProcessingAlgorithm::Flag> operator|(QgsProcessingAlgorithm::Flag f1, QFlags<QgsProcessingAlgorithm::Flag> f2);
96100

‎src/core/processing/qgsprocessingalgorithm.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ class CORE_EXPORT QgsProcessingAlgorithm
5252

5353
virtual ~QgsProcessingAlgorithm() = default;
5454

55+
//! Algorithms cannot be copied
56+
QgsProcessingAlgorithm( const QgsProcessingAlgorithm &other ) = delete;
57+
//! Algorithms cannot be copied
58+
QgsProcessingAlgorithm &operator=( const QgsProcessingAlgorithm &other ) = delete;
59+
5560
/**
5661
* Returns the algorithm name, used for identifying the algorithm. This string
5762
* should be fixed for the algorithm, and must not be localised. The name should
@@ -118,6 +123,10 @@ class CORE_EXPORT QgsProcessingAlgorithm
118123
friend class QgsProcessingProvider;
119124
friend class TestQgsProcessing;
120125

126+
#ifdef SIP_RUN
127+
QgsProcessingAlgorithm( const QgsProcessingAlgorithm &other );
128+
#endif
129+
121130
};
122131
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProcessingAlgorithm::Flags )
123132

0 commit comments

Comments
 (0)