Debugger: Delay evaluation of stub runnable environment

There can be modifications in the environment between the decision
to use a terminal and its start. We want them taken into account.

Change-Id: I5622614c5fac3bdd8167c29e7b618b5e42a28287
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-03-09 11:53:18 +01:00
parent aa96b07853
commit 3560a86c2e
3 changed files with 14 additions and 11 deletions

View File

@@ -72,7 +72,7 @@ class TerminalRunner : public ProjectExplorer::RunWorker
{
public:
TerminalRunner(ProjectExplorer::RunControl *runControl,
const ProjectExplorer::Runnable &stubRunnable);
const std::function<ProjectExplorer::Runnable()> &stubRunnable);
qint64 applicationPid() const { return m_applicationPid; }
qint64 applicationMainThreadId() const { return m_applicationMainThreadId; }
@@ -89,7 +89,7 @@ private:
void stubError(const QString &msg);
Utils::ConsoleProcess m_stubProc;
ProjectExplorer::Runnable m_stubRunnable;
std::function<ProjectExplorer::Runnable()> m_stubRunnable;
qint64 m_applicationPid = 0;
qint64 m_applicationMainThreadId = 0;
bool m_runAsRoot = false;