Bug report #18488

processing providers load algorithms even if not active

Added by Rashad Kanavath about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:master Regression?:No
Operating System:Linux Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26376

Description

if OTB, GRASS, SAGA providers are disabled qgis will tries to load algorithms anyway.

To reproduce:
try disable any of provider by unchecking "activate". you can see it will load their algorithms.

Here is a diff for SAGA:

index c33795dd40..94cdd925e3 100644
--- a/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
+++ b/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
@@ -79,6 +79,8 @@ class SagaAlgorithmProvider(QgsProcessingProvider):
         ProcessingConfig.setSettingValue('ACTIVATE_SAGA', active)

     def loadAlgorithms(self):
+        if not self.isActive()
+            return
         version = SagaUtils.getInstalledVersion(True)
         if version is None:
             QgsMessageLog.logMessage(self.tr('Problem with SAGA installation: SAGA was not found or is not correctly installed'),

OTB is fixed, GRASS GIS, GDAL, QGIS to be done.

Associated revisions

Revision 9ab4d963
Added by Nyall Dawson about 6 years ago

[processing] Don't try to load algorithms for disabled providers

Fixes #18488

Revision 21605a1a
Added by Nyall Dawson about 6 years ago

[processing] Don't try to load algorithms for disabled providers

Fixes #18488

(cherry-picked from 9ab4d963)

History

#1 Updated by Nyall Dawson about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF