forked from qt-creator/qt-creator
QtcProcess: Prepare for implementation some remote functions
Change-Id: I3c3d7d2288b5b607a2c3e933806e2e922c04610f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -70,6 +70,8 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
|
static std::function<void(QtcProcess &)> s_remoteRunProcessHook;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Utils::QtcProcess
|
\class Utils::QtcProcess
|
||||||
|
|
||||||
@@ -704,6 +706,12 @@ void QtcProcess::setUseCtrlCStub(bool enabled)
|
|||||||
|
|
||||||
void QtcProcess::start()
|
void QtcProcess::start()
|
||||||
{
|
{
|
||||||
|
if (m_commandLine.executable().needsDevice()) {
|
||||||
|
QTC_ASSERT(s_remoteRunProcessHook, return);
|
||||||
|
s_remoteRunProcessHook(*this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Environment env;
|
Environment env;
|
||||||
const OsType osType = HostOsInfo::hostOs();
|
const OsType osType = HostOsInfo::hostOs();
|
||||||
if (m_haveEnv) {
|
if (m_haveEnv) {
|
||||||
@@ -1230,6 +1238,11 @@ QString QtcProcess::expandMacros(const QString &str, AbstractMacroExpander *mx,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtcProcess::setRemoteStartProcessHook(const std::function<void(QtcProcess &)> &hook)
|
||||||
|
{
|
||||||
|
s_remoteRunProcessHook = hook;
|
||||||
|
}
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
void QtcProcess::setupChildProcess()
|
void QtcProcess::setupChildProcess()
|
||||||
{
|
{
|
||||||
|
@@ -141,6 +141,11 @@ public:
|
|||||||
ArgIterator m_ait;
|
ArgIterator m_ait;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const CommandLine &commandLine() const { return m_commandLine; }
|
||||||
|
const Environment &environment() const { return m_environment; }
|
||||||
|
|
||||||
|
static void setRemoteStartProcessHook(const std::function<void (QtcProcess &)> &hook);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
void setupChildProcess() override;
|
void setupChildProcess() override;
|
||||||
|
Reference in New Issue
Block a user