mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -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];
|
||||
}
|
||||
|
||||
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();
|
||||
QString id = bookItem["id"].toString();
|
||||
@ -158,7 +158,7 @@ void ContentManagerModel::setupNodes()
|
||||
{
|
||||
beginResetModel();
|
||||
for (auto bookItem : m_data) {
|
||||
rootNode->appendChild(createNode(bookItem, iconMap, rootNode));
|
||||
rootNode->appendChild(createNode(bookItem, iconMap));
|
||||
}
|
||||
endResetModel();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
||||
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:
|
||||
void updateImage(QModelIndex index, QString url, QByteArray imageData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user