dcDownloadRequest(): declare as const and set m_finished = true;

This commit is contained in:
Gerhard Hoffmann 2023-12-08 12:55:10 +01:00
parent 9e5c379e8a
commit 631550b55e

View File

@ -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;
}