mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -04:00
ContentManagerModel only reads from m_downloads
This commit is contained in:
parent
6f781a8e0e
commit
4153765b7b
@ -7,7 +7,7 @@
|
||||
#include "kiwixapp.h"
|
||||
#include <kiwix/tools.h>
|
||||
|
||||
ContentManagerModel::ContentManagerModel(Downloads* downloads, QObject *parent)
|
||||
ContentManagerModel::ContentManagerModel(const Downloads* downloads, QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
, m_downloads(*downloads)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ public: // types
|
||||
typedef QMap<QString, std::shared_ptr<DownloadState>> Downloads;
|
||||
|
||||
public: // functions
|
||||
ContentManagerModel(Downloads* downloads, QObject *parent = nullptr);
|
||||
ContentManagerModel(const Downloads* downloads, QObject *parent = nullptr);
|
||||
~ContentManagerModel();
|
||||
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
@ -63,7 +63,7 @@ private: // data
|
||||
ThumbnailDownloader td;
|
||||
QMap<QString, size_t> bookIdToRowMap;
|
||||
QMap<QString, QByteArray> iconMap;
|
||||
Downloads& m_downloads;
|
||||
const Downloads& m_downloads;
|
||||
};
|
||||
|
||||
#endif // CONTENTMANAGERMODEL_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user