[RFC] Using KPassivePopup from KSystrayIcon

Boyd Stephen Smith Jr. bss03 at volumehost.net
Wed Apr 4 11:19:14 BST 2007


On Wednesday 04 April 2007, Hans Meine <hans_meine at gmx.net> wrote 
about 'Re: [RFC] Using KPassivePopup from KSystrayIcon':
> Am Dienstag, 03. April 2007 23:48:19 schrieb Matthew Woehlke:
> > >  No problem. Just realize we use C++ and not C, embrace the new
> > > millenium and start using NULL ;).
> >
> > Um, I think I saw somewhere in the KDE standards *not* to use NULL...
> >
> > Hmm... interesting. [1] says NULL is okay, but [2] says it isn't.
> > Which is right?
> >
> > [1] http://developer.kde.org/documentation/other/mistakes.html
> > [2] http://pim.kde.org/development/coding-korganizer.php
>
> I liked using NULL (in order to be unambiguous) until I was told that it
> is not portable.  NULL is not always defined to be "just zero", but it
> may be (void *)0.  Now you might get a problem if you assign a void ptr
> to a typed pointer variable. :-(

Stroustrup uses 0:
http://www.research.att.com/~bs/bs_faq2.html#null

The standard says they are the same (after preprocessing). Some compilers 
that haven't caught up to the standard way of doing things, so to be safe 
(and save a little bit of typing) use 0.

I /greatly/ prefer NULL, and have no problem telling those having trouble 
with my code to get a standards-compliant compiler.  That said, I'm not 
here to change (or establish) KDE policy -- I'll wait until 
number_of_commits_by("bss03 at volumehost.net") > 0 to do that. :)

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03 at volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     
-------------- 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/20070404/23f4a79e/attachment.sig>


More information about the kde-core-devel mailing list