Fix UserSettingsModel and Communities singleton instantiation

pull/1500/head
Nicolas Werner 1 year ago
parent dd7b627e3d
commit 0278c9d5fb
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 3
      src/InviteesModel.h
  2. 3
      src/MemberList.h
  3. 1
      src/UserSettingsPage.h
  4. 2
      src/timeline/CommunitiesModel.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)

@ -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…
Cancel
Save