Revision e795120...

Go back to digest for 8th May 2011

Bug Fixes in KDE Base

Aaron J. Seigo committed changes in [kdelibs] /icons:

use a QWeakPointer on the KIconLoader passed in as there are no lifetime guarantees

usually KGlobal::iconLoader() is used, so this isn't an issue seen very often.
however, when a local KIconLoader is created, it is easy to get QIcons with a
KIconEngine that has a bad KIconLoader pointer in them. particularly as QIcon
is implicitly shared and easily passed around. the StatusNotifier Plasma DataEngine
was triggering this, though it would be trivial to run into this problem again
anytime a KIconLoader is created locally

thankfully, QWeakPointer does the job and is very fast and light. (confirmed
both with my own testing and confirmation from Thiago).

massive thanks to Michael Pyne for detecting the cause of the problem via Valgrind.

File Changes

Modified 2 files
  • /icons
  •   kdeui/kiconengine.cpp
  •   kdeui/kiconengine_p.h
2 files changed in total