Skip to content
Commit e7951201 authored by Aaron J. Seigo's avatar Aaron J. Seigo
Browse files

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.

BUG:258706
parent ed3299ee
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment