aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/KeyServerImportTask.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/KeyServerImportTask.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 'src/ui/thread/KeyServerImportTask.cpp')
-rw-r--r--src/ui/thread/KeyServerImportTask.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/thread/KeyServerImportTask.cpp b/src/ui/thread/KeyServerImportTask.cpp
index cf5c6263..89f0f45a 100644
--- a/src/ui/thread/KeyServerImportTask.cpp
+++ b/src/ui/thread/KeyServerImportTask.cpp
@@ -48,7 +48,7 @@ GpgFrontend::UI::KeyServerImportTask::KeyServerImportTask(
}
}
-void GpgFrontend::UI::KeyServerImportTask::Run() {
+auto GpgFrontend::UI::KeyServerImportTask::Run() -> int {
QUrl const keyserver_url = QUrl(keyserver_url_);
for (const auto& key_id : keyids_) {
QUrl const req_url(keyserver_url.scheme() + "://" + keyserver_url.host() +
@@ -58,6 +58,7 @@ void GpgFrontend::UI::KeyServerImportTask::Run() {
connect(reply_, &QNetworkReply::finished, this,
&KeyServerImportTask::dealing_reply_from_server);
}
+ return 0;
}
void GpgFrontend::UI::KeyServerImportTask::dealing_reply_from_server() {