[Bug 161122] Plasma::Svg::Private::findInCache creates invalid pixmap and X errors when size is invalid
David Benjamin
dnas.dnas at gmail.com
Tue Apr 22 00:34:02 CEST 2008
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=161122
------- Additional Comments From dnas.dnas gmail com 2008-04-22 00:34 -------
Hrm, that seems strange. Because then the default argument for size in findInCache(), which is also the one used in Plasma::Svg::paint(), makes the function do nothing (after some complex trickery and cache lookups to verify it cannot do anything).
Is the intent rather to use Plasma::Svg::Private::size when no size is given? That would seem to make sense, and adding a small snippet to the effect
(e.g. something like...
if (!s.isValid()) {
s = this->size.toSize();
}
...which is probably not a good fix since this messes up the cached id and probably belongs at the beginning of the function anyway)
does make ksysguard draw a background on the plot, which I can only assume was the intended purpose. It doesn't seem to be a mistake on ksysguard's part either (kdebase/workspace/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc, line 577); at least, it looks a reasonable use. (Although I'm sure why they're using Plasma. Meh.)
Is this what Plasma::Svg is supposed to do? I'm not familiar at all with this API. (Otherwise I would have tried to attach a patch earlier.)
(I probably should have mentioned my confusion in the bug report in the first place... I thought I did, but I guess it got lost somewhere on the way from my head to my fingers. :-D)
More information about the Panel-devel
mailing list