aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/ProxyConnectionTestTask.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-16 03:49:50 +0000
committersaturneric <[email protected]>2024-01-16 03:49:50 +0000
commit4994f4eaa1211d402b791660ad6221154a4c2405 (patch)
treec3f0cdc0008849de79c6bd8030c0c65c5d02f9f3 /src/ui/thread/ProxyConnectionTestTask.cpp
parentfix: slove a heap-use-after-free problem (diff)
downloadGpgFrontend-4994f4eaa1211d402b791660ad6221154a4c2405.tar.gz
GpgFrontend-4994f4eaa1211d402b791660ad6221154a4c2405.zip
fix: make task and threading system safer
Diffstat (limited to '')
-rw-r--r--src/ui/thread/ProxyConnectionTestTask.cpp3
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(