[Marble-devel] Network handling

tackat at t-online.de tackat at t-online.de
Sat Aug 30 17:03:28 CEST 2008

On Saturday 30 August 2008 01:15:06 Pino Toscano wrote:
> Hello,
> as a result of a recent kde-core-devel[1] discussion, it would be nice
> have Marble using or the networking part more recent Qt technologies
> QNetworkAccessManager, introduced with Qt 4.4), or even KDE ones (just
> the KPart integration).
> My idea about that is the following: introduce a plugin structure
> MarbleRenderPlugin) to handle the HTTP jobs, and use it in
> HttpDownloadManager. In addition to that, also the current QHttp-base
> system would be a "plugin", but compiled built-in in marblewidget, and
> as fallback when no other plugin is found/usable.
> Small draft:
> class NetworkPlugin
> {
> public:
>     virtual HttpJob* createJob(QUrl src, QString dest, QString id) =
> };
> then also having HttpJob partially virtual (with eg execute() and
> prepareExecution(): this way, a network plugin has to:
> - implement a NetworkPlugin subclass (can be quite trivial)
> - specializing (by inheritance) its particular HttpJob
> To accomplish that, a first step would be getting rid of
HttpFetchFile, in
> favour of making HttpDownloadManager handle directly the HttpJob's;
> this, a working (hopefully) patch is attached.


> Second step would be creating a plugin structure, and decouple HttpJob
> two: the abstract HttpJob and the QHttpHttpJob plugin (of course,
> making things working after this).
> Then, it comes writing plugins for QNetworkAccessManager and KIO.

For that part you'd also need to take the proxy setting into account
that is 
currently located in the settings dialog. I guess the job-plugin would
offer a property which tells whether displaying the proxy setting inside
settings dialog is needed, right?
For the case where Marble would use KIO, usage of the common proxy is
mandatory I guess ... (or does anyone see a reason why Marble should
have its 
own proxy setting?).
For the case where Marble would just use the NAM the proxy setting
still get displayed.

Your patch seems to work fine. So please go on :)

More information about the Marble-devel mailing list