Make singletons owned by the C++ side

This commit is contained in:
Tobias Fella
2023-10-01 19:07:10 +02:00
parent 541350e678
commit d4cb27eca4
7 changed files with 15 additions and 7 deletions

View File

@@ -59,8 +59,9 @@ class NotificationsManager : public QObject
public:
static NotificationsManager &instance();
static NotificationsManager *create(QQmlEngine *, QJSEngine *)
static NotificationsManager *create(QQmlEngine *engine, QJSEngine *)
{
engine->setObjectOwnership(&instance(), QQmlEngine::CppOwnership);
return &instance();
}