ContentManager::DownloadInfo typedef

This commit is contained in:
Veloman Yunkan 2024-02-08 18:15:42 +04:00
parent 4f4c811711
commit dd69a9d2bd
2 changed files with 6 additions and 3 deletions

View File

@ -393,9 +393,9 @@ void ContentManager::downloadCompleted(const kiwix::Book& b, QString path)
}
}
QMap<QString, QVariant> ContentManager::updateDownloadInfos(QString id, const QStringList &keys)
ContentManager::DownloadInfo ContentManager::updateDownloadInfos(QString id, const QStringList &keys)
{
QMap<QString, QVariant> values;
DownloadInfo values;
if (!mp_downloader) {
for(auto& key: keys) {
values.insert(key, "");

View File

@ -23,6 +23,9 @@ public: // types
typedef ContentManagerModel::BookInfo BookInfo;
typedef ContentManagerModel::BookInfoList BookInfoList;
// XXX: potentional source of confusion with ::DownloadInfo from rownode.h
typedef QMap<QString, QVariant> DownloadInfo;
public: // functions
explicit ContentManager(Library* library, kiwix::Downloader *downloader, QObject *parent = nullptr);
virtual ~ContentManager() {}
@ -81,7 +84,7 @@ public slots:
QStringList getTranslations(const QStringList &keys);
BookInfo getBookInfos(QString id, const QStringList &keys);
void openBook(const QString& id);
QMap<QString, QVariant> updateDownloadInfos(QString id, const QStringList& keys);
DownloadInfo updateDownloadInfos(QString id, const QStringList& keys);
QString downloadBook(const QString& id);
QString downloadBook(const QString& id, QModelIndex index);
void updateLibrary();