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

Simon Hausmann hausmann at kde.org
Sat Apr 20 12:39:07 BST 2002


On Sat, Apr 20, 2002 at 01:21:09PM +0200, Ingo Klöcker wrote:
> Therefore I propose to add the following convenience function to kdelibs 
> with a possible QString variant which calls this function:
> 
> static QCString <classname>::getHostname( bool = false );
> 
> QCString <classname>::getHostname( bool fallback_to_localhost )
> {
>   char str[256];

Excellent idea!

Just one tiny little remark on the API: This is IMHO a typical case
of boolean-in-function-argument-looks-ugly. See also
http://lists.kde.org/?l=kde-core-devel&m=100192948419150&w=2 .


Simon




More information about the kde-core-devel mailing list