DownloadManager::removeDownload()

This commit is contained in:
Veloman Yunkan 2024-05-30 10:47:45 +04:00 committed by Kelson
parent 88eb29f791
commit be017b7e2c
3 changed files with 7 additions and 1 deletions

View File

@ -527,7 +527,7 @@ void ContentManager::downloadStarted(const kiwix::Book& book, const std::string&
void ContentManager::removeDownload(QString bookId) void ContentManager::removeDownload(QString bookId)
{ {
m_downloads.remove(bookId); DownloadManager::removeDownload(bookId);
managerModel->removeDownload(bookId); managerModel->removeDownload(bookId);
} }

View File

@ -172,3 +172,8 @@ bool DownloadManager::cancelDownload(const QString& bookId)
return false; return false;
} }
} }
void DownloadManager::removeDownload(QString bookId)
{
m_downloads.remove(bookId);
}

View File

@ -79,6 +79,7 @@ public: // functions
void pauseDownload(const QString& bookId); void pauseDownload(const QString& bookId);
void resumeDownload(const QString& bookId); void resumeDownload(const QString& bookId);
bool cancelDownload(const QString& bookId); bool cancelDownload(const QString& bookId);
void removeDownload(QString bookId);
signals: signals:
void downloadUpdated(QString bookId, const DownloadInfo& ); void downloadUpdated(QString bookId, const DownloadInfo& );