Code defects in Plasma
Aaron J. Seigo
aseigo at kde.org
Mon Sep 22 20:28:32 CEST 2008
On Monday 22 September 2008, Ivan Čukić wrote:
> > - amarok/src/context/plasma/animator.cpp:291
> > Division by 0 if frames < 3
>
> issue1.diff attached
hm.. i'm not even sure that '/ 3' is really needed anymore at all. or the '/
5' elsewhere as well.. i think it actually should be:
qMax(1, frames * (d->driver->animationDuration(animation) / 1000.0))
i'll make these changes just now ...
> > - amarok/src/context/plasma/containment.cpp:991
> > Line 986 indicates that focusedApplet can be NULL. But focusedApplet is
> > equal to applet. Therefore applet can be NULL here.
>
> This is in ContainmentPrivate::focusApplet (not line 986 anymore)
> issue2.diff attached
hm.. can ContainmentPrivate::applets ever contain NULL? i don't think so.
i'd rather have this written as:
if (applet && applets.contains(applet)) {
i may as well make that change while i'm looking at it as well ...
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080922/6cebe6c2/attachment.sig
More information about the Plasma-devel
mailing list