aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-10-07 16:20:20 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-10-07 16:20:20 +0900
commit14302ddbac1e6d9c95de15c97362c3de09f545eb (patch)
treece55d67815b1081a8c942fb6432134e056c4dd6c /room.cpp
parentab45e1aee912cf242caea2d762b2b27c83a0e972 (diff)
downloadlibquotient-14302ddbac1e6d9c95de15c97362c3de09f545eb.tar.gz
libquotient-14302ddbac1e6d9c95de15c97362c3de09f545eb.zip
Fixed massive leaks of Event objects
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/room.cpp b/room.cpp
index c693898f..e07426a7 100644
--- a/room.cpp
+++ b/room.cpp
@@ -119,7 +119,7 @@ QString Room::id() const
return d->id;
}
-Room::Timeline Room::messageEvents() const
+const Room::Timeline& Room::messageEvents() const
{
return d->messageEvents;
}
@@ -329,7 +329,7 @@ QString Room::roomMembername(QString userId) const
return roomMembername(connection()->user(userId));
}
-void Room::updateData(const SyncRoomData& data)
+void Room::updateData(SyncRoomData& data)
{
if( d->prevBatch.isEmpty() )
d->prevBatch = data.timelinePrevBatch;
@@ -339,7 +339,7 @@ void Room::updateData(const SyncRoomData& data)
// State changes can arrive in a timeline event; so check those.
processStateEvents(data.timeline);
- addNewMessageEvents(data.timeline);
+ addNewMessageEvents(data.timeline.release());
for( Event* ephemeralEvent: data.ephemeral )
{