GitGrep: Do not access global state from non-main thread

- VcsCommand calls into VcsOutputWindow at construction, so we need to
  construct it in the main thread
- VcsCommand may not call into global settings from runCommand, so we
  need to store the ssh prompt command
- accessing the GitClient singleton in a non-main thread is not
  thread-safe

Change-Id: I3dcdff8091c2dcea1c165ce5b3eca5ef62d474fd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2021-06-07 12:23:19 +02:00
parent 93fcf5c91f
commit ee61b09b21
3 changed files with 29 additions and 30 deletions

View File

@@ -63,6 +63,7 @@ private:
void coreAboutToClose() override;
QString m_sshPrompt;
bool m_preventRepositoryChanged;
VcsOutputWindow *m_outputWindow = nullptr;
};