KDav without KIO

Daniel Vrátil dvratil at kde.org
Mon Jun 26 09:16:32 BST 2017


On Sunday, June 25, 2017 5:19:13 PM CEST Christian Mollekopf wrote:
> Hi,

Hi,

> 
> In order to resolve https://phabricator.kde.org/T5795 and finally get a
> sustainable solution for DAV access for Kube/Sink I have ported KDav
> from KIO to something based on https://github.com/mhaller/qwebdavlib
> respectively QNetworkAccessManager.
> 
> You can find the code in the dev/nokio branch (I had to squash all
> commits because of commits with non-unix line endings that could not be
> pushed).
> 
> In it's current state all tests pass and it does what it needs to for
> the time being. Some cleanup is still required, but functionally it
> seems complete to me.
> 
> My question to you is if you agree with this direction and would like to
> have that patch in kdav master, or if you'd like to stick with what's
> currently in master.

I'm fine with merging this into kdav master, assuming the issues I raised below 
are fixed first. Also please make sure the DAV resource still works and haven't 
lost any functionality (especially SSL and proxy handling).


From a quick glance at a code:

Since QWebDav is compeltely internalized to KDavManager, I don't see any way 
to:
1) handle SSL errors - you don't connect to QWebDav::checkSslCertificate() or 
expose the signal through public API, so applications cannot show a dialog to 
confirm the SSL error, thus you won't be able to use KDAV against servers with 
e.g. self-signed certificates
2) configure proxy - previously KIO would handle this automagically, now we 
need a way to pass QNetworkProxy settings to QWebDav's QNAM.

You seem to be leaking all the QNetworkReplies (from QNAM docs: After the 
request has finished, it is the responsibility of the user to delete the 
QNetworkReply object at an appropriate time. Do not directly delete it inside 
the slot connected to finished(). You can use the deleteLater() function)

Also make sure to use  qCDebug/qCWarning instead of qDebug/qWarning 
everywhere.

Dan 

> 
> Cheers,
> Christian


-- 
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)

GPG Key: 0x4D69557AECB13683
Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170626/2834a729/attachment.sig>


More information about the kde-pim mailing list