Skip to content
Snippets Groups Projects
Commit a8d16682 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 3d2d3998
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment