From 0e2bd79b8d4fb33bd78265870648f6dca0f24048 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Date: Mon, 7 Nov 2022 00:11:32 -0500
Subject: [PATCH] app: qmlregister: Revert signature of registerTypes to fix
 unit tests.

This reverts an (inadvertent?) change made in 70a6972b7 which would
fail the compilation of the tests.

* src/app/qmlregister.h (registerTypes): Change parent type from
MainApplication* to QObject*
* src/app/qmlregister.cpp (registerTypes): Likewise.

Change-Id: I1ef0aff38fcc9e07192d505614ebf9e2aa023921
---
 src/app/qmlregister.cpp | 2 +-
 src/app/qmlregister.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/app/qmlregister.cpp b/src/app/qmlregister.cpp
index 6b8e2237a..bf9edc0ca 100644
--- a/src/app/qmlregister.cpp
+++ b/src/app/qmlregister.cpp
@@ -106,7 +106,7 @@ registerTypes(QQmlEngine* engine,
               AppSettingsManager* settingsManager,
               PreviewEngine* previewEngine,
               ScreenInfo* screenInfo,
-              MainApplication* parent)
+              QObject* parent)
 {
     // setup the adapters (their lifetimes are that of MainApplication)
     auto callAdapter = new CallAdapter(systemTray, lrcInstance, parent);
diff --git a/src/app/qmlregister.h b/src/app/qmlregister.h
index 38bfd091e..aac0a8874 100644
--- a/src/app/qmlregister.h
+++ b/src/app/qmlregister.h
@@ -67,5 +67,5 @@ void registerTypes(QQmlEngine* engine,
                    AppSettingsManager* appSettingsManager,
                    PreviewEngine* previewEngine,
                    ScreenInfo* screenInfo,
-                   MainApplication* parent);
+                   QObject* parent);
 }
-- 
GitLab