mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
ContentManager::updateDownload() became a slot
This commit is contained in:
parent
32e3c743f7
commit
b6a86918ff
@ -133,6 +133,9 @@ ContentManager::ContentManager(Library* library, kiwix::Downloader* downloader,
|
||||
m_downloadUpdateTimer.start(1000);
|
||||
connect(&m_downloadUpdateTimer, &QTimer::timeout,
|
||||
this, &ContentManager::updateDownloads);
|
||||
|
||||
connect(this, &ContentManager::downloadUpdated,
|
||||
this, &ContentManager::updateDownload);
|
||||
}
|
||||
|
||||
void ContentManager::updateModel()
|
||||
@ -497,7 +500,7 @@ void ContentManager::updateDownloads()
|
||||
for ( const auto& bookId : m_downloads.keys() ) {
|
||||
const auto downloadInfo = getDownloadInfo(bookId);
|
||||
|
||||
updateDownload(bookId, downloadInfo);
|
||||
emit downloadUpdated(bookId, downloadInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@ signals:
|
||||
void categoriesLoaded(QStringList);
|
||||
void languagesLoaded(LanguageList);
|
||||
void localChanged(const bool);
|
||||
void downloadUpdated(QString bookId, const DownloadInfo& );
|
||||
|
||||
public slots:
|
||||
QStringList getTranslations(const QStringList &keys);
|
||||
@ -66,6 +67,7 @@ public slots:
|
||||
void onCustomContextMenu(const QPoint &point);
|
||||
void openBookWithIndex(const QModelIndex& index);
|
||||
void updateDownloads();
|
||||
void updateDownload(QString bookId, const DownloadInfo& downloadInfo);
|
||||
|
||||
private: // functions
|
||||
QStringList getBookIds();
|
||||
@ -83,7 +85,6 @@ private: // functions
|
||||
const kiwix::Book& getRemoteOrLocalBook(const QString &id);
|
||||
|
||||
std::string startDownload(const kiwix::Book& book);
|
||||
void updateDownload(QString bookId, const DownloadInfo& downloadInfo);
|
||||
void removeDownload(QString bookId);
|
||||
void downloadStarted(const kiwix::Book& book, const std::string& downloadId);
|
||||
void downloadDisappeared(QString bookId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user