Commit f41942d8 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Fix QtQuick model if there is only a payload, but no download links

This makes the old KFontinst provider work with the QtQuick
wrapper class. Maybe we should consider deprecating the
`payload()`concept in KF6, but for now it should work.
parent 0197cc18
......@@ -278,6 +278,13 @@ QVariant ItemsModel::data(const QModelIndex &index, int role) const
info->setData(link);
list.append(info);
}
if (list.isEmpty() && !entry.payload().isEmpty()) {
DownloadLinkInfo *info = new DownloadLinkInfo();
KNSCore::EntryInternal::DownloadLinkInformation data;
data.descriptionLink = entry.payload();
info->setData(data);
list.append(info);
}
data.setValue<QObjectList>(list);
}
break;
......
Markdown is supported
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