From 73c836239bfa35713ad76d5e205ce2f2dceffffd Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Sun, 10 Feb 2019 15:08:08 +0300 Subject: Connection: move syncLoopTimeout to Connection::Private Signed-off-by: Alexey Andreyev --- lib/connection.cpp | 5 +++-- lib/connection.h | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/connection.cpp b/lib/connection.cpp index a9a8bba3..63b0a31d 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -90,6 +90,7 @@ class Connection::Private DirectChatUsersMap directChatUsers; std::unordered_map accountData; QString userId; + int syncLoopTimeout = -1; SyncJob* syncJob = nullptr; @@ -232,7 +233,7 @@ void Connection::doConnectToServer(const QString& user, const QString& password, void Connection::syncLoopIteration() { - sync(_syncLoopTimeout); + sync(d->syncLoopTimeout); } void Connection::connectWithToken(const QString& userId, @@ -326,7 +327,7 @@ void Connection::sync(int timeout) void Connection::syncLoop(int timeout) { - _syncLoopTimeout = timeout; + d->syncLoopTimeout = timeout; connect(this, &Connection::syncDone, this, &Connection::syncLoopIteration); syncLoopIteration(); // initial sync to start the loop } diff --git a/lib/connection.h b/lib/connection.h index c9ca3580..45b691e1 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -707,8 +707,6 @@ namespace QMatrixClient static room_factory_t _roomFactory; static user_factory_t _userFactory; - - int _syncLoopTimeout = -1; }; } // namespace QMatrixClient Q_DECLARE_METATYPE(QMatrixClient::Connection*) -- cgit v1.2.3