VcsCommand: Don't run in separate thread

Change-Id: Ief0e859d3ce48f804e128cc0f5cb1b390a066923
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-08-25 12:56:03 +02:00
parent 210c60a401
commit 3dc3870475
4 changed files with 101 additions and 91 deletions

View File

@@ -45,7 +45,6 @@ private:
QFutureInterface<void> *m_future;
QMutex *m_futureMutex = nullptr;
friend class VcsCommand;
friend class Internal::VcsCommandPrivate;
};
@@ -134,14 +133,12 @@ signals:
void runCommandFinished(const Utils::FilePath &workingDirectory);
private:
void run(QFutureInterface<void> &future);
// This is called once per job in a thread.
// When called from the UI thread it will execute fully synchronously, so no signals will
// be triggered!
CommandResult runCommand(const Utils::CommandLine &command, int timeoutS,
const Utils::FilePath &workingDirectory,
const Utils::ExitCodeInterpreter &interpreter);
void addTask(const QFuture<void> &future);
void postRunCommand(const Utils::FilePath &workingDirectory);
// Run without a event loop in fully blocking mode. No signals will be delivered.