Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Plugin installer: fix support for qgisMaximumVersion tag.
- Loading branch information
Showing
with
2 additions
and
4 deletions.
-
+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 |
|
|