File: 0031_faster-session-exit.patch

package info (click to toggle)
lomiri 0.5.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,088 kB
  • sloc: cpp: 39,498; python: 2,559; javascript: 1,426; ansic: 1,012; sh: 289; xml: 252; makefile: 69
file content (26 lines) | stat: -rw-r--r-- 949 bytes parent folder | download
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);
+    });
 }