mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Add some more clone methods to algorithm subclasses
This commit is contained in:
parent
0c6b19cd85
commit
1b2afea23e
@ -47,3 +47,6 @@ class QgisAlgorithm(QgsProcessingAlgorithm):
|
||||
if context == '':
|
||||
context = self.__class__.__name__
|
||||
return string, QCoreApplication.translate(context, string)
|
||||
|
||||
def clone(self):
|
||||
return type(self)()
|
||||
|
@ -48,6 +48,9 @@ class TestAlg(QgsProcessingAlgorithm):
|
||||
def displayName(self):
|
||||
return 'testalg'
|
||||
|
||||
def clone(self):
|
||||
return TestAlg()
|
||||
|
||||
def processAlgorithm(self, parameters, context, feedback):
|
||||
raise GeoAlgorithmExecutionException('Exception while processing')
|
||||
return {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user