Skip to content
Permalink
Browse files

Plugin installer: fix support for qgisMaximumVersion tag.

  • Loading branch information
borysiasty committed Apr 27, 2013
1 parent fdc4138 commit dfd8444383fc2c79f04bea5579f5c8648ae4f930
Showing with 2 additions and 4 deletions.
  1. +2 −4 python/plugins/plugin_installer/installer_data.py
@@ -426,14 +426,12 @@ def xmlDownloaded(self,nr,state):
"localdir" : name,
"read-only" : False}
qgisMinimumVersion = pluginNodes.item(i).firstChildElement("qgis_minimum_version").text().simplified()
if not qgisMinimumVersion: qgisMinimumVersion = "0"
# please use the tag below only if really needed! (for example if plugin development is abandoned)
if not qgisMinimumVersion: qgisMinimumVersion = "1"
qgisMaximumVersion = pluginNodes.item(i).firstChildElement("qgis_maximum_version").text().simplified()
if not qgisMaximumVersion: qgisMaximumVersion = "2"
if not qgisMaximumVersion: qgisMaximumVersion = qgisMinimumVersion[0] + ".99"
#if compatible, add the plugin to the list
if not pluginNodes.item(i).firstChildElement("disabled").text().simplified().toUpper() in ["TRUE","YES"]:
if compareVersions(QGIS_VER, qgisMinimumVersion) < 2 and compareVersions(qgisMaximumVersion, QGIS_VER) < 2:
if QGIS_VER[0]==qgisMinimumVersion[0] or (qgisMinimumVersion!="0" and qgisMaximumVersion!="2"): # to be deleted
#add the plugin to the cache
plugins.addFromRepository(plugin)
# set state=2, even if the repo is empty

0 comments on commit dfd8444

Please sign in to comment.