From 43e5ee5d153b2db1c5c0a4a00278410c718901e9 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 9 Apr 2009 05:57:57 +0000 Subject: [PATCH] correct slots svn path=/trunk/KDE/kdelibs/; revision=951381 --- applet.cpp | 8 +++++--- private/applet_p.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/applet.cpp b/applet.cpp index 2eb1371aa..1bcf5139f 100644 --- a/applet.cpp +++ b/applet.cpp @@ -2302,13 +2302,15 @@ void AppletOverlayWidget::destroy() connect(Animator::self(), SIGNAL(animationFinished(QGraphicsItem*,Plasma::Animator::Animation)), this, - SLOT(overlayAnimationCompleteComplete(QGraphicsItem*,Plasma::Animator::Animation))); + SLOT(overlayAnimationComplete(QGraphicsItem*,Plasma::Animator::Animation))); Animator::self()->animateItem(this, Animator::DisappearAnimation); } -void AppletOverlayWidget::overlayAnimationComplete() +void AppletOverlayWidget::overlayAnimationComplete(QGraphicsItem *item, Plasma::Animator::Animation) { - deleteLater(); + if (item == this) { + deleteLater(); + } } void AppletOverlayWidget::paint(QPainter *painter, diff --git a/private/applet_p.h b/private/applet_p.h index 71453b486..fb4c186b8 100644 --- a/private/applet_p.h +++ b/private/applet_p.h @@ -26,6 +26,7 @@ #include +#include "plasma/animator.h" #include "plasma/private/dataengineconsumer_p.h" class KKeySequenceWidget; @@ -50,7 +51,7 @@ protected: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); protected Q_SLOTS: - void overlayAnimationComplete(); + void overlayAnimationComplete(QGraphicsItem *item, Plasma::Animator::Animation); }; class AppletPrivate : public DataEngineConsumer