aboutsummaryrefslogtreecommitdiff
path: root/jobs/syncjob.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-14 19:38:19 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-14 19:38:19 +0900
commitcca9a575e64e2824d36680d67de84c5cb1653165 (patch)
treecf385b028f507c73cadbf59511c01343bc8d1ada /jobs/syncjob.h
parent468a73a804924ed6e63cd4aa58d9bcbc0ebc79d9 (diff)
downloadlibquotient-cca9a575e64e2824d36680d67de84c5cb1653165.tar.gz
libquotient-cca9a575e64e2824d36680d67de84c5cb1653165.zip
Declare SyncRoomData as C++-movable
This fixes compilation with older compilers that try to instantiate a copy constructor (and fail because unique_ptr) but actually is more proper in general. Also: do not advertise the class as Q_MOVABLE_TYPE: this was useful for QList/QVector when SyncRoomData was copyable; now it isn't, and Qt containers can't deal with non-copyable classes at all.
Diffstat (limited to 'jobs/syncjob.h')
-rw-r--r--jobs/syncjob.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/jobs/syncjob.h b/jobs/syncjob.h
index e9288486..aed36e0b 100644
--- a/jobs/syncjob.h
+++ b/jobs/syncjob.h
@@ -58,12 +58,9 @@ namespace QMatrixClient
SyncRoomData(const QString& roomId, JoinState joinState_,
const QJsonObject& room_);
+ SyncRoomData(SyncRoomData&&) = default;
+ SyncRoomData& operator=(SyncRoomData&&) = default;
};
-} // namespace QMatrixClient
-Q_DECLARE_TYPEINFO(QMatrixClient::SyncRoomData, Q_MOVABLE_TYPE);
-
-namespace QMatrixClient
-{
// QVector cannot work with non-copiable objects, std::vector can.
using SyncDataList = std::vector<SyncRoomData>;