mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[Plugin manager] [needs-doc] Don't preload plugins for a test if they are broken. That function slowed down QGIS startup
This commit is contained in:
parent
edcaf05bcb
commit
cfec339c30
@ -307,7 +307,7 @@ class QgsPluginInstaller(QObject):
|
|||||||
updateAvailablePlugins()
|
updateAvailablePlugins()
|
||||||
# try to load the plugin
|
# try to load the plugin
|
||||||
loadPlugin(plugin["id"])
|
loadPlugin(plugin["id"])
|
||||||
plugins.getAllInstalled(testLoad=True)
|
plugins.getAllInstalled()
|
||||||
plugins.rebuild()
|
plugins.rebuild()
|
||||||
plugin = plugins.all()[key]
|
plugin = plugins.all()[key]
|
||||||
if not plugin["error"]:
|
if not plugin["error"]:
|
||||||
@ -565,7 +565,7 @@ class QgsPluginInstaller(QObject):
|
|||||||
if infoString is None:
|
if infoString is None:
|
||||||
updateAvailablePlugins()
|
updateAvailablePlugins()
|
||||||
loadPlugin(pluginName)
|
loadPlugin(pluginName)
|
||||||
plugins.getAllInstalled(testLoad=True)
|
plugins.getAllInstalled()
|
||||||
plugins.rebuild()
|
plugins.rebuild()
|
||||||
|
|
||||||
if settings.contains('/PythonPlugins/' + pluginName):
|
if settings.contains('/PythonPlugins/' + pluginName):
|
||||||
|
@ -548,7 +548,7 @@ class Plugins(QObject):
|
|||||||
del self.repoCache[repo]
|
del self.repoCache[repo]
|
||||||
|
|
||||||
# ----------------------------------------- #
|
# ----------------------------------------- #
|
||||||
def getInstalledPlugin(self, key, path, readOnly, testLoad=True):
|
def getInstalledPlugin(self, key, path, readOnly, testLoad=False):
|
||||||
""" get the metadata of an installed plugin """
|
""" get the metadata of an installed plugin """
|
||||||
def metadataParser(fct):
|
def metadataParser(fct):
|
||||||
""" plugin metadata parser reimplemented from qgis.utils
|
""" plugin metadata parser reimplemented from qgis.utils
|
||||||
@ -683,8 +683,11 @@ class Plugins(QObject):
|
|||||||
return plugin
|
return plugin
|
||||||
|
|
||||||
# ----------------------------------------- #
|
# ----------------------------------------- #
|
||||||
def getAllInstalled(self, testLoad=True):
|
def getAllInstalled(self, testLoad=False):
|
||||||
""" Build the localCache """
|
""" Build the localCache
|
||||||
|
Note: Currently testLoad is always disabled in order to speed up QGIS startup.
|
||||||
|
The related code will be probably removed.
|
||||||
|
"""
|
||||||
self.localCache = {}
|
self.localCache = {}
|
||||||
|
|
||||||
# reversed list of the plugin paths: first system plugins -> then user plugins -> finally custom path(s)
|
# reversed list of the plugin paths: first system plugins -> then user plugins -> finally custom path(s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user