4 files changed, 8 insertions, 1 deletions
diff --git a/src/InviteesModel.h b/src/InviteesModel.h
index 3f417bd1..b9b4b862 100644
--- a/src/InviteesModel.h
+++ b/src/InviteesModel.h
@@ -6,6 +6,7 @@
#define INVITEESMODEL_H
#include <QAbstractListModel>
+#include <QQmlEngine>
#include <QVector>
#include "timeline/TimelineModel.h"
@@ -34,6 +35,8 @@ private:
class InviteesModel final : public QAbstractListModel
{
Q_OBJECT
+ QML_ELEMENT
+ QML_UNCREATABLE("")
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
Q_PROPERTY(TimelineModel *room READ room CONSTANT)
diff --git a/src/MemberList.h b/src/MemberList.h
index ceaa9c14..f1d39336 100644
--- a/src/MemberList.h
+++ b/src/MemberList.h
@@ -5,6 +5,7 @@
#pragma once
#include <QAbstractListModel>
+#include <QQmlEngine>
#include <QSortFilterProxyModel>
#include <mtx/events/power_levels.hpp>
@@ -79,6 +80,8 @@ private:
class MemberList final : public QSortFilterProxyModel
{
Q_OBJECT
+ QML_ELEMENT
+ QML_UNCREATABLE("")
Q_PROPERTY(QString roomName READ roomName NOTIFY roomNameChanged)
Q_PROPERTY(int memberCount READ memberCount NOTIFY memberCountChanged)
diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h
index 301a1b67..34dae2ea 100644
--- a/src/UserSettingsPage.h
+++ b/src/UserSettingsPage.h
@@ -456,6 +456,7 @@ class UserSettingsModel : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
+ QML_SINGLETON
enum Indices
{
diff --git a/src/timeline/CommunitiesModel.h b/src/timeline/CommunitiesModel.h
index d0841f4b..7af6d050 100644
--- a/src/timeline/CommunitiesModel.h
+++ b/src/timeline/CommunitiesModel.h
@@ -154,7 +154,7 @@ public:
void restoreCollapsed();
};
- CommunitiesModel(QObject *parent = nullptr);
+ CommunitiesModel(QObject *parent);
static CommunitiesModel *create(QQmlEngine *qmlEngine, QJSEngine *)
{
|