aboutsummaryrefslogtreecommitdiff
path: root/events
diff options
context:
space:
mode:
Diffstat (limited to 'events')
-rw-r--r--events/event.cpp5
-rw-r--r--events/receiptevent.cpp8
-rw-r--r--events/receiptevent.h2
-rw-r--r--events/roomaliasesevent.cpp4
-rw-r--r--events/roommemberevent.cpp3
-rw-r--r--events/roommemberevent.h5
-rw-r--r--events/roommessageevent.cpp3
-rw-r--r--events/roommessageevent.h4
-rw-r--r--events/roomnameevent.cpp4
-rw-r--r--events/roomnameevent.h24
-rw-r--r--events/roomtopicevent.h2
-rw-r--r--events/typingevent.cpp6
-rw-r--r--events/typingevent.h4
-rw-r--r--events/unknownevent.cpp5
14 files changed, 35 insertions, 44 deletions
diff --git a/events/event.cpp b/events/event.cpp
index b3f75ca9..07649b02 100644
--- a/events/event.cpp
+++ b/events/event.cpp
@@ -20,10 +20,7 @@
#include <QtCore/QJsonArray>
#include <QtCore/QJsonDocument>
-#include <QtCore/QDateTime>
-#include <QtCore/QDebug>
-#include "util.h"
#include "roommessageevent.h"
#include "roomnameevent.h"
#include "roomaliasesevent.h"
@@ -33,6 +30,8 @@
#include "typingevent.h"
#include "receiptevent.h"
#include "unknownevent.h"
+#include "logging.h"
+#include "util.h"
using namespace QMatrixClient;
diff --git a/events/receiptevent.cpp b/events/receiptevent.cpp
index 5d11a0dd..c163424f 100644
--- a/events/receiptevent.cpp
+++ b/events/receiptevent.cpp
@@ -34,10 +34,10 @@ Example of a Receipt Event:
*/
#include "receiptevent.h"
-#include "util.h"
+
+#include "logging.h"
#include <QtCore/QJsonArray>
-#include <QtCore/QDebug>
using namespace QMatrixClient;
@@ -73,8 +73,8 @@ ReceiptEvent* ReceiptEvent::fromJson(const QJsonObject& obj)
{
if (eventIt.key().isEmpty())
{
- qCWarning(EVENTS) << "ReceiptEvent has an empty event id, skipping";
- qCDebug(EVENTS) << "ReceiptEvent content follows:\n" << contents;
+ qCWarning(EPHEMERAL) << "ReceiptEvent has an empty event id, skipping";
+ qCDebug(EPHEMERAL) << "ReceiptEvent content follows:\n" << contents;
continue;
}
const QJsonObject reads = eventIt.value().toObject().value("m.read").toObject();
diff --git a/events/receiptevent.h b/events/receiptevent.h
index a7e1debf..40c0384f 100644
--- a/events/receiptevent.h
+++ b/events/receiptevent.h
@@ -20,8 +20,6 @@
#include "event.h"
-#include <QtCore/QStringList>
-
namespace QMatrixClient
{
class Receipt
diff --git a/events/roomaliasesevent.cpp b/events/roomaliasesevent.cpp
index e0dbdb38..ab414498 100644
--- a/events/roomaliasesevent.cpp
+++ b/events/roomaliasesevent.cpp
@@ -33,10 +33,10 @@
// }
#include "roomaliasesevent.h"
-#include "util.h"
+
+#include "logging.h"
#include <QtCore/QJsonArray>
-#include <QtCore/QDebug>
using namespace QMatrixClient;
diff --git a/events/roommemberevent.cpp b/events/roommemberevent.cpp
index 0dafd303..51dbbbab 100644
--- a/events/roommemberevent.cpp
+++ b/events/roommemberevent.cpp
@@ -17,9 +17,8 @@
*/
#include "roommemberevent.h"
-#include "util.h"
-#include <QtCore/QDebug>
+#include "logging.h"
using namespace QMatrixClient;
diff --git a/events/roommemberevent.h b/events/roommemberevent.h
index f37cdc04..a33c2982 100644
--- a/events/roommemberevent.h
+++ b/events/roommemberevent.h
@@ -18,11 +18,10 @@
#pragma once
-#include <QtCore/QJsonObject>
-#include <QtCore/QUrl>
-
#include "event.h"
+#include <QtCore/QUrl>
+
namespace QMatrixClient
{
enum class MembershipType {Invite, Join, Knock, Leave, Ban};
diff --git a/events/roommessageevent.cpp b/events/roommessageevent.cpp
index fd6de464..677bb79f 100644
--- a/events/roommessageevent.cpp
+++ b/events/roommessageevent.cpp
@@ -17,10 +17,11 @@
*/
#include "roommessageevent.h"
+
+#include "logging.h"
#include "util.h"
#include <QtCore/QMimeDatabase>
-#include <QtCore/QDebug>
using namespace QMatrixClient;
diff --git a/events/roommessageevent.h b/events/roommessageevent.h
index 67789ef7..5d5336aa 100644
--- a/events/roommessageevent.h
+++ b/events/roommessageevent.h
@@ -18,12 +18,12 @@
#pragma once
+#include "event.h"
+
#include <QtCore/QUrl>
#include <QtCore/QMimeType>
#include <QtCore/QSize>
-#include "event.h"
-
namespace QMatrixClient
{
enum class MessageEventType
diff --git a/events/roomnameevent.cpp b/events/roomnameevent.cpp
index c5bcf011..c94cb2c3 100644
--- a/events/roomnameevent.cpp
+++ b/events/roomnameevent.cpp
@@ -22,8 +22,8 @@ using namespace QMatrixClient;
class RoomNameEvent::Private
{
-public:
- QString name;
+ public:
+ QString name;
};
RoomNameEvent::RoomNameEvent() :
diff --git a/events/roomnameevent.h b/events/roomnameevent.h
index 0997ad9c..8748c4be 100644
--- a/events/roomnameevent.h
+++ b/events/roomnameevent.h
@@ -22,20 +22,18 @@
namespace QMatrixClient
{
+ class RoomNameEvent : public Event
+ {
+ public:
+ RoomNameEvent();
+ virtual ~RoomNameEvent();
-class RoomNameEvent : public Event
-{
-public:
- RoomNameEvent();
- virtual ~RoomNameEvent();
-
- QString name() const;
-
- static RoomNameEvent* fromJson(const QJsonObject& obj);
+ QString name() const;
-private:
- class Private;
- Private *d;
-};
+ static RoomNameEvent* fromJson(const QJsonObject& obj);
+ private:
+ class Private;
+ Private *d;
+ };
}
diff --git a/events/roomtopicevent.h b/events/roomtopicevent.h
index d4347953..4b0a24b0 100644
--- a/events/roomtopicevent.h
+++ b/events/roomtopicevent.h
@@ -18,8 +18,6 @@
#pragma once
-#include <QtCore/QJsonObject>
-
#include "event.h"
namespace QMatrixClient
diff --git a/events/typingevent.cpp b/events/typingevent.cpp
index 11c3a565..009059af 100644
--- a/events/typingevent.cpp
+++ b/events/typingevent.cpp
@@ -17,10 +17,10 @@
*/
#include "typingevent.h"
-#include "util.h"
+
+#include "logging.h"
#include <QtCore/QJsonArray>
-#include <QtCore/QDebug>
using namespace QMatrixClient;
@@ -55,6 +55,6 @@ TypingEvent* TypingEvent::fromJson(const QJsonObject& obj)
{
e->d->users << user.toString();
}
- qCDebug(EVENTS) << "Typing:" << e->d->users;
+ qCDebug(EPHEMERAL) << "Typing:" << e->d->users;
return e;
}
diff --git a/events/typingevent.h b/events/typingevent.h
index 5a8b045c..da57a389 100644
--- a/events/typingevent.h
+++ b/events/typingevent.h
@@ -18,10 +18,10 @@
#pragma once
-#include <QtCore/QStringList>
-
#include "event.h"
+#include <QtCore/QStringList>
+
namespace QMatrixClient
{
class TypingEvent: public Event
diff --git a/events/unknownevent.cpp b/events/unknownevent.cpp
index b2947bf7..1670ff1d 100644
--- a/events/unknownevent.cpp
+++ b/events/unknownevent.cpp
@@ -18,10 +18,9 @@
#include "unknownevent.h"
-#include <QtCore/QJsonDocument>
-#include <QtCore/QDebug>
+#include "logging.h"
-#include "util.h"
+#include <QtCore/QJsonDocument>
using namespace QMatrixClient;