forked from qt-creator/qt-creator
Introduce the concept of a "device process".
Provide a QProcess-like abstraction that can be used
to implement processes running locally or on a remote
device. Objects of a concrete class implementing the functionality
are created by IDevice objects.
Current implementations are:
- Local execution (QProcess-based), provided via the DesktopDevice.
- Remote execution via SSH.
- A specialized case of the former for remote Linux systems (provided by
LinuxDevice).
The latter is already being used in a number of places. As a result, lots of
code dealing with details such as setting the remote environment could be
moved to a central location. These things are no longer the concern of whoever
is wishing to run a remote process.
Change-Id: I919260ee6e77a020ca47226a4a534e7b8398106f
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
@@ -91,15 +92,14 @@ void QnxDebugSupport::startExecution()
|
||||
if (m_useQmlDebugger)
|
||||
m_engine->startParameters().processArgs += QString::fromLocal8Bit(" -qmljsdebugger=port:%1,block").arg(m_qmlPort);
|
||||
|
||||
QString remoteCommandLine;
|
||||
QStringList arguments;
|
||||
if (m_useCppDebugger)
|
||||
remoteCommandLine = QString::fromLatin1("%1 %2 %3")
|
||||
.arg(commandPrefix(), executable()).arg(m_pdebugPort);
|
||||
arguments << QString::number(m_pdebugPort);
|
||||
else if (m_useQmlDebugger && !m_useCppDebugger)
|
||||
remoteCommandLine = QString::fromLatin1("%1 %2 %3")
|
||||
.arg(commandPrefix(), executable(), m_engine->startParameters().processArgs);
|
||||
|
||||
appRunner()->start(device(), remoteCommandLine.toUtf8());
|
||||
arguments = Utils::QtcProcess::splitArgs(m_engine->startParameters().processArgs);
|
||||
appRunner()->setEnvironment(environment());
|
||||
appRunner()->setWorkingDirectory(workingDirectory());
|
||||
appRunner()->start(device(), executable(), arguments);
|
||||
}
|
||||
|
||||
void QnxDebugSupport::handleRemoteProcessStarted()
|
||||
|
||||
Reference in New Issue
Block a user