summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Vrátil <[email protected]>2015-08-06 11:32:14 +0200
committerDan Vrátil <[email protected]>2015-08-06 11:32:14 +0200
commite2e1bec637c3ca6228de270d1d9d6d2c785ea20d (patch)
tree550aa5b319d874c7c51e78e283ac30431a0bb8a0
parentb85a8076cc4a078a462a5fb2d0e8e7951bf9dbcc (diff)
Fix Session test integration
Makes FakeSession work correctly again, thus fixing JobTest
-rw-r--r--akonadi/src/core/session.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/akonadi/src/core/session.cpp b/akonadi/src/core/session.cpp
index 079bd54..bbfc09c 100644
--- a/akonadi/src/core/session.cpp
+++ b/akonadi/src/core/session.cpp
@@ -339,8 +339,10 @@ void SessionPrivate::forceReconnect()
{
jobRunning = false;
connected = false;
- connThread->forceReconnect();
- QMetaObject::invokeMethod(connThread, "reconnect", Qt::QueuedConnection); // avoids reconnecting in the dtor
+ if (connThread) {
+ connThread->forceReconnect();
+ }
+ QMetaObject::invokeMethod(mParent, "reconnect", Qt::QueuedConnection);
}
Session::Session(const QByteArray &sessionId, QObject *parent)