summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-06-19 20:30:27 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-06-19 20:30:27 +0200
commit0278c9d5fb57c9aa703ab10361fdb17186b2ddd1 (patch)
tree04cf9c1e6d52732c096e69d0da8bdf40ecb53c32 /src
parentTry to fix notarization path (diff)
downloadnheko-0278c9d5fb57c9aa703ab10361fdb17186b2ddd1.tar.xz
Fix UserSettingsModel and Communities singleton instantiation
Diffstat (limited to 'src')
-rw-r--r--src/InviteesModel.h3
-rw-r--r--src/MemberList.h3
-rw-r--r--src/UserSettingsPage.h1
-rw-r--r--src/timeline/CommunitiesModel.h2
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 *)
     {