[PATCH] Set program icon name by KAboutData

Friedrich W. H. Kossebau kossebau at kde.org
Sun Apr 20 21:04:04 BST 2008


Am Sonntag, 20. April 2008, um 00:19 Uhr, schrieb Aaron J. Seigo:
> On Saturday 19 April 2008, Friedrich W. H. Kossebau wrote:
> > Okay to apply on next Monday?
>
> +1 from me.

:)

> btw, this:
>
> +   if (!d->programIconName.isEmpty())
> +      return d->programIconName;
> +   return appName();
>
> is missing {}s as per the kdelibs coding style enforcing that one even
> single line if's.

Which could ask me to adapt the whole file, as I wrote the code by example 
(TM). But that would kill "svn blame". So now go for mixed style in a file?
( I personally would use the kdelibs coding style only for completely new 
files).

> (and not that it matters *one bit* =) but as i personally like to avoid
> negatives in conditionals, i'd write it as:
>
> if (d->programIconName.isEmpty()) {
>     return appName();
> }
>
> return d->programIconName;)

I personally even prefer
	return d->programIconName.isEmpty() ? appName() : d->programIconName;
:P
Friedrich




More information about the kde-core-devel mailing list