Header files (Re: A little review of kdecore & kdeui)

Harri Porten porten at froglogic.com
Fri Apr 7 23:42:47 BST 2006


On Sat, 8 Apr 2006, David Faure wrote:

>> Considering the time I have already wasted searching my way through the Qt
>> 4 header files (am I the only one studying headers when trying to
>> understand compile and runtimer errors?)

> I don't understand; how could you get an error that points to a one-line 
> forwarding header? Surely if you get a compiler (or runtime?) error it's

An example of what I meant by runtime errors: I'm using a container that 
somehow gets corrupted during execution of my program. Let's say I'm using 
QList and being a Trolltech deciple I'm using the <QList> header. Now, 
where do I head looking for the exact definition of the class 
(documentation does never provide the full truth)? The QList header file, 
of course. But opening that file in my editor I see that I was wrong and 
get redirected somewhere else: qlist.h. Nothing that can't be solved by an 
editor macro but why the detour?

Same for compile error: if I spot an error when using KBar my first 
reaction is look in the documented header for it.

> going to be in a real qlowercase.h header, no?

I was resisting to touch the lower vs camel case debate here ;) But 
independant of that I see the existance of two headers (KFoo and kfoo.h) 
responsible for the same thing (defining a class) to only cause confusion. 
Header file redundancy is at least as bad as code duplication ;)

Harri.




More information about the kde-core-devel mailing list