Skip to content
Permalink
Browse files

[Plugin Manager] Plugin installer fixes

  • Loading branch information
borysiasty committed Jun 12, 2013
1 parent e37a6e0 commit 85e1ab9807a1cba94406279b3243016de557824a
Showing with 7 additions and 10 deletions.
  1. +5 −8 python/pyplugin_installer/installer.py
  2. +2 −2 python/pyplugin_installer/installer_data.py
@@ -312,14 +312,13 @@ def installPlugin(self, key, quiet=False):
loadPlugin(plugin["id"])
plugins.getAllInstalled(testLoad=True)
plugins.rebuild()
self.exportPluginsToManager()
plugin = plugins.all()[key]
if not plugin["error"]:
if previousStatus in ["not installed", "new"]:
infoString = (self.tr("Plugin installed successfully"), self.tr("Plugin installed successfully"))
settings = QSettings()
settings.setValue("/PythonPlugins/"+plugin["id"], True)
startPlugin(plugin["id"])
if startPlugin(plugin["id"]):
settings = QSettings()
settings.setValue("/PythonPlugins/"+plugin["id"], True)
else:
settings = QSettings()
if settings.value("/PythonPlugins/"+key, False, type=bool): # plugin will be reloaded on the fly only if currently loaded
@@ -344,9 +343,6 @@ def installPlugin(self, key, quiet=False):
dlg.exec_()
if dlg.result():
# revert installation
plugins.getAllInstalled()
plugins.rebuild()
self.exportPluginsToManager()
pluginDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/" + plugin["id"]
removeDir(pluginDir)
if QDir(pluginDir).exists():
@@ -364,7 +360,8 @@ def installPlugin(self, key, quiet=False):
pass
plugins.getAllInstalled()
plugins.rebuild()
self.exportPluginsToManager()

self.exportPluginsToManager()

if infoString[0]:
QMessageBox.information(iface.mainWindow(), infoString[0], infoString[1])
@@ -630,8 +630,8 @@ def pluginMetadata(fct):
if not isCompatible(QGis.QGIS_VERSION, qgisMinimumVersion, qgisMaximumVersion):
error = "incompatible"
errorDetails = "%s - %s" % (qgisMinimumVersion, qgisMaximumVersion)

if testLoad:
elif testLoad:
# only testLoad if compatible version
try:
exec "import %s" % key in globals(), locals()
exec "reload (%s)" % key in globals(), locals()

0 comments on commit 85e1ab9

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