cpp includes in http ioslave

Rolf Eike Beer kde at opensource.sf-tec.de
Sun Jul 17 19:28:44 BST 2011

Am Sonntag, 17. Juli 2011, 13:14:39 schrieb Dawit A:
> On Sun, Jul 17, 2011 at 6:38 AM, Rolf Eike Beer
> <kde at opensource.sf-tec.de> wrote:
> > When one looks at kioslave/http/http.cpp it finds things like this:
> > 
> > //string parsing helpers and HeaderTokenizer implementation
> > #include "parsinghelpers.cpp"
> > //authentication handlers
> > #include "httpauthentication.cpp"
> > 
> > Which happens because e.g. parsinghelpers.cpp only consist of static
> > functions. httpauthentication.cpp on the other hand consists of normal
> > class implementations. I don't really see a point in keeping at least
> > this file included as it's currently is. I wanted to write some
> > testcases for this and found out it's hard to use at all as several
> > headers are missing because it relies on http.cpp including them. In
> > httpauthentication.h you can also find things like this:
> > 
> > #ifndef HTTP_H_ // if we're included from http.cpp all necessary headers
> > are already included
> > #include <QtCore/QByteArray>
> > #include <QtCore/QString>
> > #include <QtCore/QList>
> > #include <kio/authinfo.h>
> > #endif
> > 
> > Would anyone object if I clean this up so the cpp files are all compiled
> > on their own and the parsinghelper stuff is put into a namespace (to
> > avoid pollution the global one) so these files can be just added in the
> > CMakeLists.txt to some project (like the testcases)?
> No objection to the cleanup, but please do not do it until I commit my
> changes. I haved added a new unit test for http authentication after
> fixing the test cases that were failing at
> http://greenbytes.de/tech/tc/httpauth/. The unit test is actually more
> through than that and exercises many parts of http authentication
> including calculation of digest and basic authentications. I hope you
> did not also do the same thing.

Well, if I'm faster those issues would be fixed, too ;) I think we should both 
push our branches to the server and compare what we have done.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110717/212434db/attachment.sig>

More information about the kde-core-devel mailing list