forked from qt-creator/qt-creator
RemoteLinux: Fix fetching of remote environment
A QLatin1String isn't a StandardRunnable.
This fixes a regression introduced in 58be2708a
.
Change-Id: I6b3bb337227631011a6bc26c938945bb0e912e62
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -80,7 +80,11 @@ SshDeviceProcess::~SshDeviceProcess()
|
|||||||
void SshDeviceProcess::start(const Runnable &runnable)
|
void SshDeviceProcess::start(const Runnable &runnable)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->state == SshDeviceProcessPrivate::Inactive, return);
|
QTC_ASSERT(d->state == SshDeviceProcessPrivate::Inactive, return);
|
||||||
QTC_ASSERT(runnable.is<StandardRunnable>(), return);
|
if (!runnable.is<StandardRunnable>()) {
|
||||||
|
d->errorMessage = tr("Internal error");
|
||||||
|
error(QProcess::FailedToStart);
|
||||||
|
return;
|
||||||
|
}
|
||||||
d->setState(SshDeviceProcessPrivate::Connecting);
|
d->setState(SshDeviceProcessPrivate::Connecting);
|
||||||
|
|
||||||
d->errorMessage.clear();
|
d->errorMessage.clear();
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
#include <projectexplorer/runnables.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
@@ -58,7 +59,9 @@ void RemoteLinuxEnvironmentReader::start()
|
|||||||
this, &RemoteLinuxEnvironmentReader::handleError);
|
this, &RemoteLinuxEnvironmentReader::handleError);
|
||||||
connect(m_deviceProcess, &DeviceProcess::finished,
|
connect(m_deviceProcess, &DeviceProcess::finished,
|
||||||
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
||||||
m_deviceProcess->start(QLatin1String("env"));
|
StandardRunnable runnable;
|
||||||
|
runnable.executable = QLatin1String("env");
|
||||||
|
m_deviceProcess->start(runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxEnvironmentReader::stop()
|
void RemoteLinuxEnvironmentReader::stop()
|
||||||
|
Reference in New Issue
Block a user