jens at kdewebdev.org
Wed May 11 07:13:04 UTC 2005
> Because then the template won't compile out of the box.
I could not believe how a header file that includes itself would change the
compile. I was in doubt about everything I know about c++ ;-)
Now I understand the reason: the template file has the same name as the class
you use "kscreensaver", so the include does actually not include itself after
the template got processed but the KDE class definition.
The correct solution would be to rename the template files to another name,
That leads to another small glitch in the project wizard. If I type
kscreensaver as my project name the wizard happily creates kscreensaver.h and
kscreensaver.cpp! This can create quite some trouble for people who start
learning KDE. Could the wizard check the project name against KDE and maybe
QT class names and prevent the user to create an already existing class?
More information about the KDevelop-devel