Fixes multiple VCS plugin calls on single directory update.
ClosedPublic

Authored by nikolaik on Jan 17 2020, 9:45 AM.

Details

Summary

BUG: 415698
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.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
nikolaik created this revision.Jan 17 2020, 9:45 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptJan 17 2020, 9:45 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
nikolaik requested review of this revision.Jan 17 2020, 9:45 AM
nikolaik updated this revision to Diff 73752.Jan 17 2020, 10:07 AM
nikolaik retitled this revision from Partially fixes https://bugs.kde.org/show_bug.cgi?id=415698. to Fixes multiple VCS plugin calls on single directory update..Jan 17 2020, 10:09 AM
meven added inline comments.Jan 17 2020, 11:31 AM
src/views/versioncontrol/versioncontrolobserver.cpp
83

analyze

nikolaik updated this revision to Diff 73829.Jan 18 2020, 12:52 PM

Updated in response to review comments.

nikolaik marked an inline comment as done.Jan 18 2020, 12:53 PM
elvisangelaccio requested changes to this revision.Jan 19 2020, 9:15 PM
elvisangelaccio added inline comments.
src/views/versioncontrol/versioncontrolobserver.cpp
72

Please use a new private slot instead of the lambda below, so that you don't have to put nullptr here.

This revision now requires changes to proceed.Jan 19 2020, 9:15 PM
nikolaik updated this revision to Diff 73905.Jan 20 2020, 7:20 AM

Added new private slot instead of lambda.

nikolaik marked an inline comment as done.Jan 20 2020, 7:21 AM
src/views/versioncontrol/versioncontrolobserver.cpp
144

Typo: emitted.

src/views/versioncontrol/versioncontrolobserver.h
103 ↗(On Diff #73905)

"Invokes delayedDirectoryVerification() only if the itemsChanged() signal has not been triggered by the VCS plugin itself."

105 ↗(On Diff #73905)

I'd simply call it slotItemsChanged()

nikolaik updated this revision to Diff 74391.Jan 26 2020, 1:49 PM

Updated in response to review comments.

nikolaik marked 3 inline comments as done.Jan 26 2020, 1:49 PM
elvisangelaccio accepted this revision.Jan 26 2020, 4:09 PM
This revision is now accepted and ready to land.Jan 26 2020, 4:09 PM
This revision was automatically updated to reflect the committed changes.