From 08d5980d40e8b17764e118f30c88b346b71d1cb9 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 19 Jun 2023 19:54:58 +0200 Subject: [PATCH] Properly register image pack types --- src/ImagePackListModel.h | 8 ++++++-- src/SingleImagePackModel.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ImagePackListModel.h b/src/ImagePackListModel.h index 435c3902..f2c718b4 100644 --- a/src/ImagePackListModel.h +++ b/src/ImagePackListModel.h @@ -8,10 +8,14 @@ #include #include -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 diff --git a/src/SingleImagePackModel.h b/src/SingleImagePackModel.h index 595f5a78..e1ab98fb 100644 --- a/src/SingleImagePackModel.h +++ b/src/SingleImagePackModel.h @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -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)