diff options
-rw-r--r-- | lib/connection.cpp | 5 | ||||
-rw-r--r-- | lib/connection.h | 2 |
2 files changed, 3 insertions, 4 deletions
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<QString, EventPtr> 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*) |