Properly register image pack types

This commit is contained in:
Nicolas Werner 2023-06-19 19:54:58 +02:00
parent b15d889da0
commit 08d5980d40
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 9 additions and 2 deletions

View file

@ -8,10 +8,14 @@
#include <QQmlEngine>
#include <QSharedPointer>
class SingleImagePackModel;
class ImagePackListModel final : public QAbstractListModel
#include "SingleImagePackModel.h"
class ImagePackListModel : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("")
Q_PROPERTY(bool containsAccountPack READ containsAccountPack CONSTANT)
public:
enum Roles

View file

@ -6,6 +6,7 @@
#include <QAbstractListModel>
#include <QList>
#include <QQmlEngine>
#include <QUrl>
#include <mtx/events/mscs/image_packs.hpp>
@ -15,6 +16,8 @@
class SingleImagePackModel final : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("")
Q_PROPERTY(QString roomid READ roomid CONSTANT)
Q_PROPERTY(bool fromSpace READ fromSpace CONSTANT)