Skip to content
Snippets Groups Projects
Verified Commit 0278c9d5 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix UserSettingsModel and Communities singleton instantiation

parent dd7b627e
No related branches found
No related tags found
No related merge requests found
Pipeline #4929 failed
......@@ -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)
......
......@@ -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)
......
......@@ -456,6 +456,7 @@ class UserSettingsModel : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
enum Indices
{
......
......@@ -154,7 +154,7 @@ public:
void restoreCollapsed();
};
CommunitiesModel(QObject *parent = nullptr);
CommunitiesModel(QObject *parent);
static CommunitiesModel *create(QQmlEngine *qmlEngine, QJSEngine *)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment