From 878eb48cb0ddedf12afc08c33e35c6a5d32265bf Mon Sep 17 00:00:00 2001 From: James Graham Date: Sun, 31 Mar 2024 17:49:35 +0000 Subject: [PATCH] Shut qt up about models passed to QML Shutup qt about below ``` SortFilterRoomListModel is neither a QObject, nor default- and copy-constructible, nor uncreatable. You should not use it as a QML type. SortFilterRoomTreeModel is neither a QObject, nor default- and copy-constructible, nor uncreatable. You should not use it as a QML type. SortFilterSpaceListModel is neither a QObject, nor default- and copy-constructible, nor uncreatable. You should not use it as a QML type. ``` --- src/models/sortfilterroomlistmodel.h | 1 + src/models/sortfilterroomtreemodel.h | 1 + src/models/sortfilterspacelistmodel.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/models/sortfilterroomlistmodel.h b/src/models/sortfilterroomlistmodel.h index 5fd19af52..7e86b1f4c 100644 --- a/src/models/sortfilterroomlistmodel.h +++ b/src/models/sortfilterroomlistmodel.h @@ -31,6 +31,7 @@ class SortFilterRoomListModel : public QSortFilterProxyModel { Q_OBJECT QML_ELEMENT + QML_UNCREATABLE("") /** * @brief The text to use to filter room names. diff --git a/src/models/sortfilterroomtreemodel.h b/src/models/sortfilterroomtreemodel.h index bad34f213..827c5993b 100644 --- a/src/models/sortfilterroomtreemodel.h +++ b/src/models/sortfilterroomtreemodel.h @@ -32,6 +32,7 @@ class SortFilterRoomTreeModel : public QSortFilterProxyModel { Q_OBJECT QML_ELEMENT + QML_UNCREATABLE("") /** * @brief The text to use to filter room names. diff --git a/src/models/sortfilterspacelistmodel.h b/src/models/sortfilterspacelistmodel.h index 94c2275de..025777d10 100644 --- a/src/models/sortfilterspacelistmodel.h +++ b/src/models/sortfilterspacelistmodel.h @@ -20,6 +20,7 @@ class SortFilterSpaceListModel : public QSortFilterProxyModel { Q_OBJECT QML_ELEMENT + QML_UNCREATABLE("") /** * @brief The number of spaces in the model.