diff options
author | Saturneric <[email protected]> | 2023-01-07 14:20:07 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-01-07 14:20:07 +0000 |
commit | 225d435423888c38e0c75f63c1d7a41283839bd5 (patch) | |
tree | 4c575375dde858e9391e585f9bf47d65090c70cc /src/core/thread/TaskRunner.cpp | |
parent | fix: continue to solve ubuntu 18.04 build issues (diff) | |
download | GpgFrontend-225d435423888c38e0c75f63c1d7a41283839bd5.tar.gz GpgFrontend-225d435423888c38e0c75f63c1d7a41283839bd5.zip |
feat: add advanced gnupg operations
1.fix some issues
2. add advanced gnupg operations
3. add configurations information in Gnupg Help Tab
Diffstat (limited to 'src/core/thread/TaskRunner.cpp')
-rw-r--r-- | src/core/thread/TaskRunner.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/thread/TaskRunner.cpp b/src/core/thread/TaskRunner.cpp index f70b2d4c..ffbeb495 100644 --- a/src/core/thread/TaskRunner.cpp +++ b/src/core/thread/TaskRunner.cpp @@ -36,10 +36,11 @@ GpgFrontend::Thread::TaskRunner::TaskRunner() = default; GpgFrontend::Thread::TaskRunner::~TaskRunner() = default; void GpgFrontend::Thread::TaskRunner::PostTask(Task* task) { + if (task == nullptr) return; + std::string uuid = task->GetUUID(); LOG(TRACE) << "Post Task" << uuid; - if (task == nullptr) return; task->setParent(nullptr); task->moveToThread(this); @@ -59,7 +60,7 @@ void GpgFrontend::Thread::TaskRunner::PostTask(Task* task) { quit(); } -void GpgFrontend::Thread::TaskRunner::run() { +[[noreturn]] void GpgFrontend::Thread::TaskRunner::run() { LOG(TRACE) << "called" << "thread id:" << QThread::currentThreadId(); while (true) { @@ -91,7 +92,7 @@ void GpgFrontend::Thread::TaskRunner::run() { task->deleteLater(); pending_tasks_.erase(task->GetUUID()); } catch (...) { - LOG(ERROR) << "TaskRunner: Unknwon Exception in Task" + LOG(ERROR) << "TaskRunner: Unknown Exception in Task" << task->GetUUID(); // destroy the task, remove the task from the pending tasks |