DiffEditorController: Make it possible to setup task tree

Instead of reloader function. Use task tree for ShowController.
Make diff processing a part of task tree.

Change-Id: I732d0a14eaf8de7ce0d1be891fb4700b22ea24b7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-12-12 14:40:56 +01:00
parent 041c59e90f
commit eef9cb458b
7 changed files with 207 additions and 123 deletions

View File

@@ -15,8 +15,10 @@ QT_END_NAMESPACE
namespace Core { class IDocument; }
namespace Utils {
template <typename R> class AsyncTask;
class Environment;
class FilePath;
class QtcProcess;
} // Utils
namespace VcsBase {
@@ -37,13 +39,15 @@ public:
void setWorkingDirectory(const Utils::FilePath &workingDir);
protected:
void setupCommand(Utils::QtcProcess &process, const QStringList &args) const;
void setupDiffProcessor(Utils::AsyncTask<QList<DiffEditor::FileData>> &processor,
const QString &patch) const;
void runCommand(const QList<QStringList> &args, RunFlags flags, QTextCodec *codec = nullptr);
virtual void processCommandOutput(const QString &output);
Utils::FilePath workingDirectory() const;
void setStartupFile(const QString &startupFile);
QString startupFile() const;
void setDisplayName(const QString &displayName);
private:
friend class VcsBaseDiffEditorControllerPrivate;