diff options
| author | Nikolai Krasheninnikov <[email protected]> | 2020-01-26 17:06:40 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-01-26 17:09:18 +0100 |
| commit | 305085b58143c431d9abb7bd8dcb2f0954df725a (patch) | |
| tree | 4e7dc4d9b7aa7b4cc6e24b4556d699ec10cf8660 /src/views/versioncontrol/versioncontrolobserver.h | |
| parent | 17e1a48c68000f92033196b6d19d876143a13608 (diff) | |
Fixes multiple VCS plugin calls on single directory update.
Summary:
Fixes multiple VCS plugin beginRetrival()/endRetrival()/itemVersion() calls on single directory update.
When VCS pluging finished gathering directory information VersionControlObserver::slotThreadFinished() calls KFileItemModel::setData() on each entry with appropriate item VCS information.
This in turn emits KFileItemModel::itemsChanged() which is connected with VersionControlObserver::delayedDirectoryVerification() which is starting to gather VCS directory information again.
This commits breaks the vicious circle.
BUG: 415698
FIXED-IN: 20.04.0
Reviewers: #dolphin, meven, ngraham, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26721
Diffstat (limited to 'src/views/versioncontrol/versioncontrolobserver.h')
| -rw-r--r-- | src/views/versioncontrol/versioncontrolobserver.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index 08279dc86..7b269abec 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -33,6 +33,7 @@ class KFileItemList; class KFileItemModel; +class KItemRangeList; class QAction; class QTimer; class UpdateItemStatesThread; @@ -97,6 +98,12 @@ private slots: */ void silentDirectoryVerification(); + /** + * Invokes delayedDirectoryVerification() only if the itemsChanged() signal has not + * been triggered by the VCS plugin itself. + */ + void slotItemsChanged(const KItemRangeList& itemRanges, const QSet<QByteArray>& roles); + void verifyDirectory(); /** |
