diff options
author | Daniel Teske <daniel.teske@nokia.com> | 2012-02-10 17:50:32 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@nokia.com> | 2012-03-06 17:12:37 +0100 |
commit | 970500141490b1ea6f4137f359e5e7ae758a4162 (patch) | |
tree | 35b8e7252a09ce3991e369de3b793efe6851978d /src/plugins/projectexplorer/localapplicationruncontrol.cpp | |
parent | 07d14309188f7af6aec021a982c0058ce24df377 (diff) | |
download | qt-creator-970500141490b1ea6f4137f359e5e7ae758a4162.tar.gz |
LocalApplicationRunControl: Track state of stub for isRunning
Task-number: QTCREATORBUG-6885
Task-number: QTCREATORBUG-6926
Change-Id: I1cf29656a1de96817681bc2002d6cbc27ae07d20
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer/localapplicationruncontrol.cpp')
-rw-r--r-- | src/plugins/projectexplorer/localapplicationruncontrol.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/localapplicationruncontrol.cpp b/src/plugins/projectexplorer/localapplicationruncontrol.cpp index 87c89f631c..007c90b476 100644 --- a/src/plugins/projectexplorer/localapplicationruncontrol.cpp +++ b/src/plugins/projectexplorer/localapplicationruncontrol.cpp @@ -82,7 +82,7 @@ RunConfigWidget *LocalApplicationRunControlFactory::createConfigurationWidget(Ru // ApplicationRunControl LocalApplicationRunControl::LocalApplicationRunControl(LocalApplicationRunConfiguration *rc, RunMode mode) - : RunControl(rc, mode) + : RunControl(rc, mode), m_running(false) { Utils::Environment env = rc->environment(); QString dir = rc->workingDirectory(); @@ -114,6 +114,7 @@ void LocalApplicationRunControl::start() appendMessage(tr("No executable specified.\n"), Utils::ErrorMessageFormat); emit finished(); } else { + m_running = true; m_applicationLauncher.start(m_runMode, m_executable, m_commandLineArguments); setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID())); QString msg = tr("Starting %1...\n").arg(QDir::toNativeSeparators(m_executable)); @@ -129,7 +130,7 @@ LocalApplicationRunControl::StopResult LocalApplicationRunControl::stop() bool LocalApplicationRunControl::isRunning() const { - return m_applicationLauncher.isRunning(); + return m_running; } QIcon LocalApplicationRunControl::icon() const @@ -151,6 +152,7 @@ void LocalApplicationRunControl::processStarted() void LocalApplicationRunControl::processExited(int exitCode) { + m_running = false; setApplicationProcessHandle(ProcessHandle()); QString msg = tr("%1 exited with code %2\n") .arg(QDir::toNativeSeparators(m_executable)).arg(exitCode); |