mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
plasma: connect the notifications applet animations directly to QObject::deleteLater() slot
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9a5e68f140
commit
c9c9d0d642
4 changed files with 2 additions and 17 deletions
|
@ -116,18 +116,13 @@ void ApplicationFrame::animateRemove()
|
|||
disconnect(removewidget, 0, applicationswidget, 0);
|
||||
disconnect(configurewidget, 0, applicationswidget, 0);
|
||||
|
||||
connect(animation, SIGNAL(finished()), this, SLOT(slotAnimationFinished()));
|
||||
connect(animation, SIGNAL(finished()), this, SLOT(deleteLater()));
|
||||
animation->setTargetWidget(this);
|
||||
animation->setProperty("startOpacity", 1.0);
|
||||
animation->setProperty("targetOpacity", 0.0);
|
||||
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
}
|
||||
|
||||
void ApplicationFrame::slotAnimationFinished()
|
||||
{
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
|
||||
ApplicationsWidget::ApplicationsWidget(QGraphicsItem *parent, NotificationsWidget *notificationswidget)
|
||||
: QGraphicsWidget(parent),
|
||||
|
|
|
@ -43,9 +43,6 @@ public:
|
|||
QString name;
|
||||
|
||||
void animateRemove();
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotAnimationFinished();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -102,18 +102,13 @@ void JobFrame::animateRemove()
|
|||
disconnect(removewidget, 0, jobswidget, 0);
|
||||
disconnect(openwidget, 0, jobswidget, 0);
|
||||
|
||||
connect(animation, SIGNAL(finished()), this, SLOT(slotAnimationFinished()));
|
||||
connect(animation, SIGNAL(finished()), this, SLOT(deleteLater()));
|
||||
animation->setTargetWidget(this);
|
||||
animation->setProperty("startOpacity", 1.0);
|
||||
animation->setProperty("targetOpacity", 0.0);
|
||||
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
}
|
||||
|
||||
void JobFrame::slotAnimationFinished()
|
||||
{
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
|
||||
JobsWidget::JobsWidget(QGraphicsItem *parent, NotificationsWidget *notificationswidget)
|
||||
: QGraphicsWidget(parent),
|
||||
|
|
|
@ -44,8 +44,6 @@ public:
|
|||
QString name;
|
||||
|
||||
void animateRemove();
|
||||
private Q_SLOTS:
|
||||
void slotAnimationFinished();
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue