forked from qt-creator/qt-creator
Add isRemoteRunning() as isRunning() only apply to local processes
Change-Id: I75d726cea160c557374051db3ba413d3dd1a41a2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -87,6 +87,7 @@ public:
|
||||
void bringToForeground();
|
||||
qint64 applicationPID() const;
|
||||
bool isRunning() const;
|
||||
bool isRemoteRunning() const;
|
||||
|
||||
// Remote
|
||||
void doReportError(const QString &message);
|
||||
@@ -220,6 +221,11 @@ bool ApplicationLauncher::isRunning() const
|
||||
return d->isRunning();
|
||||
}
|
||||
|
||||
bool ApplicationLauncher::isRemoteRunning() const
|
||||
{
|
||||
return d->isRemoteRunning();
|
||||
}
|
||||
|
||||
bool ApplicationLauncherPrivate::isRunning() const
|
||||
{
|
||||
if (m_currentMode == ApplicationLauncher::Gui)
|
||||
@@ -227,6 +233,11 @@ bool ApplicationLauncherPrivate::isRunning() const
|
||||
return m_consoleProcess.isRunning();
|
||||
}
|
||||
|
||||
bool ApplicationLauncherPrivate::isRemoteRunning() const
|
||||
{
|
||||
return m_isLocal ? false : m_deviceProcess->state() == QProcess::Running;
|
||||
}
|
||||
|
||||
ProcessHandle ApplicationLauncher::applicationPID() const
|
||||
{
|
||||
return ProcessHandle(d->applicationPID());
|
||||
|
@@ -61,6 +61,7 @@ public:
|
||||
void stop();
|
||||
bool isRunning() const;
|
||||
Utils::ProcessHandle applicationPID() const;
|
||||
bool isRemoteRunning() const;
|
||||
|
||||
QString errorString() const;
|
||||
QProcess::ProcessError processError() const;
|
||||
|
Reference in New Issue
Block a user