[Qgis-developer] Plugin Installer

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Jul 21 13:43:30 EDT 2008


2008/7/21 Tim Sutton <tim at linfiniti.com>:
> Hi Borys
>
> Great to hear the new plugin manager is ready!

 I just hit a problem with the plugin manager - lack of http proxy support!

 The QHttp methods used will only use a proxy if explicitly told. From
campus all web traffic goes via a proxy, and most applications will
look at the http_proxy environment variable and use that, but QHttp
doesn't. You need to set it explicitly with:

    proxy = QNetworkProxy(QNetworkProxy.HttpProxy, proxyHost, proxyPort)
    qhttpObject.setProxy(proxy)

It's a bit more complicated if you have an authenticating proxy that
needs a username and password, of course.

 I wonder if it would be better dealt with in the Qgis core, so that
individual plugins didn't have to deal with it. It's also complicated
by cross-platform issues - the documentation for python's built-in
urllib web-fetcher says it can get proxy info from the Windows
registry or Mac's Internet Settings. Actually there's a lot of useful
stuff in urllib relating to proxies...

 So really it's something that ought to be in Qt... Weird that it
isn't.  Or have I totally missed something?

Barry


More information about the Qgis-developer mailing list