For VCS-plugin interface added pure virtual function outOfVersionControlActions()
ClosedPublic

Authored by nikolaik on Apr 21 2020, 9:12 AM.

Details

Summary

This commit changes VCS-plugin interface in order to provide actions for unversioned items (for example clone or checkout repository), updates to dolphin-plugins comes in the separate commit D29042.

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nikolaik created this revision.Apr 21 2020, 9:12 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptApr 21 2020, 9:12 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
nikolaik requested review of this revision.Apr 21 2020, 9:12 AM
nikolaik edited the summary of this revision. (Show Details)Apr 21 2020, 9:26 AM
meven added inline comments.Apr 21 2020, 10:43 AM
src/views/versioncontrol/kversioncontrolplugin.h
189

Perhaps use "notVersioned" as it is confusing with DVCS that have a notion of unversioned files and folders with a different meaning.

@meven
I am agree this names might be confusing.
Let's figure out more appropriate names for functions: if we will accept revision this would be for long, lets make it clear.
What do you say about 'actions()' (as it was) and 'additionalActions()' (for any additional actions outside versioned directory, we will mark it in the documentation: the function name itself will be not very meaningful though)?

meven added a comment.EditedApr 21 2020, 11:04 AM

@meven
I am agree this names might be confusing.
Let's figure out more appropriate names for functions: if we will accept revision this would be for long, lets make it clear.
What do you say about 'actions()' (as it was) and 'additionalActions()' (for any additional actions outside versioned directory, we will mark it in the documentation: the function name itself will be not very meaningful though)?

Not convinced additionalActions supposed there were already some actions in the first place.
How about outOfVersionControlActions ?

nikolaik edited the summary of this revision. (Show Details)Apr 21 2020, 12:34 PM
meven requested changes to this revision.Apr 21 2020, 1:13 PM

FEATURE: 420239 should only be added the diff actually implementing the features (so the changelog only references the same features once), here the one adding clone/checkout actions.
Here it is just a dependency for the future feature.
The other diffs can only reference the bug with CCBUG: 420239 in the meantime.
But you don't have to add it though.

This revision now requires changes to proceed.Apr 21 2020, 1:13 PM
nikolaik edited the summary of this revision. (Show Details)Apr 21 2020, 1:53 PM
nikolaik updated this revision to Diff 80768.Apr 21 2020, 2:38 PM
  • Name changed: unversionedActions() -> outOfVersionControlActions().
nikolaik marked an inline comment as done.Apr 21 2020, 2:41 PM
meven added a comment.Apr 21 2020, 4:15 PM

All is nice.
Just naming is hard and I'd like to keep it the least confusing possible.
I hope this is not annoying for you.

src/views/versioncontrol/kversioncontrolplugin.h
183–184

Maybe "items in a version controlled path" instead of "versioned items", since this includes unversionned files in git repos for instance.

186–193

Maybe versionControlActions should be clearer.

src/views/versioncontrol/versioncontrolobserver.cpp
125–133

isVersioned could be renamed isVersionControlled

nikolaik updated this revision to Diff 80788.Apr 21 2020, 4:45 PM
  • Name change: versionedActions() -> versionControlActions()
  • Name change: isVersioned() -> isVersionControlled()
  • Added comment changes in response to review comments
nikolaik marked 3 inline comments as done.Apr 21 2020, 4:48 PM

All is nice.
Just naming is hard and I'd like to keep it the least confusing possible.
I hope this is not annoying for you.

It's absolutely fine, I really appreciate your help! Thanks for your time on this one.
I think this is a necessary changes so another thanks for good ideas.

meven accepted this revision.Apr 22 2020, 8:00 AM
meven edited the summary of this revision. (Show Details)

Very nice

This revision is now accepted and ready to land.Apr 22 2020, 8:00 AM
meven retitled this revision from For VCS-plugin interface added pure virtual function unversionedActions() for actions in the unversioned directory (for example clone or checkout action). to For VCS-plugin interface added pure virtual function outOfVersionControlActions().
elvisangelaccio accepted this revision.Apr 26 2020, 5:18 PM
elvisangelaccio added inline comments.
src/views/versioncontrol/versioncontrolobserver.cpp
129

Please call this variable plugin.

nikolaik updated this revision to Diff 81279.Apr 26 2020, 7:54 PM
  • Update in response to review comments.
nikolaik marked an inline comment as done.Apr 26 2020, 7:54 PM
meven added inline comments.Apr 26 2020, 9:11 PM
src/views/versioncontrol/versioncontrolobserver.cpp
129

You misunderstood: it is i that should be named plugin since it comes from a m_plugins variable.
actions is a fine name for a QList<QAction*>.

nikolaik updated this revision to Diff 81293.Apr 27 2020, 5:53 AM
  • Update variable names.
nikolaik marked an inline comment as done.Apr 27 2020, 5:54 AM

ping
can i push this?