From 4994f4eaa1211d402b791660ad6221154a4c2405 Mon Sep 17 00:00:00 2001 From: saturneric Date: Tue, 16 Jan 2024 11:49:50 +0800 Subject: fix: make task and threading system safer --- src/ui/thread/ProxyConnectionTestTask.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui/thread/ProxyConnectionTestTask.cpp') diff --git a/src/ui/thread/ProxyConnectionTestTask.cpp b/src/ui/thread/ProxyConnectionTestTask.cpp index 5929c9d1..6b0993fe 100644 --- a/src/ui/thread/ProxyConnectionTestTask.cpp +++ b/src/ui/thread/ProxyConnectionTestTask.cpp @@ -39,7 +39,7 @@ GpgFrontend::UI::ProxyConnectionTestTask::ProxyConnectionTestTask(QString url, HoldOnLifeCycle(true); } -void GpgFrontend::UI::ProxyConnectionTestTask::Run() { +auto GpgFrontend::UI::ProxyConnectionTestTask::Run() -> int { auto* network_reply = network_manager_->get(QNetworkRequest{url_}); auto* timer = new QTimer(this); @@ -59,6 +59,7 @@ void GpgFrontend::UI::ProxyConnectionTestTask::Run() { }); timer->start(timeout_); + return 0; } void GpgFrontend::UI::ProxyConnectionTestTask::slot_process_network_reply( -- cgit v1.2.3