[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Debug warnings for broken icons
From:       Urs Wolfer <uwolfer () kde ! org>
Date:       2007-12-22 18:44:19
Message-ID: 200712221944.22088.uwolfer () kde ! org
[Download RAW message or body]


On Wednesday 19 December 2007 19.57:34 Urs Wolfer wrote:
> Hi all
>
> I have had the idea to throw debug warnings about missing or wrong spelled
> icons in apps. It's something like the runtime debug warnings about broken
> connections in Qt.
>
> Example:
> khelpcenter(28217)/kdeui (KIconLoader) KIconLoader::loadIcon: No such
> icon "thumbnail"
>
> It would help us to detect and fix such cases:
> * You can see it quite fast in the debug output when there is an icon
> missing. A good testcase is for example the "Configure Toolbar" dialog.
>
> * You can see the name of the broken icon in the debug. This makes it very
> easy to find the ussage(s) of this icon in the source code. Just do a
> simple grep in the application source folder (grep "\"brokenicon\"" * -R).
>
> There is one problem: we will see this warning only once because of the
> icon cache. Currently, the icon cache caches the "unknown" icon if the icon
> is broken. There is not a really nice solution for this issue: either we
> don't cache broken images, so we can see it every time an app calls such an
> icon, or we output the warning only once. I have discussed that with Rivo
> (the author of the icon cache). We found a solution, but only for 4.1
> because it adds some new features. For the moment, I prefer the way to not
> cache broken icons. This makes it way easier to find and fix such icons. Of
> course it would be nice if we have a #define when we compile kdelibs in
> debug mode (is that possible?). Then we could just not insert it into the
> cache when we are in debug mode.
>
> Okay to commit this patch?
>
> Bye
> urs

Committed in r751742.

Thanks for the hint about '#ifndef NDEBUG'. I have used that, and it will make 
sense as soon as this define will be ported to the new build system.

Bye
urs

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic