From bd3bb07a7f76964a3550df2e72541ece53a4bce7 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 7 Oct 2016 16:21:41 +0900 Subject: Use Q_DECLARE_TYPEINFO correctly The previous code had no effect because QVector was instantiated before Q_DECLARE_TYPEINFO occurence. --- events/receiptevent.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/events/receiptevent.h b/events/receiptevent.h index 028bf0f6..cf08fed9 100644 --- a/events/receiptevent.h +++ b/events/receiptevent.h @@ -32,6 +32,11 @@ namespace QMatrixClient QString userId; QDateTime timestamp; }; +} +Q_DECLARE_TYPEINFO(QMatrixClient::Receipt, Q_MOVABLE_TYPE); + +namespace QMatrixClient +{ using Receipts = QVector; class ReceiptEvent: public Event @@ -51,6 +56,5 @@ namespace QMatrixClient Private* d; }; } -Q_DECLARE_TYPEINFO(QMatrixClient::Receipt, Q_MOVABLE_TYPE); #endif // QMATRIXCLIENT_RECEIPTEVENT_H -- cgit v1.2.3