Vcs: Use setters to set up DiffController parameters

Plan is to avoid client use down there, so extract the actually
used data first and pass it down.

Change-Id: I088fc9cc3086e8f6e1e0c3c9d3a35445f752e6f0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-02-04 08:11:50 +01:00
parent 8f88b89d81
commit c17767c78e
7 changed files with 120 additions and 128 deletions

View File

@@ -50,6 +50,7 @@ namespace Core { class ICore; }
namespace VcsBase {
class VcsCommand;
class SubmitFileModel;
class VcsBaseDiffEditorController;
class VcsBaseEditorWidget;
}
@@ -361,8 +362,8 @@ private:
enum CodecType { CodecSource, CodecLogOutput, CodecNone };
QTextCodec *codecFor(CodecType codecType, const QString &source = QString()) const;
void requestReload(const QString &documentId, const QString &source, const QString &title,
std::function<DiffEditor::DiffEditorController *(Core::IDocument *)> factory) const;
void requestReload(const QString &documentId, const QString &source, const QString &title, const QString &workingDirectory,
std::function<VcsBase::VcsBaseDiffEditorController *(Core::IDocument *)> factory) const;
// determine version as '(major << 16) + (minor << 8) + patch' or 0.
unsigned synchronousGitVersion(QString *errorMessage = nullptr) const;