Enforce namespaced includes for libQuotient

This commit is contained in:
Tobias Fella
2023-04-23 19:13:19 +02:00
parent 8db2526153
commit c963966f1d
55 changed files with 401 additions and 133 deletions

View File

@@ -60,6 +60,7 @@ else()
set(QTLOCATION_MODULE_QML_VERSION "5.15")
endif()
set(QUOTIENT_FORCE_NAMESPACED_INCLUDES TRUE)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX NEOCHAT

View File

@@ -7,9 +7,9 @@
#include "neochatroom.h"
#include <connection.h>
#include <quotient_common.h>
#include <syncdata.h>
#include <Quotient/connection.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
using namespace Quotient;

View File

@@ -6,9 +6,9 @@
#include "texthandler.h"
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include <qnamespace.h>
#include <quotient_common.h>
#include <syncdata.h>
using namespace Quotient;

View File

@@ -3,8 +3,8 @@
#include "actionshandler.h"
#include <csapi/joining.h>
#include <events/roommemberevent.h>
#include <Quotient/csapi/joining.h>
#include <Quotient/events/roommemberevent.h>
#include <cmark.h>

View File

@@ -5,7 +5,7 @@
#include <QObject>
#include <events/roommessageevent.h>
#include <Quotient/events/roommessageevent.h>
#include "neochatroom.h"

View File

@@ -31,16 +31,15 @@
#include <signal.h>
#include "accountregistry.h"
#include <connection.h>
#include <csapi/content-repo.h>
#include <csapi/logout.h>
#include <csapi/profile.h>
#include <jobs/downloadfilejob.h>
#include <qt_connection_util.h>
#include <eventstats.h>
#include <Quotient/accountregistry.h>
#include <Quotient/connection.h>
#include <Quotient/csapi/content-repo.h>
#include <Quotient/csapi/logout.h>
#include <Quotient/csapi/profile.h>
#include <Quotient/jobs/downloadfilejob.h>
#include <Quotient/qt_connection_util.h>
#include <Quotient/csapi/notifications.h>
#include <Quotient/eventstats.h>
#include "neochatconfig.h"
#include "neochatroom.h"

View File

@@ -9,8 +9,8 @@
#include <KFormat>
#include <jobs/basejob.h>
#include <settings.h>
#include <Quotient/jobs/basejob.h>
#include <Quotient/settings.h>
class NeoChatRoom;
class NeoChatUser;

View File

@@ -4,8 +4,8 @@
#pragma once
#include <QVector>
#include <events/eventcontent.h>
#include <events/stateevent.h>
#include <Quotient/events/eventcontent.h>
#include <Quotient/events/stateevent.h>
namespace Quotient
{

View File

@@ -3,7 +3,7 @@
#pragma once
#include <events/stateevent.h>
#include <Quotient/events/stateevent.h>
namespace Quotient
{

View File

@@ -3,8 +3,7 @@
#pragma once
#include <events/eventcontent.h>
#include <events/roomevent.h>
#include <Quotient/events/roomevent.h>
namespace Quotient
{

36
src/joinrulesevent.h Normal file
View File

@@ -0,0 +1,36 @@
// SPDX-FileCopyrightText: 2021 Carl Schwan <carl@carlschwan.eu>
// SPDX-License-Identifier: LGPL-2.1-or-later
#pragma once
#include <Quotient/events/stateevent.h>
namespace Quotient
{
#ifdef QUOTIENT_07
class JoinRulesEvent : public StateEvent
#else
class JoinRulesEvent : public StateEventBase
#endif
{
public:
#ifdef QUOTIENT_07
QUO_EVENT(JoinRulesEvent, "m.room.join_rules")
#else
DEFINE_EVENT_TYPEID("m.room.join_rules", JoinRulesEvent)
#endif
explicit JoinRulesEvent(const QJsonObject &obj)
#ifdef QUOTIENT_07
: StateEvent(obj)
#else
: StateEventBase(typeId(), obj)
#endif
{
}
QString joinRule() const;
QJsonArray allow() const;
};
REGISTER_EVENT_TYPE(JoinRulesEvent)
}

View File

@@ -3,8 +3,10 @@
#include "linkpreviewer.h"
#include <connection.h>
#include <csapi/content-repo.h>
#include "controller.h"
#include <Quotient/connection.h>
#include <Quotient/csapi/content-repo.h>
#include "neochatroom.h"

View File

@@ -3,10 +3,9 @@
#include "login.h"
#include <accountregistry.h>
#include <connection.h>
#include <qt_connection_util.h>
#include <Quotient/accountregistry.h>
#include <Quotient/connection.h>
#include <Quotient/qt_connection_util.h>
#include "controller.h"

View File

@@ -28,10 +28,11 @@
#include "neochat-version.h"
#include <accountregistry.h>
#include <networkaccessmanager.h>
#include <room.h>
#include <util.h>
#include <Quotient/keyverificationsession.h>
#include <Quotient/accountregistry.h>
#include <Quotient/networkaccessmanager.h>
#include <Quotient/room.h>
#include <Quotient/util.h>
#include "actionshandler.h"
#include "blurhashimageprovider.h"
@@ -81,7 +82,7 @@
#include "spacehierarchycache.h"
#include "urlhelper.h"
#include "windowcontroller.h"
#include <keyverificationsession.h>
#ifdef HAVE_COLORSCHEME
#include "colorschemer.h"
#endif

View File

@@ -13,7 +13,7 @@
#include <KLocalizedString>
#include "controller.h"
#include <connection.h>
#include <Quotient/connection.h>
using namespace Quotient;

View File

@@ -6,7 +6,7 @@
#include <QQuickAsyncImageProvider>
#include <jobs/mediathumbnailjob.h>
#include <Quotient/jobs/mediathumbnailjob.h>
#include <QReadWriteLock>

View File

@@ -3,7 +3,7 @@
#include "accountemoticonmodel.h"
#include <csapi/content-repo.h>
#include <Quotient/csapi/content-repo.h>
#include <qcoro/qcorosignal.h>
using namespace Quotient;

View File

@@ -4,12 +4,14 @@
#pragma once
#include "events/imagepackevent.h"
#include <QAbstractListModel>
#include <QCoroTask>
#include <QObject>
#include <QPointer>
#include <QVector>
#include <connection.h>
#include <Quotient/connection.h>
class ImagePacksModel;

View File

@@ -6,8 +6,8 @@
#include "controller.h"
#include "neochatroom.h"
#include "roommanager.h"
#include <events/roommemberevent.h>
#include <events/roompowerlevelsevent.h>
#include <Quotient/events/roommemberevent.h>
#include <Quotient/events/roompowerlevelsevent.h>
#include <KLocalizedString>

View File

@@ -5,7 +5,7 @@
#include <KLazyLocalizedString>
#include <QAbstractListModel>
#include <events/roommessageevent.h>
#include <Quotient/events/roommessageevent.h>
class NeoChatRoom;

View File

@@ -9,10 +9,9 @@
#include "controller.h"
#include "emojimodel.h"
#include <connection.h>
#include <csapi/account-data.h>
#include <csapi/content-repo.h>
#include <events/eventcontent.h>
#include <Quotient/connection.h>
#include <Quotient/csapi/account-data.h>
#include <Quotient/csapi/content-repo.h>
using namespace Quotient;

View File

@@ -3,12 +3,13 @@
#include "devicesmodel.h"
#include <csapi/device_management.h>
#include "controller.h"
#include <KLocalizedString>
#include <connection.h>
#include <user.h>
#include <Quotient/csapi/device_management.h>
#include <Quotient/connection.h>
#include <Quotient/user.h>
using namespace Quotient;

View File

@@ -4,9 +4,9 @@
#pragma once
#include <QAbstractListModel>
#include <QPointer>
#include <csapi/definitions/client_device.h>
#include <Quotient/csapi/definitions/client_device.h>
namespace Quotient
{

View File

@@ -0,0 +1,110 @@
// SPDX-FileCopyrightText: 2022 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include "keywordnotificationrulemodel.h"
#include "controller.h"
#include "notificationsmanager.h"
#include <QDebug>
#include <Quotient/connection.h>
#include <Quotient/converters.h>
#include <Quotient/csapi/definitions/push_ruleset.h>
#include <Quotient/csapi/pushrules.h>
#include <Quotient/jobs/basejob.h>
KeywordNotificationRuleModel::KeywordNotificationRuleModel(QObject *parent)
: QAbstractListModel(parent)
{
if (Controller::instance().activeConnection()) {
controllerConnectionChanged();
}
connect(&Controller::instance(), &Controller::activeConnectionChanged, this, &KeywordNotificationRuleModel::controllerConnectionChanged);
}
void KeywordNotificationRuleModel::controllerConnectionChanged()
{
connect(Controller::instance().activeConnection(), &Quotient::Connection::accountDataChanged, this, &KeywordNotificationRuleModel::updateNotificationRules);
updateNotificationRules("m.push_rules");
}
void KeywordNotificationRuleModel::updateNotificationRules(const QString &type)
{
if (type != "m.push_rules") {
return;
}
const QJsonObject ruleDataJson = Controller::instance().activeConnection()->accountDataJson("m.push_rules");
const Quotient::PushRuleset ruleData = Quotient::fromJson<Quotient::PushRuleset>(ruleDataJson["global"].toObject());
const QVector<Quotient::PushRule> contentRules = ruleData.content;
beginResetModel();
m_notificationRules.clear();
for (const auto &i : contentRules) {
if (!m_notificationRules.contains(i.ruleId) && i.ruleId[0] != '.') {
m_notificationRules.append(i.ruleId);
}
}
endResetModel();
}
QVariant KeywordNotificationRuleModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid()) {
return {};
}
if (index.row() >= m_notificationRules.count()) {
qDebug() << "KeywordNotificationRuleModel, something's wrong: index.row() >= m_notificationRules.count()";
return {};
}
if (role == NameRole) {
return m_notificationRules.at(index.row());
}
return {};
}
int KeywordNotificationRuleModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_notificationRules.count();
}
void KeywordNotificationRuleModel::addKeyword(const QString &keyword)
{
if (m_notificationRules.count() == 0) {
NotificationsManager::instance().initializeKeywordNotificationAction();
}
const QVector<QVariant> actions = NotificationsManager::instance().getKeywordNotificationActions();
auto job = Controller::instance()
.activeConnection()
->callApi<Quotient::SetPushRuleJob>("global", "content", keyword, actions, "", "", QVector<Quotient::PushCondition>(), keyword);
connect(job, &Quotient::BaseJob::success, this, [this, keyword]() {
beginInsertRows(QModelIndex(), m_notificationRules.count(), m_notificationRules.count());
m_notificationRules.append(keyword);
endInsertRows();
});
}
void KeywordNotificationRuleModel::removeKeywordAtIndex(int index)
{
auto job = Controller::instance().activeConnection()->callApi<Quotient::DeletePushRuleJob>("global", "content", m_notificationRules[index]);
connect(job, &Quotient::BaseJob::success, this, [this, index]() {
beginRemoveRows(QModelIndex(), index, index);
m_notificationRules.removeAt(index);
endRemoveRows();
if (m_notificationRules.count() == 0) {
NotificationsManager::instance().deactivateKeywordNotificationAction();
}
});
}
QHash<int, QByteArray> KeywordNotificationRuleModel::roleNames() const
{
return {{NameRole, QByteArrayLiteral("name")}};
}

View File

@@ -0,0 +1,66 @@
// SPDX-FileCopyrightText: 2022 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#pragma once
#include <Quotient/csapi/definitions/push_rule.h>
#include <QAbstractListModel>
/**
* @class KeywordNotificationRuleModel
*
* This class defines the model for managing notification push rule keywords.
*/
class KeywordNotificationRuleModel : public QAbstractListModel
{
Q_OBJECT
public:
/**
* @brief Defines the model roles.
*/
enum EventRoles {
NameRole = Qt::DisplayRole, /**< The push rule keyword. */
};
KeywordNotificationRuleModel(QObject *parent = nullptr);
/**
* @brief Get the given role value at the given index.
*
* @sa QAbstractItemModel::data
*/
[[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
/**
* @brief Number of rows in the model.
*
* @sa QAbstractItemModel::rowCount
*/
[[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
/**
* @brief Returns a mapping from Role enum values to role names.
*
* @sa EventRoles, QAbstractItemModel::roleNames()
*/
[[nodiscard]] QHash<int, QByteArray> roleNames() const override;
/**
* @brief Add a new keyword to the model.
*/
Q_INVOKABLE void addKeyword(const QString &keyword);
/**
* @brief Remove a keyword from the model.
*/
Q_INVOKABLE void removeKeywordAtIndex(int index);
private Q_SLOTS:
void controllerConnectionChanged();
void updateNotificationRules(const QString &type);
private:
QList<QString> m_notificationRules;
};

View File

@@ -4,7 +4,7 @@
#include "livelocationsmodel.h"
#include <events/roommessageevent.h>
#include <Quotient/events/roommessageevent.h>
#include <QDebug>

View File

@@ -9,7 +9,7 @@
#include "neochatroom.h"
#include <events/roommessageevent.h>
#include <Quotient/events/roommessageevent.h>
class LocationsModel : public QAbstractListModel
{

View File

@@ -3,7 +3,7 @@
#include "mediamessagefiltermodel.h"
#include "models/messageeventmodel.h"
#include <room.h>
#include <Quotient/room.h>
MediaMessageFilterModel::MediaMessageFilterModel(QObject *parent)
: QSortFilterProxyModel(parent)

View File

@@ -5,17 +5,18 @@
#include "messageeventmodel_logging.h"
#include "neochatconfig.h"
#include <connection.h>
#include <events/reactionevent.h>
#include <events/redactionevent.h>
#include <events/roomavatarevent.h>
#include <events/roommemberevent.h>
#include <events/simplestateevents.h>
#include <qt_connection_util.h>
#include <user.h>
#include <Quotient/connection.h>
#include <Quotient/csapi/rooms.h>
#include <Quotient/events/reactionevent.h>
#include <Quotient/events/redactionevent.h>
#include <Quotient/events/roomavatarevent.h>
#include <Quotient/events/roommemberevent.h>
#include <Quotient/events/simplestateevents.h>
#include <Quotient/user.h>
#include "events/pollevent.h"
#include "events/stickerevent.h"
#include <Quotient/events/stickerevent.h>
#include <QDebug>
#include <QGuiApplication>

View File

@@ -3,7 +3,7 @@
#include "publicroomlistmodel.h"
#include <connection.h>
#include <Quotient/connection.h>
using namespace Quotient;

View File

@@ -6,7 +6,7 @@
#include <QAbstractListModel>
#include <QObject>
#include <csapi/list_public_rooms.h>
#include <Quotient/csapi/list_public_rooms.h>
namespace Quotient
{

View File

@@ -5,12 +5,11 @@
#include <QDebug>
#include <connection.h>
#include <converters.h>
#include <csapi/definitions/push_ruleset.h>
#include <csapi/pushrules.h>
#include <jobs/basejob.h>
#include <qobjectdefs.h>
#include <Quotient/connection.h>
#include <Quotient/converters.h>
#include <Quotient/csapi/definitions/push_ruleset.h>
#include <Quotient/csapi/pushrules.h>
#include <Quotient/jobs/basejob.h>
#include "controller.h"
#include "neochatconfig.h"

View File

@@ -5,7 +5,7 @@
#include <QAbstractListModel>
#include <csapi/definitions/push_rule.h>
#include <Quotient/csapi/definitions/push_rule.h>
#include "notificationsmanager.h"

View File

@@ -8,7 +8,8 @@
#include "neochatroom.h"
#include "roommanager.h"
#include "spacehierarchycache.h"
#include "user.h"
#include <Quotient/user.h>
#include <QDebug>
#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0)

View File

@@ -3,7 +3,7 @@
#pragma once
#include <events/roomevent.h>
#include <Quotient/events/roomevent.h>
#include <QAbstractListModel>

View File

@@ -2,12 +2,16 @@
// SPDX-License-Identifier: LGPL-2.0-or-later
#include "searchmodel.h"
#include "events/stickerevent.h"
#include "messageeventmodel.h"
#include "neochatroom.h"
#include "neochatuser.h"
#include <Quotient/events/stickerevent.h>
#include <KLocalizedString>
#include <connection.h>
#include <Quotient/connection.h>
#include <Quotient/csapi/search.h>
using namespace Quotient;

View File

@@ -6,7 +6,7 @@
#include <QAbstractListModel>
#include <QString>
#include <csapi/search.h>
#include <Quotient/csapi/search.h>
namespace Quotient
{

View File

@@ -5,7 +5,7 @@
#include "controller.h"
#include <connection.h>
#include <Quotient/connection.h>
#include <QDebug>

View File

@@ -3,7 +3,7 @@
#pragma once
#include <csapi/list_public_rooms.h>
#include <Quotient/csapi/list_public_rooms.h>
#include <QAbstractListModel>
#include <QPointer>

View File

@@ -3,8 +3,8 @@
#include "userdirectorylistmodel.h"
#include <connection.h>
#include <room.h>
#include <Quotient/connection.h>
#include <Quotient/room.h>
using namespace Quotient;

View File

@@ -6,7 +6,7 @@
#include <QAbstractListModel>
#include <QObject>
#include <csapi/users.h>
#include <Quotient/csapi/users.h>
namespace Quotient
{

View File

@@ -3,8 +3,8 @@
#include "userlistmodel.h"
#include <connection.h>
#include <events/roompowerlevelsevent.h>
#include <Quotient/connection.h>
#include <Quotient/events/roompowerlevelsevent.h>
#include "neochatroom.h"

View File

@@ -3,6 +3,8 @@
#pragma once
#include <Quotient/room.h>
#include <QAbstractListModel>
#include <QObject>
#include <QPointer>

View File

@@ -12,35 +12,33 @@
#include <QMediaMetaData>
#include <QMediaPlayer>
#include <jobs/basejob.h>
#include <Quotient/jobs/basejob.h>
#include <qcoro/qcorosignal.h>
#include <connection.h>
#include <csapi/account-data.h>
#include <csapi/directory.h>
#include <csapi/event_context.h>
#include <csapi/pushrules.h>
#include <csapi/redaction.h>
#include <csapi/report_content.h>
#include <csapi/room_state.h>
#include <csapi/rooms.h>
#include <csapi/typing.h>
#include <events/encryptionevent.h>
#include <events/reactionevent.h>
#include <events/redactionevent.h>
#include <events/roomavatarevent.h>
#include <events/roomcanonicalaliasevent.h>
#include <events/roommemberevent.h>
#include <events/roompowerlevelsevent.h>
#include <events/simplestateevents.h>
#include <jobs/downloadfilejob.h>
#include <qt_connection_util.h>
#include <Quotient/connection.h>
#include <Quotient/csapi/account-data.h>
#include <Quotient/csapi/directory.h>
#include <Quotient/csapi/pushrules.h>
#include <Quotient/csapi/redaction.h>
#include <Quotient/csapi/report_content.h>
#include <Quotient/csapi/room_state.h>
#include <Quotient/csapi/rooms.h>
#include <Quotient/csapi/typing.h>
#include <Quotient/events/encryptionevent.h>
#include <Quotient/events/reactionevent.h>
#include <Quotient/events/redactionevent.h>
#include <Quotient/events/roomavatarevent.h>
#include <Quotient/events/roomcanonicalaliasevent.h>
#include <Quotient/events/roommemberevent.h>
#include <Quotient/events/roompowerlevelsevent.h>
#include <Quotient/events/simplestateevents.h>
#include <Quotient/events/stickerevent.h>
#include <Quotient/jobs/downloadfilejob.h>
#include <Quotient/qt_connection_util.h>
#include "controller.h"
#include "events/joinrulesevent.h"
#include "events/pollevent.h"
#include "events/stickerevent.h"
#include "filetransferpseudojob.h"
#include "neochatconfig.h"
#include "notificationsmanager.h"

View File

@@ -3,8 +3,7 @@
#pragma once
#include <qobjectdefs.h>
#include <room.h>
#include <Quotient/room.h>
#include <QCache>
#include <QObject>

View File

@@ -7,7 +7,7 @@
#include <QJsonObject>
#include <QPalette>
#include <connection.h>
#include <Quotient/connection.h>
using namespace Quotient;

View File

@@ -5,7 +5,7 @@
#include <QObject>
#include <user.h>
#include <Quotient/user.h>
/**
* @class NeoChatUser

View File

@@ -11,11 +11,11 @@
#include <KNotification>
#include <KNotificationReplyAction>
#include <accountregistry.h>
#include <connection.h>
#include <csapi/pushrules.h>
#include <user.h>
#include <Quotient/accountregistry.h>
#include <Quotient/connection.h>
#include <Quotient/csapi/pushrules.h>
#include <Quotient/jobs/basejob.h>
#include <Quotient/user.h>
#include "controller.h"
#include "neochatconfig.h"

View File

@@ -9,8 +9,8 @@
#include <QObject>
#include <QPointer>
#include <QString>
#include <csapi/notifications.h>
#include <jobs/basejob.h>
#include <Quotient/csapi/notifications.h>
#include <Quotient/jobs/basejob.h>
namespace Quotient
{

View File

@@ -2,12 +2,15 @@
// SPDX-License-Identifier: LGPL-2.0-or-later
#include "pollhandler.h"
#include "events/pollevent.h"
#include "neochatroom.h"
#include <Quotient/csapi/relations.h>
#include <Quotient/events/roompowerlevelsevent.h>
#include <Quotient/user.h>
#include <algorithm>
#include <csapi/relations.h>
#include <events/roompowerlevelsevent.h>
#include <user.h>
using namespace Quotient;

View File

@@ -3,6 +3,7 @@
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include "roommanager.h"
#include "controller.h"
#include "neochatconfig.h"
#include "neochatroom.h"
@@ -10,10 +11,11 @@
#include <QDesktopServices>
#include <QQuickTextDocument>
#include <QStandardPaths>
#include <csapi/joining.h>
#include <csapi/knocking.h>
#include <qt_connection_util.h>
#include <user.h>
#include <Quotient/csapi/joining.h>
#include <Quotient/csapi/knocking.h>
#include <Quotient/qt_connection_util.h>
#include <Quotient/user.h>
#ifndef Q_OS_ANDROID
#include <KIO/OpenUrlJob>

View File

@@ -6,7 +6,7 @@
#include <KConfig>
#include <KConfigGroup>
#include <QObject>
#include <uriresolver.h>
#include <Quotient/uriresolver.h>
#include "chatdocumenthandler.h"

View File

@@ -3,8 +3,8 @@
#include "spacehierarchycache.h"
#include <csapi/space_hierarchy.h>
#include <qt_connection_util.h>
#include <Quotient/csapi/space_hierarchy.h>
#include <Quotient/qt_connection_util.h>
#include "controller.h"
#include "neochatroom.h"

43
src/stickerevent.h Normal file
View File

@@ -0,0 +1,43 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carlschwan@kde.org>
// SPDX-License-Identifier: LGPL-2.1-or-later
#pragma once
#include <Quotient/events/eventcontent.h>
#include <Quotient/events/roomevent.h>
namespace Quotient
{
/// Sticker messages are specialised image messages that are displayed without
/// controls (e.g. no "download" link, or light-box view on click, as would be
/// displayed for for m.image events).
class StickerEvent : public RoomEvent
{
public:
#ifdef QUOTIENT_07
QUO_EVENT(StickerEvent, "m.sticker")
#else
DEFINE_EVENT_TYPEID("m.sticker", StickerEvent)
#endif
explicit StickerEvent(const QJsonObject &obj);
/// \brief A textual representation or associated description of the
/// sticker image.
///
/// This could be the alt text of the original image, or a message to
/// accompany and further describe the sticker.
QString body() const;
/// \brief Metadata about the image referred to in url including a
/// thumbnail representation.
const EventContent::ImageContent &image() const;
/// \brief The URL to the sticker image. This must be a valid mxc:// URI.
QUrl url() const;
private:
EventContent::ImageContent m_imageContent;
};
REGISTER_EVENT_TYPE(StickerEvent)
}

View File

@@ -5,10 +5,11 @@
#include <QDebug>
#include <QUrl>
#include <QStringLiteral>
#include <events/roommessageevent.h>
#include <util.h>
#include <Quotient/events/roommessageevent.h>
#include <Quotient/util.h>
#include <qstringliteral.h>
#include <cmark.h>