summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Idle/ActualIdleDetector.cpp')
-rw-r--r--SwifTools/Idle/ActualIdleDetector.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/SwifTools/Idle/ActualIdleDetector.cpp b/SwifTools/Idle/ActualIdleDetector.cpp
index ba23b99..2e2f1f1 100644
--- a/SwifTools/Idle/ActualIdleDetector.cpp
+++ b/SwifTools/Idle/ActualIdleDetector.cpp
@@ -1,18 +1,19 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <SwifTools/Idle/ActualIdleDetector.h>
+
#include <boost/bind.hpp>
-#include <iostream>
-#include <SwifTools/Idle/IdleQuerier.h>
#include <Swiften/Network/Timer.h>
#include <Swiften/Network/TimerFactory.h>
+#include <SwifTools/Idle/IdleQuerier.h>
+
namespace Swift {
ActualIdleDetector::ActualIdleDetector(IdleQuerier* querier, TimerFactory* timerFactory, int refreshRateMilliseconds) : querier(querier) {
@@ -22,6 +23,7 @@ ActualIdleDetector::ActualIdleDetector(IdleQuerier* querier, TimerFactory* timer
}
ActualIdleDetector::~ActualIdleDetector() {
+ timer->onTick.disconnect(boost::bind(&ActualIdleDetector::handleTimerTick, this));
timer->stop();
}