diff options
author | Felix Rohrbach <fxrh@gmx.de> | 2016-08-23 18:35:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 18:35:40 +0200 |
commit | 77d45e9afa195f7d715a5074b16f16c6b2d15235 (patch) | |
tree | b8c9f1d73e0eba48cc55194b06bbbeb97bc4e258 /jobs/syncjob.h | |
parent | da52097f1c90d7286aff27a84fc14b6b0793ff97 (diff) | |
parent | fb6df81fa9f224c94118fd79fea91ae15559c7e3 (diff) | |
download | libquotient-77d45e9afa195f7d715a5074b16f16c6b2d15235.tar.gz libquotient-77d45e9afa195f7d715a5074b16f16c6b2d15235.zip |
Merge pull request #18 from Fxrh/kitsune-use-qvector-with-nonpointers
Replaced QList<> with QVector<> where appropriate + minor code cleanup
Diffstat (limited to 'jobs/syncjob.h')
-rw-r--r-- | jobs/syncjob.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jobs/syncjob.h b/jobs/syncjob.h index 6e6b4f7c..f08a6b56 100644 --- a/jobs/syncjob.h +++ b/jobs/syncjob.h @@ -52,8 +52,11 @@ namespace QMatrixClient int highlightCount; int notificationCount; - SyncRoomData(QString roomId_, const QJsonObject& room_, JoinState joinState_); + SyncRoomData(QString roomId_ = QString(), + JoinState joinState_ = JoinState::Join, + const QJsonObject& room_ = QJsonObject()); }; + using SyncData = QVector<SyncRoomData>; class ConnectionData; class SyncJob: public BaseJob @@ -67,7 +70,7 @@ namespace QMatrixClient void setPresence(QString presence); void setTimeout(int timeout); - QList<SyncRoomData> roomData() const; + const SyncData& roomData() const; QString nextBatch() const; protected: @@ -80,5 +83,6 @@ namespace QMatrixClient Private* d; }; } +Q_DECLARE_TYPEINFO(QMatrixClient::SyncRoomData, Q_MOVABLE_TYPE); #endif // QMATRIXCLIENT_SYNCJOB_H |