diff options
| author | Akseli Lahtinen <[email protected]> | 2025-05-14 14:31:36 +0300 |
|---|---|---|
| committer | Akseli Lahtinen <[email protected]> | 2025-05-14 14:31:36 +0300 |
| commit | 832b7c4a1b820043fd0b0191d937050107694ed9 (patch) | |
| tree | 5004559817292a7f258350276510ce1ad9c6fd5a /src/kitemviews/kfileitemmodelrolesupdater.cpp | |
| parent | af9735e720fc3d38c3511edb961b1928c91bc855 (diff) | |
Check if the item supports sequencing before looking for sequence pixmaps
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.
Diffstat (limited to 'src/kitemviews/kfileitemmodelrolesupdater.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodelrolesupdater.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index f9a50b9de..497c13b52 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -570,6 +570,7 @@ void KFileItemModelRolesUpdater::slotGotPreview(const KFileItem &item, const QPi 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); |
