aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roommessageevent.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-26 13:44:39 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-26 13:44:39 +0100
commitf6155d62740a88b020273ba623c816f7b9805772 (patch)
tree87824e5db591955638655b2e12bd9a5484efcb0a /lib/events/roommessageevent.h
parent91c1d93d3389ac924f1013dc7b37dfe70a17e57e (diff)
downloadlibquotient-f6155d62740a88b020273ba623c816f7b9805772.tar.gz
libquotient-f6155d62740a88b020273ba623c816f7b9805772.zip
Drop Q_GADGET from most uncopyable classes; other minor cleanup
Q_GADGET is generally used to enable two things outside of QObject: Q_PROPERTY/Q_INVOKABLE and Q_ENUM/Q_FLAG. While the latter can be used in its own right in QML, the former requires Q_GADGET instances to be passed to QML by value, which is not really possible with uncopyable/unassignable classes. Bottom line is that Q_PROPERTY in anything derived from Quotient::Event is not viable, making Q_GADGET macro useless unless there's a Q_ENUM/Q_FLAG (as is the case with RoomMessageEvent, e.g.).
Diffstat (limited to 'lib/events/roommessageevent.h')
-rw-r--r--lib/events/roommessageevent.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/events/roommessageevent.h b/lib/events/roommessageevent.h
index 88d3b74c..56597ddc 100644
--- a/lib/events/roommessageevent.h
+++ b/lib/events/roommessageevent.h
@@ -18,10 +18,6 @@ namespace MessageEventContent = EventContent; // Back-compatibility
*/
class RoomMessageEvent : public RoomEvent {
Q_GADGET
- Q_PROPERTY(QString msgType READ rawMsgtype CONSTANT)
- Q_PROPERTY(QString plainBody READ plainBody CONSTANT)
- Q_PROPERTY(QMimeType mimeType READ mimeType STORED false CONSTANT)
- Q_PROPERTY(const EventContent::TypedBase* content READ content CONSTANT)
public:
DEFINE_EVENT_TYPEID("m.room.message", RoomMessageEvent)