From fe06cd63ac0c07cc833abb20d5b63e3ffdd12d48 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 9 Apr 2024 19:16:00 +0400 Subject: [PATCH] Lock event loop --- Telegram/SourceFiles/core/sandbox.cpp | 1 - Telegram/SourceFiles/core/sandbox.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 6feacdb5bd9686..3daf9178416b0c 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -82,7 +82,6 @@ bool Sandbox::QuitOnStartRequested = false; Sandbox::Sandbox(int &argc, char **argv) : QApplication(argc, argv) , _mainThreadId(QThread::currentThreadId()) { - setQuitOnLastWindowClosed(false); } int Sandbox::start() { diff --git a/Telegram/SourceFiles/core/sandbox.h b/Telegram/SourceFiles/core/sandbox.h index 4c15c2828bfe16..dfb1fe4a637d89 100644 --- a/Telegram/SourceFiles/core/sandbox.h +++ b/Telegram/SourceFiles/core/sandbox.h @@ -107,6 +107,7 @@ class Sandbox final void readClients(); void removeClients(); + QEventLoopLocker _eventLoopLocker; const Qt::HANDLE _mainThreadId = nullptr; int _eventNestingLevel = 0; int _loopNestingLevel = 0;