summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/notificationwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/notificationwidget.cpp')
-rw-r--r--desktop-widgets/notificationwidget.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/desktop-widgets/notificationwidget.cpp b/desktop-widgets/notificationwidget.cpp
index 952adef4f..e0227010c 100644
--- a/desktop-widgets/notificationwidget.cpp
+++ b/desktop-widgets/notificationwidget.cpp
@@ -3,8 +3,7 @@
NotificationWidget::NotificationWidget(QWidget *parent) : KMessageWidget(parent)
{
- future_watcher = new QFutureWatcher<void>();
- connect(future_watcher, SIGNAL(finished()), this, SLOT(finish()));
+ connect(&future_watcher, SIGNAL(finished()), this, SLOT(finish()));
}
void NotificationWidget::showNotification(QString message, KMessageWidget::MessageType type)
@@ -29,15 +28,10 @@ QString NotificationWidget::getNotificationText()
void NotificationWidget::setFuture(const QFuture<void> &future)
{
- future_watcher->setFuture(future);
+ future_watcher.setFuture(future);
}
void NotificationWidget::finish()
{
hideNotification();
}
-
-NotificationWidget::~NotificationWidget()
-{
- delete future_watcher;
-}