aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-08-22 16:17:38 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-08-22 16:22:56 +0900
commitfb6df81fa9f224c94118fd79fea91ae15559c7e3 (patch)
treec5409c28a1baf1d78dd32358e8fa045dfdb69d28 /connection.cpp
parentc2e38f28987b4fa273765b4234c6a57bdf75e446 (diff)
downloadlibquotient-fb6df81fa9f224c94118fd79fea91ae15559c7e3.tar.gz
libquotient-fb6df81fa9f224c94118fd79fea91ae15559c7e3.zip
Replaced QList<> with QVector<> where appropriate + minor code cleanup
See https://marcmutz.wordpress.com/effective-qt/containers/ for the background and http://lists.qt-project.org/pipermail/development/2015-July/022283.html for the relevant flamewar in Qt dev mailing list.
Diffstat (limited to 'connection.cpp')
-rw-r--r--connection.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/connection.cpp b/connection.cpp
index d6338191..904649bc 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -113,7 +113,11 @@ SyncJob* Connection::sync(int timeout)
syncJob->setTimeout(timeout);
connect( syncJob, &SyncJob::success, [=] () {
d->data->setLastEvent(syncJob->nextBatch());
- d->processRooms(syncJob->roomData());
+ for( const auto roomData: syncJob->roomData() )
+ {
+ if ( Room* r = d->provideRoom(roomData.roomId) )
+ r->updateData(roomData);
+ }
emit syncDone();
});
connect( syncJob, &SyncJob::failure, [=] () {