From fb6df81fa9f224c94118fd79fea91ae15559c7e3 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 22 Aug 2016 16:17:38 +0900 Subject: 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. --- connection.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'connection.cpp') 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, [=] () { -- cgit v1.2.3