diff options
author | saturneric <[email protected]> | 2024-01-16 03:49:50 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-16 03:49:50 +0000 |
commit | 4994f4eaa1211d402b791660ad6221154a4c2405 (patch) | |
tree | c3f0cdc0008849de79c6bd8030c0c65c5d02f9f3 /src/ui/thread/ProxyConnectionTestTask.cpp | |
parent | fix: slove a heap-use-after-free problem (diff) | |
download | GpgFrontend-4994f4eaa1211d402b791660ad6221154a4c2405.tar.gz GpgFrontend-4994f4eaa1211d402b791660ad6221154a4c2405.zip |
fix: make task and threading system safer
Diffstat (limited to 'src/ui/thread/ProxyConnectionTestTask.cpp')
-rw-r--r-- | src/ui/thread/ProxyConnectionTestTask.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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( |