Fwd: Global Shortcuts

Alex Merry huntedhacker at tiscali.co.uk
Fri Mar 7 00:55:19 GMT 2008

On Thursday 06 March 2008 21:19:58 Michael Jansen wrote:
> On Thursday 06 March 2008 19:03:13 Alex Merry wrote:
> > Q_FOREACH is necessary for public headers because they have to compile
> > with the compile-time switch that disables the "foreach" alias.
> I can't remember what an alias is in c++. Seem to have missed that thing.
> Just checked. foreach is an preprocessor macro too. Sorry i prefer to have
> my macros uppercase. If you show me an developing style guide who says i
> have to use the foreach version i will question it's sense but adhere. Else
> i keep usi ng the uppercase version.

Well, that's just because it's a macro masquerading as a language construct.  
It's meant to look and act like foreach in Java, for example.  Of course, it d
oesn't exactly due to the limitations of the macro system, but it also doesn't 
act like a "normal" macro - ie: like a constant or a function call.

That said, I don't think it's something to get worked up over.  My personal vi
ew is that "foreach" is a lot more clear about it's purpose and how it works, 
but you can also argue (as I guess you do) that "Q_FOREACH" makes its limitati
ons clearer.

> Then make it clearer. And kill the rule that forbids removing tabs from
> source s you don't touch If it's ok to change these nonsense.

I don't think there is such a rule, as long as style changes go in a separate 
commit (so that it's easy to see what has changed in a given commit).

Anyhow, I've helped prolong this thread quite enough now...


KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org

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

More information about the kde-core-devel mailing list