[RFC] Add getHostname convenience function to kdelibs? (was: Re: [PATCH] Make the default sending domain configurable)

Lubos Lunak l.lunak at sh.cvut.cz
Sat Apr 20 14:28:16 BST 2002


On Saturday 20 April 2002 14:58, Thiago Macieira wrote:
> Thiago Macieira wrote
>
> >Ingo Klöcker wrote
> >
> >>QCString <classname>::getHostname( bool fallback_to_localhost )
>
> [snip]
>
> >For lack of better place, I'll add that as a static function to
> >KExtendedSocket, without the bool argument.
> >
> >Or does anyone have a better suggestion? KGlobal? KSystem?
>
> Here goes a patch. Any more suggestions?

> +
> +  for ( ; 1; len += 256)
> +    {

 This is only nitpicking, but please don't use 1 instead of true. Either 
simply use true when you mean true, or in this case you can omit it 
completely. The way it's written above it looks totally confusing.

-- 
 Lubos Lunak
 llunak at suse.cz ; l.lunak at kde.org
 http://dforce.sh.cvut.cz/~seli





More information about the kde-core-devel mailing list