Vcs: Merge IVersionControl and VcsBasePlugin hierarchies

They were 1:1 in parallel, with quite a bit of function call
ping-pong inbetween, for code-sharing-by-inheritance. Merge
them by making VcsBasePlugin inherit IVersionControl and
merge the derived classes below.

Size of this patch is hard to avoid as all seven systems have to
move simultaneously. Non-necessary potential follow-up cleanup
have been left out on purpose.

Change-Id: Icb71e4182af3db21069cc637e7ae87ffa3829791
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-01-30 12:31:47 +01:00
parent a35a2d6bf3
commit b8fe25db25
58 changed files with 1091 additions and 1902 deletions

View File

@@ -31,7 +31,6 @@
#include "giteditor.h"
#include "gitplugin.h"
#include "gitsubmiteditor.h"
#include "gitversioncontrol.h"
#include "mergetool.h"
#include "branchadddialog.h"
#include "gerrit/gerritplugin.h"
@@ -2520,7 +2519,7 @@ bool GitClient::launchGitGui(const QString &workingDirectory) {
return success;
}
FilePath GitClient::gitBinDirectory()
FilePath GitClient::gitBinDirectory() const
{
const QString git = vcsBinary().toString();
if (git.isEmpty())
@@ -2945,7 +2944,7 @@ void GitClient::revert(const QStringList &files, bool revertStaging)
QString errorMessage;
switch (revertI(files, &isDirectory, &errorMessage, revertStaging)) {
case RevertOk:
GitPluginPrivate::instance()->gitVersionControl()->emitFilesChanged(files);
emit GitPluginPrivate::instance()->filesChanged(files);
break;
case RevertCanceled:
break;