From 631550b55e961d6987d71713ce42cba947f2a98a Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 8 Dec 2023 12:55:10 +0100 Subject: [PATCH] dcDownloadRequest(): declare as const and set m_finished = true; --- src/hwapi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hwapi.cpp b/src/hwapi.cpp index e7a15a5..ae91e1c 100644 --- a/src/hwapi.cpp +++ b/src/hwapi.cpp @@ -4381,7 +4381,7 @@ QObject const *hwapi::getAPI() { return this; } -bool hwapi::dcDownloadRequest(QString const &dcFileToDownload) { +bool hwapi::dcDownloadRequest(QString const &dcFileToDownload) const { SharedMem *data = SharedMem::getData(); if (!data) { return false; @@ -4398,8 +4398,8 @@ bool hwapi::dcDownloadRequest(QString const &dcFileToDownload) { data->m_downLoadDC.m_currentblockNumber = 0; data->m_downLoadDC.m_requested = true; - data->m_downLoadDC.m_running = false; - data->m_downLoadDC.m_finished = false; + data->m_downLoadDC.m_running = false; // download thread is not running + data->m_downLoadDC.m_finished = true; return true; }