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

List:       kde-commits
Subject:    [akonadi] src/server: Make sure we stop the timer from the right thread too
From:       Dan_Vrátil <dvratil () kde ! org>
Date:       2015-12-17 22:12:43
Message-ID: E1a9gmx-0003pP-Ud () scm ! kde ! org
[Download RAW message or body]

Git commit 2bff7b0244727e1c307835e172a3dafcab02cc5c by Dan Vrátil.
Committed on 17/12/2015 at 22:12.
Pushed by dvratil into branch 'master'.

Make sure we stop the timer from the right thread too

M  +8    -5    src/server/connection.cpp

http://commits.kde.org/akonadi/2bff7b0244727e1c307835e172a3dafcab02cc5c

diff --git a/src/server/connection.cpp b/src/server/connection.cpp
index 9349dc3..b5c449f 100644
--- a/src/server/connection.cpp
+++ b/src/server/connection.cpp
@@ -112,9 +112,16 @@ void Connection::init()
 
 void Connection::quit()
 {
+    Tracer::self()->endConnection(m_identifier, QString());
+    collectionReferenceManager()->removeSession(m_sessionId);
+    NotificationManager::self()->unregisterConnection(this);
+
     delete m_socket;
     m_socket = 0;
 
+    m_idleTimer->stop();
+    delete m_idleTimer;
+
     AkThread::quit();
 }
 
@@ -140,15 +147,11 @@ CollectionReferenceManager *Connection::collectionReferenceManager()
 
 Connection::~Connection()
 {
-    Tracer::self()->endConnection(m_identifier, QString());
-    collectionReferenceManager()->removeSession(m_sessionId);
-    NotificationManager::self()->unregisterConnection(this);
+    quitThread();
 
     if (m_reportTime) {
         reportTime();
     }
-
-    m_idleTimer->stop();
 }
 
 void Connection::slotConnectionIdle()
[prev in list] [next in list] [prev in thread] [next in thread] 

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