This patch checks the item first if the plugin it's using for it's previews even supports sequences. If not, we can then safely ignore the hover action for polling more sequences and avoid unnecessary work.
The sequencing support is false by default, so we set it true only when we know it's possible.
{
KFileItemListView *view = listView();
- if (!view) {
+ if (!view || !data().value("supportsSequencing").toBool()) {
return;
}
QHash<QByteArray, QVariant> data = rolesData(item, index);
data.insert("iconPixmap", transformPreviewPixmap(pixmap));
+ data.insert("supportsSequencing", m_previewJob->handlesSequences());
disconnect(m_model, &KFileItemModel::itemsChanged, this, &KFileItemModelRolesUpdater::slotItemsChanged);
m_model->setData(index, data);