Exemple #1
0
    def removeProvider(provider):
        """Use this method to remove a provider.

        This method should be called when unloading a plugin that
        contributes a provider.
        """
        try:
            provider.unload()
            for p in Processing.providers:
                if p.getName() == provider.getName():
                    Processing.providers.remove(p)
            algList.removeProvider(provider.getName())
            if provider.getName() in Processing.actions:
                del Processing.actions[provider.getName()]
            for act in provider.contextMenuActions:
                Processing.contextMenuActions.remove(act)
        except:
            # This try catch block is here to avoid problems if the
            # plugin with a provider is unloaded after the Processing
            # framework itself has been unloaded. It is a quick fix
            # before I find out how to properly avoid that.
            pass
Exemple #2
0
    def removeProvider(provider):
        """Use this method to remove a provider.

        This method should be called when unloading a plugin that
        contributes a provider.
        """
        try:
            provider.unload()
            for p in Processing.providers:
                if p.getName() == provider.getName():
                    Processing.providers.remove(p)
            algList.removeProvider(provider.getName())
            if provider.getName() in Processing.actions:
                del Processing.actions[provider.getName()]
            for act in provider.contextMenuActions:
                Processing.contextMenuActions.remove(act)
        except:
            # This try catch block is here to avoid problems if the
            # plugin with a provider is unloaded after the Processing
            # framework itself has been unloaded. It is a quick fix
            # before I find out how to properly avoid that.
            pass