1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From e45437266c7930190373f20edf4640c1efe98011 Mon Sep 17 00:00:00 2001
From: Alfred Neumayer <dev.beidl@gmail.com>
Date: Tue, 22 Jul 2025 08:56:08 +0200
Subject: [PATCH] src: Fix Quits & Exits from QML
Exit out of the process with the respective exit code.
---
src/LomiriApplication.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/src/LomiriApplication.cpp
+++ b/src/LomiriApplication.cpp
@@ -135,5 +135,12 @@
m_qmlEngine->setNetworkAccessManagerFactory(new CachingNetworkManagerFactory);
- QObject::connect(m_qmlEngine, &QQmlEngine::quit, this, &QGuiApplication::quit);
+ QObject::connect(m_qmlEngine, &QQmlEngine::quit, this, [=](){
+ qDebug().nospace().noquote() << "Quitting Lomiri... Bye!";
+ ::exit(0);
+ });
+ QObject::connect(m_qmlEngine, &QQmlEngine::exit, this, [=](int ret){
+ qDebug().nospace().noquote() << "Exiting Lomiri... Bye!";
+ ::exit(ret);
+ });
}
|