From 670aa4627e86099629926e812b260cda17ba3167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Wed, 3 Jul 2024 13:31:26 +0200 Subject: [PATCH] StatusQ: Workaround for QTBUG-86428 Registration of QAbstractItemModel* allows to nest submodels, e.g: SortFitlerProxyModel { sourceModel: LeftJoinModel { ... } } Earlier, it would cause error: > Cannot assign to property of unknown type "QAbstractItemModel*" --- ui/StatusQ/src/plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/StatusQ/src/plugin.cpp b/ui/StatusQ/src/plugin.cpp index d6d314fe08..f1bb6005cb 100644 --- a/ui/StatusQ/src/plugin.cpp +++ b/ui/StatusQ/src/plugin.cpp @@ -75,6 +75,9 @@ public: qmlRegisterUncreatableType("StatusQ", 0, 1, "ModelCount", "This is attached type, cannot be created directly."); + // Workaround for https://bugreports.qt.io/browse/QTBUG-86428 + qmlRegisterAnonymousType("StatusQ", 1); + qmlRegisterSingletonType( "StatusQ.Internal", 0, 1, "ModelUtils", &ModelUtilsInternal::qmlInstance);