From ce4ff084ccc5c35d91057f369bca1e5a99da3fa2 Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 27 Oct 2026 19:47:02 +0100 Subject: [PATCH] Target transfer allocation faults after the file dialog closes --- tools/chatgui/tests/test_member_files_lifecycle.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/chatgui/tests/test_member_files_lifecycle.cpp b/tools/chatgui/tests/test_member_files_lifecycle.cpp index 78be7655..875cde9f 100644 --- a/tools/chatgui/tests/test_member_files_lifecycle.cpp +++ b/tools/chatgui/tests/test_member_files_lifecycle.cpp @@ -5,12 +5,15 @@ #include "../db/db_manager.h" #include #include +#include +#include #include #include #include #include #include #include +#include extern "C" { #include "utun_instance.h" #include "chat/chat_core.h" @@ -310,10 +313,11 @@ private slots: auto* dialog = qobject_cast(QApplication::activeModalWidget()); if (!dialog) return; dialog->selectFile(destination); accepted = QMetaObject::invokeMethod(dialog, "accept"); - }); #ifdef UTUN_TEST_FILE_ALLOC_FAILURES - failAllocation = failure; + // Включить отказ после выбора пути, чтобы QUOTA-таймер внутри диалога не перехватил инъекцию. + failAllocation = failure; #endif + }); download->click(); QVERIFY(accepted); if (!failure) { QVERIFY(cancel->isEnabled()); QVERIFY(!tree->isEnabled());