mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-23 03:58:56 -04:00
Made ContentManagerModel::createNode() non-static
This commit is contained in:
parent
a7f0309e7d
commit
d38ec6bfa3
@ -124,7 +124,7 @@ QString convertToUnits(QString size)
|
|||||||
return preciseBytes + " " + units[unitIndex];
|
return preciseBytes + " " + units[unitIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<RowNode> ContentManagerModel::createNode(QMap<QString, QVariant> bookItem, QMap<QString, QByteArray> iconMap, std::shared_ptr<RowNode> rootNode)
|
std::shared_ptr<RowNode> ContentManagerModel::createNode(QMap<QString, QVariant> bookItem, QMap<QString, QByteArray> iconMap) const
|
||||||
{
|
{
|
||||||
auto faviconUrl = "https://" + bookItem["faviconUrl"].toString();
|
auto faviconUrl = "https://" + bookItem["faviconUrl"].toString();
|
||||||
QString id = bookItem["id"].toString();
|
QString id = bookItem["id"].toString();
|
||||||
@ -158,7 +158,7 @@ void ContentManagerModel::setupNodes()
|
|||||||
{
|
{
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
for (auto bookItem : m_data) {
|
for (auto bookItem : m_data) {
|
||||||
rootNode->appendChild(createNode(bookItem, iconMap, rootNode));
|
rootNode->appendChild(createNode(bookItem, iconMap));
|
||||||
}
|
}
|
||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
||||||
void refreshIcons();
|
void refreshIcons();
|
||||||
|
|
||||||
static std::shared_ptr<RowNode> createNode(QMap<QString, QVariant> bookItem, QMap<QString, QByteArray> iconMap, std::shared_ptr<RowNode> rootNode);
|
std::shared_ptr<RowNode> createNode(QMap<QString, QVariant> bookItem, QMap<QString, QByteArray> iconMap) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateImage(QModelIndex index, QString url, QByteArray imageData);
|
void updateImage(QModelIndex index, QString url, QByteArray imageData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user