forked from qt-creator/qt-creator
ProjectExplorer: Funnel environment fetching through device access
Easier nowadays. It's synchronous now, so conceptually worse, but 'env' is not worse than 'ls', and this is used regularly all over the place also for larger data sets without being a problem. Change-Id: I2c2b1db8c07ff5c128700d4a1deefd710967568a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include "linuxprocessinterface.h"
|
||||
#include "publickeydeploymentdialog.h"
|
||||
#include "remotelinux_constants.h"
|
||||
#include "remotelinuxenvironmentreader.h"
|
||||
#include "remotelinuxsignaloperation.h"
|
||||
#include "remotelinuxtr.h"
|
||||
#include "sshprocessinterface.h"
|
||||
@@ -1043,31 +1042,6 @@ DeviceProcessSignalOperation::Ptr LinuxDevice::signalOperation() const
|
||||
return DeviceProcessSignalOperation::Ptr(new RemoteLinuxSignalOperation(sharedFromThis()));
|
||||
}
|
||||
|
||||
class LinuxDeviceEnvironmentFetcher : public DeviceEnvironmentFetcher
|
||||
{
|
||||
public:
|
||||
LinuxDeviceEnvironmentFetcher(const IDevice::ConstPtr &device)
|
||||
: m_reader(device)
|
||||
{
|
||||
connect(&m_reader, &Internal::RemoteLinuxEnvironmentReader::finished,
|
||||
this, &LinuxDeviceEnvironmentFetcher::readerFinished);
|
||||
connect(&m_reader, &Internal::RemoteLinuxEnvironmentReader::error,
|
||||
this, &LinuxDeviceEnvironmentFetcher::readerError);
|
||||
}
|
||||
|
||||
private:
|
||||
void start() override { m_reader.start(); }
|
||||
void readerFinished() { emit finished(m_reader.remoteEnvironment(), true); }
|
||||
void readerError() { emit finished(Environment(), false); }
|
||||
|
||||
Internal::RemoteLinuxEnvironmentReader m_reader;
|
||||
};
|
||||
|
||||
DeviceEnvironmentFetcher::Ptr LinuxDevice::environmentFetcher() const
|
||||
{
|
||||
return DeviceEnvironmentFetcher::Ptr(new LinuxDeviceEnvironmentFetcher(sharedFromThis()));
|
||||
}
|
||||
|
||||
bool LinuxDevice::usableAsBuildDevice() const
|
||||
{
|
||||
return true;
|
||||
@@ -1097,11 +1071,6 @@ ProcessInterface *LinuxDevice::createProcessInterface() const
|
||||
return new LinuxProcessInterface(this);
|
||||
}
|
||||
|
||||
Environment LinuxDevice::systemEnvironment() const
|
||||
{
|
||||
return {}; // FIXME. See e.g. Docker implementation.
|
||||
}
|
||||
|
||||
LinuxDevicePrivate::LinuxDevicePrivate(LinuxDevice *parent)
|
||||
: q(parent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user