mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-23 12:07:00 -04:00
ContentManager::DownloadInfo typedef
This commit is contained in:
parent
4f4c811711
commit
dd69a9d2bd
@ -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) {
|
if (!mp_downloader) {
|
||||||
for(auto& key: keys) {
|
for(auto& key: keys) {
|
||||||
values.insert(key, "");
|
values.insert(key, "");
|
||||||
|
@ -23,6 +23,9 @@ public: // types
|
|||||||
typedef ContentManagerModel::BookInfo BookInfo;
|
typedef ContentManagerModel::BookInfo BookInfo;
|
||||||
typedef ContentManagerModel::BookInfoList BookInfoList;
|
typedef ContentManagerModel::BookInfoList BookInfoList;
|
||||||
|
|
||||||
|
// XXX: potentional source of confusion with ::DownloadInfo from rownode.h
|
||||||
|
typedef QMap<QString, QVariant> DownloadInfo;
|
||||||
|
|
||||||
public: // functions
|
public: // functions
|
||||||
explicit ContentManager(Library* library, kiwix::Downloader *downloader, QObject *parent = nullptr);
|
explicit ContentManager(Library* library, kiwix::Downloader *downloader, QObject *parent = nullptr);
|
||||||
virtual ~ContentManager() {}
|
virtual ~ContentManager() {}
|
||||||
@ -81,7 +84,7 @@ public slots:
|
|||||||
QStringList getTranslations(const QStringList &keys);
|
QStringList getTranslations(const QStringList &keys);
|
||||||
BookInfo getBookInfos(QString id, const QStringList &keys);
|
BookInfo getBookInfos(QString id, const QStringList &keys);
|
||||||
void openBook(const QString& id);
|
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);
|
||||||
QString downloadBook(const QString& id, QModelIndex index);
|
QString downloadBook(const QString& id, QModelIndex index);
|
||||||
void updateLibrary();
|
void updateLibrary();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user