Skip to content

Commit

Permalink
Plugin installer: fix support for qgisMaximumVersion tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Apr 27, 2013
1 parent fdc4138 commit dfd8444
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/plugins/plugin_installer/installer_data.py
Expand Up @@ -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
Expand Down

0 comments on commit dfd8444

Please sign in to comment.