[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Code defects in Plasma
From:       Ivan =?utf-8?q?=C4=8Cuki=C4=87?= <ivan.cukic () gmail ! com>
Date:       2008-09-22 10:40:14
Message-ID: 200809221240.14873.ivan.cukic () gmail ! com
[Download RAW message or body]

> - amarok/src/context/plasma/animator.cpp:291
> Division by 0 if frames < 3
issue1.diff attached

> - 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

Commit or not?

Cheerio!

-- 
I am a spokesman for a better way of living
Love is the word and it can be heard
If you are young the message can be sung
    -- Deep Purple


["issue1.diff" (text/x-patch)]

Index: animator.cpp
===================================================================
--- animator.cpp	(revision 862959)
+++ animator.cpp	(working copy)
@@ -288,7 +288,7 @@
     state->animation = animation;
     state->curve = d->driver->animationCurve(animation);
     //TODO: variance in times based on the value of animation
-    state->frames = frames / 3;
+    state->frames = qMax(1, frames / 3);
     state->currentFrame = 0;
     state->interval = d->driver->animationDuration(animation) / qreal(state->frames);
     state->interval = qMax(MIN_TICK_RATE_INT, state->interval - (state->interval % MIN_TICK_RATE_INT));
@@ -468,7 +468,7 @@
     }
 
     d->animatedElements[state->id] = state;
-    
+
     //kDebug() << "startElementAnimation(AnimId " << animation << ") returning " << state->id;
     if (needTimer && !d->timerId) {
         // start a 20fps timer;

["issue2.diff" (text/x-patch)]

Index: /opt/kde4trunk/src/KDE/base/workspace/libs/plasma/containment.cpp
===================================================================
--- /opt/kde4trunk/src/KDE/base/workspace/libs/plasma/containment.cpp	(revision 862959)
+++ /opt/kde4trunk/src/KDE/base/workspace/libs/plasma/containment.cpp	(working copy)
@@ -1326,8 +1326,8 @@
             foreach (QWidget *w, widgets) {
                 focusedApplet->addAssociatedWidget(w);
             }
+            focusedApplet->setFocus(Qt::ShortcutFocusReason);
         }
-        applet->setFocus(Qt::ShortcutFocusReason);
     } else {
         focusedApplet = 0;
     }


_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic