diff options
author | Alexey Andreyev <aa13q@ya.ru> | 2019-02-10 15:08:08 +0300 |
---|---|---|
committer | Alexey Andreyev <aa13q@ya.ru> | 2019-02-10 15:08:08 +0300 |
commit | 73c836239bfa35713ad76d5e205ce2f2dceffffd (patch) | |
tree | e26b828c55ea563e3486167b53a12959d7b35565 /lib | |
parent | bf6cd3d29052f9e79fee29c6a6646d95271a196a (diff) | |
download | libquotient-73c836239bfa35713ad76d5e205ce2f2dceffffd.tar.gz libquotient-73c836239bfa35713ad76d5e205ce2f2dceffffd.zip |
Connection: move syncLoopTimeout to Connection::Private
Signed-off-by: Alexey Andreyev <aa13q@ya.ru>
Diffstat (limited to 'lib')
-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*) |