DRAFT document on coding conventions in kde libraries

Friedrich W. H. Kossebau Friedrich.W.H at kossebau.de
Sun Mar 5 21:53:21 GMT 2006


Am Sonntag, 5. März 2006 18:38, schrieb Olivier Goffart:
> I've made a second version where I tried to made all changes requested.
>
> Matt Rogers wrote :
> > I disagree with starting any sort of slot (private or not) with "slot".
> > We can look at the declaration of the function and know that it's a slot.
>
> I've made the comment less imperative. but it is still a recommendation. It
> helps to have a consistent naming, when reading the code.

But for a consistent naming it needs to be more then a recommendation, doesn't 
it? :P 

So I ask what makes a slot method special at all, except being additionally 
available for signal/slot connections to some events. Where would tagging a 
method "slotMethod()" make the code more readable? And doesn't it even make 
the code more unreadable in places where the signal/slot tricks are not used 
but the method being called just normally?

Are there special needs for a method to become a slot, like complying to some 
contracts, e.g. all time checking of parameter correctness? I ask this in 
terms of object oriented methodology? 

Unless there is I would even ask to, ahem, forbid the "slotX" naming 
convention... :)

See, it seems not to be used in Qt itself, either!

> > Nice document, please fix the typos and grammar. If you'd like, I can do
> > that before we put it on developer.kde.org
>
> I'd be happy if you can do that. As you may know, English is not my native
> language :-)
>
> Allen Winter wrote :
> > Also don't forget the license headers ^and copyrights^ in each files.
>
> I've added that.

Are there some docs _how_ to document license and copyrights in each files?

Are pointers sufficient like "See File xy for authors, copyright and licence" 
or should there be a complete documentation of all authors and the licence 
(although they might be fetchable from the repository system)? Does 
"copyright © 1996-2004 the KDE developers." really do it? And what sense make 
the notion of the year span at all, when to update? 
Currently there are all kind of habits spread... surely due to random 
copy&paste adaption?

(BTW: What rights systems does this all fit at all, execpt the USA one?)

Regards
Friedrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060305/c5649fd6/attachment.sig>


More information about the kde-core-devel mailing list