diff --git a/src/contentmanager.cpp b/src/contentmanager.cpp index ff1267e..d046fdb 100644 --- a/src/contentmanager.cpp +++ b/src/contentmanager.cpp @@ -527,7 +527,7 @@ void ContentManager::downloadStarted(const kiwix::Book& book, const std::string& void ContentManager::removeDownload(QString bookId) { - m_downloads.remove(bookId); + DownloadManager::removeDownload(bookId); managerModel->removeDownload(bookId); } diff --git a/src/downloadmanagement.cpp b/src/downloadmanagement.cpp index 7fd36f3..f22eda7 100644 --- a/src/downloadmanagement.cpp +++ b/src/downloadmanagement.cpp @@ -172,3 +172,8 @@ bool DownloadManager::cancelDownload(const QString& bookId) return false; } } + +void DownloadManager::removeDownload(QString bookId) +{ + m_downloads.remove(bookId); +} diff --git a/src/downloadmanagement.h b/src/downloadmanagement.h index 31a8bc5..f5030e8 100644 --- a/src/downloadmanagement.h +++ b/src/downloadmanagement.h @@ -79,6 +79,7 @@ public: // functions void pauseDownload(const QString& bookId); void resumeDownload(const QString& bookId); bool cancelDownload(const QString& bookId); + void removeDownload(QString bookId); signals: void downloadUpdated(QString bookId, const DownloadInfo& );