Commit 9340c244 authored by Arnav Rawat's avatar Arnav Rawat
Browse files

The comic applet previously attempted to use the url associated with the

icon. However, the dataengine does not return a url. Changed the method
headers and method calls to use QIcon instead.
parent d204d692
......@@ -28,14 +28,14 @@ QHash<int, QByteArray> ActiveComicModel::roleNames() const
return roleNames;
void ActiveComicModel::addComic(const QString &key, const QString &title, const QString &iconPath, bool highlight)
void ActiveComicModel::addComic(const QString& key, const QString& title, const QIcon& icon, bool highlight)
QList<QStandardItem *> newRow;
QStandardItem *item = new QStandardItem(title);
item->setData(key, ComicKeyRole);
item->setData(title, ComicTitleRole);
item->setData(iconPath, ComicIconRole);
item->setData(icon, ComicIconRole);
item->setData(highlight, ComicHighlightRole);
newRow << item;
......@@ -26,7 +26,7 @@ public:
QHash<int, QByteArray> roleNames() const override;
void addComic(const QString &key, const QString &title, const QString &iconPath, bool highlight = true);
void addComic(const QString &key, const QString &title, const QIcon &icon, bool highlight = true);
int count() { return rowCount(QModelIndex()); }
......@@ -277,13 +277,13 @@ void ComicApplet::updateUsedComics()
const QString name =;
const QString identifier = Qt::UserRole ).toString();
const QString iconPath = Qt::DecorationRole ).value<QIcon>().name();
const QIcon icon = Qt::DecorationRole ).value<QIcon>();
//found a newer strip last time, which was not visited
if (mCheckNewComicStripsInterval && !cg.readEntry(QLatin1String("lastStripVisited_") + identifier, true)) {
mActiveComicModel->addComic(identifier, name, iconPath, true);
mActiveComicModel->addComic(identifier, name, icon, true);
} else {
mActiveComicModel->addComic(identifier, name, iconPath);
mActiveComicModel->addComic(identifier, name, icon);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment