From cf10a4e9e6bcfa7932f166b251563b990f0dd61e Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 14 Sep 2016 08:06:14 +0900 Subject: Room::messageEvents: switch to an alias instead of explicit QList<> To facilitate a possible change of a container type. --- room.cpp | 4 ++-- room.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/room.cpp b/room.cpp index 6f78b6c2..56b300b0 100644 --- a/room.cpp +++ b/room.cpp @@ -60,7 +60,7 @@ class Room::Private void updateDisplayname(); Connection* connection; - QList messageEvents; + Timeline messageEvents; QString id; QStringList aliases; QString canonicalAlias; @@ -120,7 +120,7 @@ QString Room::id() const return d->id; } -QList< Event* > Room::messageEvents() const +Room::Timeline Room::messageEvents() const { return d->messageEvents; } diff --git a/room.h b/room.h index 25eae11b..8f6a65a6 100644 --- a/room.h +++ b/room.h @@ -37,11 +37,13 @@ namespace QMatrixClient { Q_OBJECT public: + using Timeline = Events; + Room(Connection* connection, QString id); virtual ~Room(); Q_INVOKABLE QString id() const; - Q_INVOKABLE QList messageEvents() const; + Q_INVOKABLE Timeline messageEvents() const; Q_INVOKABLE QString name() const; Q_INVOKABLE QStringList aliases() const; Q_INVOKABLE QString canonicalAlias() const; -- cgit v1.2.3