aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/ListedKeyServerTestTask.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-18 14:45:33 +0000
committersaturneric <[email protected]>2023-10-18 14:45:33 +0000
commit70196cf01757824a578e4d9c49a210bf136de266 (patch)
treee058a59c6289b2a3872222c8822bae393cb7c213 /src/ui/thread/ListedKeyServerTestTask.cpp
parentfix: solve build issues on macOS (diff)
downloadGpgFrontend-70196cf01757824a578e4d9c49a210bf136de266.tar.gz
GpgFrontend-70196cf01757824a578e4d9c49a210bf136de266.zip
feat: using pool for concurrent executions, not stable yet
Diffstat (limited to 'src/ui/thread/ListedKeyServerTestTask.cpp')
-rw-r--r--src/ui/thread/ListedKeyServerTestTask.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/thread/ListedKeyServerTestTask.cpp b/src/ui/thread/ListedKeyServerTestTask.cpp
index f02d3ce1..38495f55 100644
--- a/src/ui/thread/ListedKeyServerTestTask.cpp
+++ b/src/ui/thread/ListedKeyServerTestTask.cpp
@@ -38,13 +38,12 @@ GpgFrontend::UI::ListedKeyServerTestTask::ListedKeyServerTestTask(
timeout_(timeout),
network_manager_(new QNetworkAccessManager(this)),
result_(urls_.size(), kTestResultType_Error) {
+ HoldOnLifeCycle(true);
qRegisterMetaType<std::vector<KeyServerTestResultType>>(
"std::vector<KeyServerTestResultType>");
}
void GpgFrontend::UI::ListedKeyServerTestTask::run() {
- HoldOnLifeCycle(true);
-
size_t index = 0;
for (const auto& url : urls_) {
auto key_url = QUrl{url};
@@ -87,6 +86,6 @@ void GpgFrontend::UI::ListedKeyServerTestTask::slot_process_network_reply(
if (++result_count_ == urls_.size()) {
emit SignalKeyServerListTestResult(result_);
- emit SignalTaskRunnableEnd(0);
+ emit SignalTaskShouldEnd(0);
}
}