Fix UserSettingsModel and Communities singleton instantiation
This commit is contained in:
parent
dd7b627e3d
commit
0278c9d5fb
@ -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 *)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user