Skip to content
Permalink
Browse files

[Plugin Installer] Fix #8080

  • Loading branch information
borysiasty committed Jun 25, 2013
1 parent 0485aa0 commit 619558dabc180f3471b26fef276ff7fbbf3e0e3f
@@ -172,9 +172,7 @@ def exportRepositoriesToManager(self):
""" Update manager's repository tree widget with current data """
iface.pluginManagerInterface().clearRepositoryList()
for key in repositories.all():
url = repositories.all()[key]["url"]
v=str(QGis.QGIS_VERSION_INT)
url += "?qgis=%d.%d" % ( int(v[0]), int(v[1:3]) )
url = repositories.all()[key]["url"] + repositories.urlParams()
repository = repositories.all()[key]
if repositories.inspectionFilter():
enabled = ( key == repositories.inspectionFilter() )
@@ -449,6 +447,7 @@ def editRepository(self, reposName):
dlg = QgsPluginInstallerRepositoryDialog( iface.mainWindow() )
dlg.editName.setText(reposName)
dlg.editURL.setText(repositories.all()[reposName]["url"])
dlg.editParams.setText(repositories.urlParams())
dlg.checkBoxEnabled.setCheckState(checkState[repositories.all()[reposName]["enabled"]])
if repositories.all()[reposName]["valid"]:
dlg.checkBoxEnabled.setEnabled(True)
@@ -236,6 +236,13 @@ def allUnavailable(self):
return repos


# ----------------------------------------- #
def urlParams(self):
""" return GET parameters to be added to every request """
v=str(QGis.QGIS_VERSION_INT)
return "?qgis=%d.%d" % ( int(v[0]), int(v[1:3]) )


# ----------------------------------------- #
def setRepositoryData(self, reposName, key, value):
""" write data to the mRepositories dict """
@@ -355,9 +362,9 @@ def load(self):
def requestFetching(self,key):
""" start fetching the repository given by key """
self.mRepositories[key]["state"] = 1
url = QUrl(self.mRepositories[key]["url"])
v=str(QGis.QGIS_VERSION_INT)
url.addQueryItem('qgis', '.'.join([str(int(s)) for s in [v[0], v[1:3]]]) ) # don't include the bugfix version!
url = QUrl(self.mRepositories[key]["url"] + self.urlParams() )
#v=str(QGis.QGIS_VERSION_INT)
#url.addQueryItem('qgis', '.'.join([str(int(s)) for s in [v[0], v[1:3]]]) ) # don't include the bugfix version!

self.mRepositories[key]["QRequest"] = QNetworkRequest(url)
self.mRepositories[key]["QRequest"].setAttribute( QNetworkRequest.User, key)

0 comments on commit 619558d

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