Skip to content
Permalink
Browse files

[processing] Properly load basic providers

Processing module should only register it's own basic providers.
Note that when reloading a plugin, subclasses of ProcessingProvider remains and new ones are added,
so in such cases QgsProcessingProvider.__subclasses__() return same provider class many times.
  • Loading branch information
arnaud-morvan committed Feb 21, 2018
1 parent d3a4a34 commit 3718d4e65b98dfd19a884043630e26655705334b
Showing with 8 additions and 4 deletions.
  1. +8 −4 python/plugins/processing/core/Processing.py
@@ -85,11 +85,15 @@ def initialize():
if "model" in [p.id() for p in QgsApplication.processingRegistry().providers()]:
return
# Add the basic providers
for c in QgsProcessingProvider.__subclasses__():
for c in [
QgisAlgorithmProvider,
Grass7AlgorithmProvider,
GdalAlgorithmProvider,
SagaAlgorithmProvider,
ScriptAlgorithmProvider,
ModelerAlgorithmProvider
]:
p = c()
if p.id() in ('native', '3d'):
# c++ providers are already registered
continue
if QgsApplication.processingRegistry().addProvider(p):
Processing.BASIC_PROVIDERS.append(p)
# And initialize

0 comments on commit 3718d4e

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