From 865dd130da250d91c8093b2464374f31b2d5b475 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Fri, 1 Dec 2023 14:46:37 +0100 Subject: [PATCH] Get rid of the pesky _exit call --- src/RunGui.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/RunGui.cpp b/src/RunGui.cpp index 62f1d6a43..19ac9413c 100644 --- a/src/RunGui.cpp +++ b/src/RunGui.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #ifdef USEWINSDK @@ -244,7 +245,8 @@ void runGui(QApplication &a, Paths &paths, Settings &settings) restartOnSignal = value; }); - auto thread = std::thread([dir = paths.miscDirectory] { + auto thread = std::jthread([dir = paths.miscDirectory] { +#ifdef Q_OS_WIN32 { auto path = combinePath(dir, "Update.exe"); if (QFile::exists(path)) @@ -259,6 +261,7 @@ void runGui(QApplication &a, Paths &paths, Settings &settings) QFile::remove(path); } } +#endif }); // Clear the cache 1 minute after start. @@ -314,7 +317,5 @@ void runGui(QApplication &a, Paths &paths, Settings &settings) // flushing windows clipboard to keep copied messages flushClipboard(); #endif - - _exit(0); } } // namespace chatterino