aboutsummaryrefslogtreecommitdiff
path: root/events
diff options
context:
space:
mode:
Diffstat (limited to 'events')
-rw-r--r--events/receiptevent.h6
-rw-r--r--events/roommessageevent.cpp1
2 files changed, 6 insertions, 1 deletions
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<Receipt>;
class ReceiptEvent: public Event
@@ -51,6 +56,5 @@ namespace QMatrixClient
Private* d;
};
}
-Q_DECLARE_TYPEINFO(QMatrixClient::Receipt, Q_MOVABLE_TYPE);
#endif // QMATRIXCLIENT_RECEIPTEVENT_H
diff --git a/events/roommessageevent.cpp b/events/roommessageevent.cpp
index d6166dad..76152102 100644
--- a/events/roommessageevent.cpp
+++ b/events/roommessageevent.cpp
@@ -28,6 +28,7 @@ class RoomMessageEvent::Private
{
public:
Private() : msgtype(MessageEventType::Unknown), content(nullptr) {}
+ ~Private() { if (content) delete content; }
QString userId;
MessageEventType msgtype;