mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-21 02:51:26 -04:00
ContentManager::updateDownload()
This commit is contained in:
parent
d3c4361d60
commit
582dce0ced
@ -476,6 +476,13 @@ ContentManager::DownloadInfo ContentManager::updateDownloadInfos(QString bookId,
|
||||
return result;
|
||||
}
|
||||
|
||||
void ContentManager::updateDownload(QString bookId)
|
||||
{
|
||||
// This calls ContentManager::updateDownloadInfos() in a convoluted way
|
||||
// and also has some other side-effects
|
||||
managerModel->updateDownload(bookId);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -497,7 +504,7 @@ void ContentManager::downloadBook(const QString &id, QModelIndex index)
|
||||
node->setDownloadState(newDownload);
|
||||
QTimer *timer = newDownload->getDownloadUpdateTimer();
|
||||
connect(timer, &QTimer::timeout, [=]() {
|
||||
managerModel->updateDownload(id);
|
||||
this->updateDownload(id);
|
||||
});
|
||||
}
|
||||
catch ( const ContentManagerError& err )
|
||||
|
@ -86,6 +86,7 @@ private: // functions
|
||||
const kiwix::Book& getRemoteOrLocalBook(const QString &id);
|
||||
|
||||
std::string startDownload(const kiwix::Book& book);
|
||||
void updateDownload(QString bookId);
|
||||
void downloadStarted(const kiwix::Book& book, const std::string& downloadId);
|
||||
void downloadCancelled(QString bookId);
|
||||
void downloadCompleted(QString bookId, QString path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user