forked from qt-creator/qt-creator
ProjectExplorer: Return a ProcessHandle for AppLauncher::applicationPID
Change-Id: I00fc4dbd3a3c022006de95087b61a86bbb83faeb Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -53,7 +53,7 @@ void NimRunControl::start()
|
||||
{
|
||||
reportApplicationStart();
|
||||
m_applicationLauncher.start(m_runnable);
|
||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||
setApplicationProcessHandle(m_applicationLauncher.applicationPID());
|
||||
bringApplicationToForeground();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ ProjectExplorer::RunControl::StopResult NimRunControl::stop()
|
||||
void NimRunControl::processStarted()
|
||||
{
|
||||
// Console processes only know their pid after being started
|
||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||
setApplicationProcessHandle(m_applicationLauncher.applicationPID());
|
||||
}
|
||||
|
||||
void NimRunControl::processExited(int exitCode, QProcess::ExitStatus status)
|
||||
|
||||
@@ -225,9 +225,9 @@ bool ApplicationLauncherPrivate::isRunning() const
|
||||
return m_consoleProcess.isRunning();
|
||||
}
|
||||
|
||||
qint64 ApplicationLauncher::applicationPID() const
|
||||
ProcessHandle ApplicationLauncher::applicationPID() const
|
||||
{
|
||||
return d->applicationPID();
|
||||
return ProcessHandle(d->applicationPID());
|
||||
}
|
||||
|
||||
qint64 ApplicationLauncherPrivate::applicationPID() const
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "devicesupport/idevice.h"
|
||||
|
||||
#include <utils/outputformat.h>
|
||||
#include <utils/processhandle.h>
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
void start(const Runnable &runnable, const IDevice::ConstPtr &device);
|
||||
void stop();
|
||||
bool isRunning() const;
|
||||
qint64 applicationPID() const;
|
||||
Utils::ProcessHandle applicationPID() const;
|
||||
|
||||
QString errorString() const;
|
||||
QProcess::ProcessError processError() const;
|
||||
|
||||
@@ -88,7 +88,7 @@ void LocalApplicationRunControl::start()
|
||||
QString msg = tr("Starting %1...").arg(QDir::toNativeSeparators(r.executable)) + QLatin1Char('\n');
|
||||
appendMessage(msg, Utils::NormalMessageFormat);
|
||||
m_applicationLauncher.start(r);
|
||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||
setApplicationProcessHandle(m_applicationLauncher.applicationPID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ LocalApplicationRunControl::StopResult LocalApplicationRunControl::stop()
|
||||
void LocalApplicationRunControl::processStarted()
|
||||
{
|
||||
// Console processes only know their pid after being started
|
||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||
setApplicationProcessHandle(m_applicationLauncher.applicationPID());
|
||||
bringApplicationToForeground();
|
||||
}
|
||||
|
||||
|
||||
@@ -786,7 +786,7 @@ void PythonRunControl::start()
|
||||
r.environment = m_environment;
|
||||
m_applicationLauncher.start(r);
|
||||
|
||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||
setApplicationProcessHandle(m_applicationLauncher.applicationPID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -804,7 +804,7 @@ void PythonRunControl::slotAppendMessage(const QString &err, Utils::OutputFormat
|
||||
void PythonRunControl::processStarted()
|
||||
{
|
||||
// Console processes only know their pid after being started
|
||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||
setApplicationProcessHandle(m_applicationLauncher.applicationPID());
|
||||
bringApplicationToForeground();
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ bool ValgrindProcess::isLocal() const
|
||||
|
||||
void ValgrindProcess::localProcessStarted()
|
||||
{
|
||||
m_pid = m_localProcess.applicationPID();
|
||||
m_pid = m_localProcess.applicationPID().pid();
|
||||
emit started();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user