forked from qt-creator/qt-creator
GitClient: Don't call blocking waitForStarted()
Connect to done() signal in order to detect the start failure and try to start a gitk from different path. All trials of starting gitk are done sequentially and non-blocking. Give process a parent in order to avoid process leak on shutdown. Change-Id: I1d74bfeaca23d38643f3d2f262428732314aefe4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -113,6 +113,7 @@ class GITSHARED_EXPORT GitClient : public VcsBase::VcsBaseClientImpl
|
||||
public:
|
||||
enum CommandInProgress { NoCommand, Revert, CherryPick,
|
||||
Rebase, Merge, RebaseMerge };
|
||||
enum GitKLaunchTrial { Bin, ParentOfBin, SystemPath, None };
|
||||
|
||||
class StashInfo
|
||||
{
|
||||
@@ -399,10 +400,15 @@ private:
|
||||
void connectRepositoryChanged(const QString & repository, VcsBase::VcsCommand *cmd);
|
||||
bool executeAndHandleConflicts(const Utils::FilePath &workingDirectory, const QStringList &arguments,
|
||||
const QString &abortCommand = {}) const;
|
||||
bool tryLauchingGitK(const Utils::Environment &env,
|
||||
const Utils::FilePath &workingDirectory,
|
||||
const QString &fileName,
|
||||
const Utils::FilePath &gitBinDirectory) const;
|
||||
void tryLaunchingGitK(const Utils::Environment &env,
|
||||
const Utils::FilePath &workingDirectory,
|
||||
const QString &fileName,
|
||||
GitKLaunchTrial trial = GitKLaunchTrial::Bin) const;
|
||||
void handleGitKFailedToStart(const Utils::Environment &env,
|
||||
const Utils::FilePath &workingDirectory,
|
||||
const QString &fileName,
|
||||
const GitKLaunchTrial oldTrial,
|
||||
const Utils::FilePath &oldGitBinDir) const;
|
||||
bool cleanList(const Utils::FilePath &workingDirectory, const QString &modulePath,
|
||||
const QString &flag, QStringList *files, QString *errorMessage);
|
||||
|
||||
|
Reference in New Issue
Block a user