diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-02-27 15:28:57 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-02-27 15:28:57 +0900 |
commit | 0975f96207300b31279c63eaea597d2e9c435532 (patch) | |
tree | e2b63b7eb19db1e95d9854027a0a84c64c8f8e81 /examples | |
parent | 46cb751f73ca4234d5600e0c76e7f93c74278ef5 (diff) | |
download | libquotient-0975f96207300b31279c63eaea597d2e9c435532.tar.gz libquotient-0975f96207300b31279c63eaea597d2e9c435532.zip |
qmc-example: use Connection::syncLoop
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qmc-example.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/qmc-example.cpp b/examples/qmc-example.cpp index 421ead27..9d6f2f39 100644 --- a/examples/qmc-example.cpp +++ b/examples/qmc-example.cpp @@ -147,14 +147,12 @@ void QMCTest::onNewRoom(Room* r) void QMCTest::run() { c->setLazyLoading(true); - c->sync(); + c->syncLoop(); connectSingleShot(c.data(), &Connection::syncDone, this, &QMCTest::doTests); connect(c.data(), &Connection::syncDone, c.data(), [this] { cout << "Sync complete, " << running.size() << " test(s) in the air: " << running.join(", ").toStdString() << endl; - if (!running.isEmpty()) - c->sync(10000); - else + if (running.isEmpty()) conclude(); }); } @@ -491,6 +489,7 @@ void QMCTest::checkDirectChatOutcome(const Connection::DirectChatsMap& added) void QMCTest::conclude() { + c->stopSync(); auto succeededRec = QString::number(succeeded.size()) + " tests succeeded"; if (!failed.isEmpty() || !running.isEmpty()) succeededRec += " of " % |