forked from qt-creator/qt-creator
remotelinux: rename LinuxDeviceConfiguration to LinuxDevice
Change-Id: I7e8a99d3339d2040a23e4e78816b13b57197dcdb Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -29,7 +29,6 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "hostutils.h"
|
#include "hostutils.h"
|
||||||
#include "breakpoint.h"
|
|
||||||
|
|
||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
|
|
||||||
|
@@ -64,11 +64,11 @@ MaddeDevice::MaddeDevice()
|
|||||||
|
|
||||||
MaddeDevice::MaddeDevice(const QString &name, Core::Id type, MachineType machineType,
|
MaddeDevice::MaddeDevice(const QString &name, Core::Id type, MachineType machineType,
|
||||||
Origin origin, Core::Id id)
|
Origin origin, Core::Id id)
|
||||||
: LinuxDeviceConfiguration(name, type, machineType, origin, id)
|
: LinuxDevice(name, type, machineType, origin, id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
MaddeDevice::MaddeDevice(const MaddeDevice &other) : LinuxDeviceConfiguration(other)
|
MaddeDevice::MaddeDevice(const MaddeDevice &other) : LinuxDevice(other)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,14 +31,14 @@
|
|||||||
#ifndef MADDEDEVICE_H
|
#ifndef MADDEDEVICE_H
|
||||||
#define MADDEDEVICE_H
|
#define MADDEDEVICE_H
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class MaddeDevice : public RemoteLinux::LinuxDeviceConfiguration
|
class MaddeDevice : public RemoteLinux::LinuxDevice
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(Madde::Internal::MaddeDevice)
|
Q_DECLARE_TR_FUNCTIONS(Madde::Internal::MaddeDevice)
|
||||||
public:
|
public:
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include "maemoconstants.h"
|
#include "maemoconstants.h"
|
||||||
#include "maemoglobal.h"
|
#include "maemoglobal.h"
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
#include <remotelinux/abstractremotelinuxdeployservice.h>
|
#include <remotelinux/abstractremotelinuxdeployservice.h>
|
||||||
#include <remotelinux/deployablefile.h>
|
#include <remotelinux/deployablefile.h>
|
||||||
#include <remotelinux/deploymentinfo.h>
|
#include <remotelinux/deploymentinfo.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
|
@@ -572,15 +572,15 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
|
|||||||
freePortsSpec = QLatin1String("10000-10100");
|
freePortsSpec = QLatin1String("10000-10100");
|
||||||
doTest = true;
|
doTest = true;
|
||||||
}
|
}
|
||||||
const MaddeDevice::Ptr devConf = MaddeDevice::create(d->wizardData.configName,
|
const MaddeDevice::Ptr device = MaddeDevice::create(d->wizardData.configName,
|
||||||
d->wizardData.deviceType, d->wizardData.machineType);
|
d->wizardData.deviceType, d->wizardData.machineType);
|
||||||
devConf->setFreePorts(PortList::fromString(freePortsSpec));
|
device->setFreePorts(PortList::fromString(freePortsSpec));
|
||||||
devConf->setSshParameters(sshParams);
|
device->setSshParameters(sshParams);
|
||||||
if (doTest) {
|
if (doTest) {
|
||||||
LinuxDeviceTestDialog dlg(devConf, new MaddeDeviceTester(this), this);
|
LinuxDeviceTestDialog dlg(device, new MaddeDeviceTester(this), this);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
return devConf;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MaemoDeviceConfigWizard::nextId() const
|
int MaemoDeviceConfigWizard::nextId() const
|
||||||
|
@@ -146,18 +146,18 @@ QString MaemoGlobal::remoteSourceProfilesCommand()
|
|||||||
|
|
||||||
Utils::PortList MaemoGlobal::freePorts(const Profile *profile)
|
Utils::PortList MaemoGlobal::freePorts(const Profile *profile)
|
||||||
{
|
{
|
||||||
IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
|
IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
||||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(profile);
|
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(profile);
|
||||||
|
|
||||||
if (!devConf || !qtVersion)
|
if (!device || !qtVersion)
|
||||||
return Utils::PortList();
|
return Utils::PortList();
|
||||||
if (devConf->machineType() == IDevice::Emulator) {
|
if (device->machineType() == IDevice::Emulator) {
|
||||||
MaemoQemuRuntime rt;
|
MaemoQemuRuntime rt;
|
||||||
const int id = qtVersion->uniqueId();
|
const int id = qtVersion->uniqueId();
|
||||||
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
|
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
|
||||||
return rt.m_freePorts;
|
return rt.m_freePorts;
|
||||||
}
|
}
|
||||||
return devConf->freePorts();
|
return device->freePorts();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MaemoGlobal::maddeRoot(const QString &qmakePath)
|
QString MaemoGlobal::maddeRoot(const QString &qmakePath)
|
||||||
|
@@ -51,13 +51,13 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
|
|||||||
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
||||||
|
|
||||||
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
|
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
|
||||||
const IDevice::ConstPtr &devConf,
|
const IDevice::ConstPtr &device,
|
||||||
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
||||||
{
|
{
|
||||||
Q_ASSERT(connection->state() == SshConnection::Connected);
|
Q_ASSERT(connection->state() == SshConnection::Connected);
|
||||||
Q_ASSERT(!m_isCopying);
|
Q_ASSERT(!m_isCopying);
|
||||||
|
|
||||||
m_devConf = devConf;
|
m_devConf = device;
|
||||||
m_deployables = deployables;
|
m_deployables = deployables;
|
||||||
m_mountPoint = mountPoint;
|
m_mountPoint = mountPoint;
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ public:
|
|||||||
~MaemoRemoteCopyFacility();
|
~MaemoRemoteCopyFacility();
|
||||||
|
|
||||||
void copyFiles(QSsh::SshConnection *connection,
|
void copyFiles(QSsh::SshConnection *connection,
|
||||||
const ProjectExplorer::IDevice::ConstPtr &devConf,
|
const ProjectExplorer::IDevice::ConstPtr &device,
|
||||||
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
|
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|
||||||
|
@@ -42,8 +42,8 @@ enum State { Inactive, Listing, Killing };
|
|||||||
class DeviceProcessListPrivate
|
class DeviceProcessListPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeviceProcessListPrivate(const IDevice::ConstPtr &devConf)
|
DeviceProcessListPrivate(const IDevice::ConstPtr &device)
|
||||||
: device(devConf),
|
: device(device),
|
||||||
state(Inactive)
|
state(Inactive)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -58,8 +58,8 @@ public:
|
|||||||
|
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent)
|
DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent)
|
||||||
: QAbstractTableModel(parent), d(new DeviceProcessListPrivate(devConfig))
|
: QAbstractTableModel(parent), d(new DeviceProcessListPrivate(device))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessList : public QAbstractTableModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent = 0);
|
DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
|
||||||
~DeviceProcessList();
|
~DeviceProcessList();
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
|
@@ -67,11 +67,11 @@ DeviceUsedPortsGatherer::~DeviceUsedPortsGatherer()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &devConf)
|
void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!d->connection, return);
|
QTC_ASSERT(!d->connection, return);
|
||||||
d->portsToCheck = devConf->freePorts();
|
d->portsToCheck = device->freePorts();
|
||||||
d->connection = SshConnectionManager::instance().acquireConnection(devConf->sshParameters());
|
d->connection = SshConnectionManager::instance().acquireConnection(device->sshParameters());
|
||||||
connect(d->connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
connect(d->connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
||||||
if (d->connection->state() == SshConnection::Connected) {
|
if (d->connection->state() == SshConnection::Connected) {
|
||||||
handleConnectionEstablished();
|
handleConnectionEstablished();
|
||||||
|
@@ -45,7 +45,7 @@ public:
|
|||||||
DeviceUsedPortsGatherer(QObject *parent = 0);
|
DeviceUsedPortsGatherer(QObject *parent = 0);
|
||||||
~DeviceUsedPortsGatherer();
|
~DeviceUsedPortsGatherer();
|
||||||
|
|
||||||
void start(const ProjectExplorer::IDevice::ConstPtr &devConf);
|
void start(const ProjectExplorer::IDevice::ConstPtr &device);
|
||||||
void stop();
|
void stop();
|
||||||
int getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
|
int getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
|
||||||
QList<int> usedPorts() const;
|
QList<int> usedPorts() const;
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
#include <projectexplorer/applicationrunconfiguration.h>
|
#include <projectexplorer/applicationrunconfiguration.h>
|
||||||
|
|
||||||
#include <remotelinux/remotelinuxrunconfiguration.h>
|
#include <remotelinux/remotelinuxrunconfiguration.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
@@ -43,19 +43,19 @@ using namespace Qnx::Internal;
|
|||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
|
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
|
||||||
: RemoteLinux::LinuxDeviceConfiguration()
|
: RemoteLinux::LinuxDevice()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
|
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
|
||||||
IDevice::MachineType machineType,
|
IDevice::MachineType machineType,
|
||||||
IDevice::Origin origin, Core::Id id)
|
IDevice::Origin origin, Core::Id id)
|
||||||
: RemoteLinux::LinuxDeviceConfiguration(name, type, machineType, origin, id)
|
: RemoteLinux::LinuxDevice(name, type, machineType, origin, id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const BlackBerryDeviceConfiguration &other)
|
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const BlackBerryDeviceConfiguration &other)
|
||||||
: RemoteLinux::LinuxDeviceConfiguration(other)
|
: RemoteLinux::LinuxDevice(other)
|
||||||
, m_debugToken(other.m_debugToken)
|
, m_debugToken(other.m_debugToken)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ void BlackBerryDeviceConfiguration::setDebugToken(const QString &debugToken)
|
|||||||
|
|
||||||
void BlackBerryDeviceConfiguration::fromMap(const QVariantMap &map)
|
void BlackBerryDeviceConfiguration::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
RemoteLinux::LinuxDeviceConfiguration::fromMap(map);
|
RemoteLinux::LinuxDevice::fromMap(map);
|
||||||
m_debugToken = map.value(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY)).toString();
|
m_debugToken = map.value(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY)).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ void BlackBerryDeviceConfiguration::executeAction(Core::Id actionId, QWidget *pa
|
|||||||
|
|
||||||
QVariantMap BlackBerryDeviceConfiguration::toMap() const
|
QVariantMap BlackBerryDeviceConfiguration::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map = RemoteLinux::LinuxDeviceConfiguration::toMap();
|
QVariantMap map = RemoteLinux::LinuxDevice::toMap();
|
||||||
map.insert(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY), m_debugToken);
|
map.insert(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY), m_debugToken);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
|
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
|
||||||
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
|
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class Profile;
|
class Profile;
|
||||||
@@ -43,7 +43,7 @@ class Profile;
|
|||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class BlackBerryDeviceConfiguration : public RemoteLinux::LinuxDeviceConfiguration
|
class BlackBerryDeviceConfiguration : public RemoteLinux::LinuxDevice
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryDeviceConfiguration)
|
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryDeviceConfiguration)
|
||||||
public:
|
public:
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
|
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
|
||||||
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
|
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QWizardPage>
|
#include <QWizardPage>
|
||||||
|
|
||||||
|
@@ -37,17 +37,17 @@ using namespace Qnx;
|
|||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
QnxDeviceConfiguration::QnxDeviceConfiguration()
|
QnxDeviceConfiguration::QnxDeviceConfiguration()
|
||||||
: RemoteLinux::LinuxDeviceConfiguration()
|
: RemoteLinux::LinuxDevice()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QnxDeviceConfiguration::QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
QnxDeviceConfiguration::QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
||||||
: RemoteLinux::LinuxDeviceConfiguration(name, type, machineType, origin, id)
|
: RemoteLinux::LinuxDevice(name, type, machineType, origin, id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QnxDeviceConfiguration::QnxDeviceConfiguration(const QnxDeviceConfiguration &other)
|
QnxDeviceConfiguration::QnxDeviceConfiguration(const QnxDeviceConfiguration &other)
|
||||||
: RemoteLinux::LinuxDeviceConfiguration(other)
|
: RemoteLinux::LinuxDevice(other)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,14 +34,15 @@
|
|||||||
#ifndef QNX_INTERNAL_QNXDEVICECONFIGURATION_H
|
#ifndef QNX_INTERNAL_QNXDEVICECONFIGURATION_H
|
||||||
#define QNX_INTERNAL_QNXDEVICECONFIGURATION_H
|
#define QNX_INTERNAL_QNXDEVICECONFIGURATION_H
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
|
|
||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QnxDeviceConfiguration : public RemoteLinux::LinuxDeviceConfiguration
|
class QnxDeviceConfiguration : public RemoteLinux::LinuxDevice
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDeviceConfiguration)
|
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDeviceConfiguration)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<QnxDeviceConfiguration> Ptr;
|
typedef QSharedPointer<QnxDeviceConfiguration> Ptr;
|
||||||
typedef QSharedPointer<const QnxDeviceConfiguration> ConstPtr;
|
typedef QSharedPointer<const QnxDeviceConfiguration> ConstPtr;
|
||||||
@@ -53,7 +54,6 @@ public:
|
|||||||
|
|
||||||
QString displayType() const;
|
QString displayType() const;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QnxDeviceConfiguration();
|
QnxDeviceConfiguration();
|
||||||
QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
|
QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
|
||||||
|
@@ -75,16 +75,16 @@ IDevice::Ptr QnxDeviceConfigurationWizard::device()
|
|||||||
sshParams.privateKeyFile = m_setupPage->privateKeyFilePath();
|
sshParams.privateKeyFile = m_setupPage->privateKeyFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
QnxDeviceConfiguration::Ptr devConf = QnxDeviceConfiguration::create(m_setupPage->configurationName(),
|
QnxDeviceConfiguration::Ptr device = QnxDeviceConfiguration::create(m_setupPage->configurationName(),
|
||||||
Core::Id(Constants::QNX_QNX_OS_TYPE), IDevice::Hardware);
|
Core::Id(Constants::QNX_QNX_OS_TYPE), IDevice::Hardware);
|
||||||
devConf->setSshParameters(sshParams);
|
device->setSshParameters(sshParams);
|
||||||
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
||||||
|
|
||||||
RemoteLinux::GenericLinuxDeviceTester *devTester = new RemoteLinux::GenericLinuxDeviceTester(this);
|
RemoteLinux::GenericLinuxDeviceTester *devTester = new RemoteLinux::GenericLinuxDeviceTester(this);
|
||||||
devTester->usedPortsGatherer()->setCommand(QLatin1String(Constants::QNX_PORT_GATHERER_COMMAND));
|
devTester->usedPortsGatherer()->setCommand(QLatin1String(Constants::QNX_PORT_GATHERER_COMMAND));
|
||||||
|
|
||||||
RemoteLinux::LinuxDeviceTestDialog dlg(devConf, devTester, this);
|
RemoteLinux::LinuxDeviceTestDialog dlg(device, devTester, this);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
|
|
||||||
return devConf;
|
return device;
|
||||||
}
|
}
|
||||||
|
@@ -62,8 +62,8 @@ DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConf
|
|||||||
Target *target = runConfig->target();
|
Target *target = runConfig->target();
|
||||||
Profile *profile = target->profile();
|
Profile *profile = target->profile();
|
||||||
|
|
||||||
const IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
|
const IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
||||||
if (devConf.isNull())
|
if (device.isNull())
|
||||||
return params;
|
return params;
|
||||||
|
|
||||||
params.startMode = AttachToRemoteServer;
|
params.startMode = AttachToRemoteServer;
|
||||||
@@ -75,7 +75,7 @@ DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConf
|
|||||||
|
|
||||||
params.symbolFileName = runConfig->localExecutableFilePath();
|
params.symbolFileName = runConfig->localExecutableFilePath();
|
||||||
params.remoteExecutable = runConfig->remoteExecutableFilePath();
|
params.remoteExecutable = runConfig->remoteExecutableFilePath();
|
||||||
params.remoteChannel = devConf->sshParameters().host + QLatin1String(":-1");
|
params.remoteChannel = device->sshParameters().host + QLatin1String(":-1");
|
||||||
params.displayName = runConfig->displayName();
|
params.displayName = runConfig->displayName();
|
||||||
params.remoteSetupNeeded = true;
|
params.remoteSetupNeeded = true;
|
||||||
params.closeMode = DetachAtClose;
|
params.closeMode = DetachAtClose;
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "abstractremotelinuxdeployservice.h"
|
#include "abstractremotelinuxdeployservice.h"
|
||||||
|
|
||||||
#include "deployablefile.h"
|
#include "deployablefile.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "abstractuploadandinstallpackageservice.h"
|
#include "abstractuploadandinstallpackageservice.h"
|
||||||
|
|
||||||
#include "deployablefile.h"
|
#include "deployablefile.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "packageuploader.h"
|
#include "packageuploader.h"
|
||||||
#include "remotelinuxpackageinstaller.h"
|
#include "remotelinuxpackageinstaller.h"
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "genericlinuxdeviceconfigurationfactory.h"
|
#include "genericlinuxdeviceconfigurationfactory.h"
|
||||||
|
|
||||||
#include "genericlinuxdeviceconfigurationwizard.h"
|
#include "genericlinuxdeviceconfigurationwizard.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdevice.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -72,7 +72,7 @@ bool GenericLinuxDeviceConfigurationFactory::canRestore(const QVariantMap &map)
|
|||||||
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::restore(const QVariantMap &map) const
|
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::restore(const QVariantMap &map) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(canRestore(map), return IDevice::Ptr());
|
QTC_ASSERT(canRestore(map), return IDevice::Ptr());
|
||||||
const IDevice::Ptr device = LinuxDeviceConfiguration::create();
|
const IDevice::Ptr device = LinuxDevice::create();
|
||||||
device->fromMap(map);
|
device->fromMap(map);
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
@@ -26,13 +26,15 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "genericlinuxdeviceconfigurationwizard.h"
|
#include "genericlinuxdeviceconfigurationwizard.h"
|
||||||
|
|
||||||
#include "genericlinuxdeviceconfigurationwizardpages.h"
|
#include "genericlinuxdeviceconfigurationwizardpages.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdevice.h"
|
||||||
#include "linuxdevicetestdialog.h"
|
#include "linuxdevicetestdialog.h"
|
||||||
#include "linuxdevicetester.h"
|
#include "linuxdevicetester.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
|
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
@@ -84,13 +86,13 @@ IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
|
|||||||
sshParams.password = d->setupPage.password();
|
sshParams.password = d->setupPage.password();
|
||||||
else
|
else
|
||||||
sshParams.privateKeyFile = d->setupPage.privateKeyFilePath();
|
sshParams.privateKeyFile = d->setupPage.privateKeyFilePath();
|
||||||
IDevice::Ptr devConf = LinuxDeviceConfiguration::create(d->setupPage.configurationName(),
|
IDevice::Ptr device = LinuxDevice::create(d->setupPage.configurationName(),
|
||||||
Core::Id(Constants::GenericLinuxOsType), IDevice::Hardware);
|
Core::Id(Constants::GenericLinuxOsType), IDevice::Hardware);
|
||||||
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
||||||
devConf->setSshParameters(sshParams);
|
device->setSshParameters(sshParams);
|
||||||
LinuxDeviceTestDialog dlg(devConf, new GenericLinuxDeviceTester(this), this);
|
LinuxDeviceTestDialog dlg(device, new GenericLinuxDeviceTester(this), this);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
return devConf;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
@@ -26,10 +26,11 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "genericlinuxdeviceconfigurationwizardpages.h"
|
#include "genericlinuxdeviceconfigurationwizardpages.h"
|
||||||
#include "ui_genericlinuxdeviceconfigurationwizardsetuppage.h"
|
#include "ui_genericlinuxdeviceconfigurationwizardsetuppage.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdevice.h"
|
||||||
|
|
||||||
#include "genericlinuxdeviceconfigurationwidget.h"
|
#include "genericlinuxdeviceconfigurationwidget.h"
|
||||||
#include "linuxdevicetestdialog.h"
|
#include "linuxdevicetestdialog.h"
|
||||||
@@ -54,30 +54,30 @@ static QString visualizeNull(QString s)
|
|||||||
return s.replace(QLatin1Char('\0'), QLatin1String("<null>"));
|
return s.replace(QLatin1Char('\0'), QLatin1String("<null>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::Ptr LinuxDeviceConfiguration::create(const QString &name,
|
LinuxDevice::Ptr LinuxDevice::create(const QString &name,
|
||||||
Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
||||||
{
|
{
|
||||||
return Ptr(new LinuxDeviceConfiguration(name, type, machineType, origin, id));
|
return Ptr(new LinuxDevice(name, type, machineType, origin, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LinuxDeviceConfiguration::displayType() const
|
QString LinuxDevice::displayType() const
|
||||||
{
|
{
|
||||||
return tr("Generic Linux");
|
return tr("Generic Linux");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDeviceWidget *LinuxDeviceConfiguration::createWidget()
|
ProjectExplorer::IDeviceWidget *LinuxDevice::createWidget()
|
||||||
{
|
{
|
||||||
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Core::Id> LinuxDeviceConfiguration::actionIds() const
|
QList<Core::Id> LinuxDevice::actionIds() const
|
||||||
{
|
{
|
||||||
return QList<Core::Id>() << Core::Id(Constants::GenericTestDeviceActionId)
|
return QList<Core::Id>() << Core::Id(Constants::GenericTestDeviceActionId)
|
||||||
<< Core::Id(Constants::GenericDeployKeyToDeviceActionId)
|
<< Core::Id(Constants::GenericDeployKeyToDeviceActionId)
|
||||||
<< Core::Id(Constants::GenericRemoteProcessesActionId);
|
<< Core::Id(Constants::GenericRemoteProcessesActionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LinuxDeviceConfiguration::displayNameForActionId(Core::Id actionId) const
|
QString LinuxDevice::displayNameForActionId(Core::Id actionId) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(actionIds().contains(actionId), return QString());
|
QTC_ASSERT(actionIds().contains(actionId), return QString());
|
||||||
|
|
||||||
@@ -90,13 +90,12 @@ QString LinuxDeviceConfiguration::displayNameForActionId(Core::Id actionId) cons
|
|||||||
return QString(); // Can't happen.
|
return QString(); // Can't happen.
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinuxDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent) const
|
void LinuxDevice::executeAction(Core::Id actionId, QWidget *parent) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(actionIds().contains(actionId), return);
|
QTC_ASSERT(actionIds().contains(actionId), return);
|
||||||
|
|
||||||
QDialog *d = 0;
|
QDialog *d = 0;
|
||||||
const LinuxDeviceConfiguration::ConstPtr device
|
const LinuxDevice::ConstPtr device = sharedFromThis().staticCast<const LinuxDevice>();
|
||||||
= sharedFromThis().staticCast<const LinuxDeviceConfiguration>();
|
|
||||||
if (actionId == Core::Id(Constants::GenericTestDeviceActionId))
|
if (actionId == Core::Id(Constants::GenericTestDeviceActionId))
|
||||||
d = new LinuxDeviceTestDialog(device, new GenericLinuxDeviceTester, parent);
|
d = new LinuxDeviceTestDialog(device, new GenericLinuxDeviceTester, parent);
|
||||||
else if (actionId == Core::Id(Constants::GenericRemoteProcessesActionId))
|
else if (actionId == Core::Id(Constants::GenericRemoteProcessesActionId))
|
||||||
@@ -107,29 +106,29 @@ void LinuxDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent)
|
|||||||
d->exec();
|
d->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::LinuxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
|
LinuxDevice::LinuxDevice(const QString &name, Core::Id type, MachineType machineType,
|
||||||
Origin origin, Core::Id id)
|
Origin origin, Core::Id id)
|
||||||
: IDevice(type, origin, machineType, id)
|
: IDevice(type, origin, machineType, id)
|
||||||
{
|
{
|
||||||
setDisplayName(name);
|
setDisplayName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::LinuxDeviceConfiguration(const LinuxDeviceConfiguration &other)
|
LinuxDevice::LinuxDevice(const LinuxDevice &other)
|
||||||
: IDevice(other)
|
: IDevice(other)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::Ptr LinuxDeviceConfiguration::create()
|
LinuxDevice::Ptr LinuxDevice::create()
|
||||||
{
|
{
|
||||||
return Ptr(new LinuxDeviceConfiguration);
|
return Ptr(new LinuxDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDevice::Ptr LinuxDeviceConfiguration::clone() const
|
ProjectExplorer::IDevice::Ptr LinuxDevice::clone() const
|
||||||
{
|
{
|
||||||
return Ptr(new LinuxDeviceConfiguration(*this));
|
return Ptr(new LinuxDevice(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LinuxDeviceConfiguration::listProcessesCommandLine() const
|
QString LinuxDevice::listProcessesCommandLine() const
|
||||||
{
|
{
|
||||||
return QString::fromLatin1(
|
return QString::fromLatin1(
|
||||||
"for dir in `ls -d /proc/[0123456789]*`; do "
|
"for dir in `ls -d /proc/[0123456789]*`; do "
|
||||||
@@ -142,12 +141,12 @@ QString LinuxDeviceConfiguration::listProcessesCommandLine() const
|
|||||||
"done").arg(Delimiter0).arg(Delimiter1);
|
"done").arg(Delimiter0).arg(Delimiter1);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LinuxDeviceConfiguration::killProcessCommandLine(const DeviceProcess &process) const
|
QString LinuxDevice::killProcessCommandLine(const DeviceProcess &process) const
|
||||||
{
|
{
|
||||||
return QLatin1String("kill -9 ") + QString::number(process.pid);
|
return QLatin1String("kill -9 ") + QString::number(process.pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<DeviceProcess> LinuxDeviceConfiguration::buildProcessList(const QString &listProcessesReply) const
|
QList<DeviceProcess> LinuxDevice::buildProcessList(const QString &listProcessesReply) const
|
||||||
{
|
{
|
||||||
QList<DeviceProcess> processes;
|
QList<DeviceProcess> processes;
|
||||||
const QStringList lines = listProcessesReply.split(QString::fromLatin1(Delimiter0)
|
const QStringList lines = listProcessesReply.split(QString::fromLatin1(Delimiter0)
|
@@ -27,6 +27,7 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef LINUXDEVICECONFIGURATION_H
|
#ifndef LINUXDEVICECONFIGURATION_H
|
||||||
#define LINUXDEVICECONFIGURATION_H
|
#define LINUXDEVICECONFIGURATION_H
|
||||||
|
|
||||||
@@ -40,15 +41,15 @@ namespace QSsh { class SshConnectionParameters; }
|
|||||||
namespace Utils { class PortList; }
|
namespace Utils { class PortList; }
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal { class LinuxDeviceConfigurationPrivate; }
|
namespace Internal { class LinuxDevicePrivate; }
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT LinuxDeviceConfiguration : public ProjectExplorer::IDevice
|
class REMOTELINUX_EXPORT LinuxDevice : public ProjectExplorer::IDevice
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::LinuxDeviceConfiguration)
|
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::LinuxDevice)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<LinuxDeviceConfiguration> Ptr;
|
typedef QSharedPointer<LinuxDevice> Ptr;
|
||||||
typedef QSharedPointer<const LinuxDeviceConfiguration> ConstPtr;
|
typedef QSharedPointer<const LinuxDevice> ConstPtr;
|
||||||
|
|
||||||
static Ptr create();
|
static Ptr create();
|
||||||
static Ptr create(const QString &name, Core::Id type, MachineType machineType,
|
static Ptr create(const QString &name, Core::Id type, MachineType machineType,
|
||||||
@@ -66,13 +67,13 @@ public:
|
|||||||
QList<ProjectExplorer::DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
|
QList<ProjectExplorer::DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LinuxDeviceConfiguration() {}
|
LinuxDevice() {}
|
||||||
LinuxDeviceConfiguration(const QString &name, Core::Id type,
|
LinuxDevice(const QString &name, Core::Id type,
|
||||||
MachineType machineType, Origin origin, Core::Id id);
|
MachineType machineType, Origin origin, Core::Id id);
|
||||||
LinuxDeviceConfiguration(const LinuxDeviceConfiguration &other);
|
LinuxDevice(const LinuxDevice &other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LinuxDeviceConfiguration &operator=(const LinuxDeviceConfiguration &);
|
LinuxDevice &operator=(const LinuxDevice &);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
@@ -10,7 +10,7 @@ HEADERS += \
|
|||||||
embeddedlinuxqtversionfactory.h \
|
embeddedlinuxqtversionfactory.h \
|
||||||
remotelinuxplugin.h \
|
remotelinuxplugin.h \
|
||||||
remotelinux_export.h \
|
remotelinux_export.h \
|
||||||
linuxdeviceconfiguration.h \
|
linuxdevice.h \
|
||||||
remotelinuxrunconfiguration.h \
|
remotelinuxrunconfiguration.h \
|
||||||
publickeydeploymentdialog.h \
|
publickeydeploymentdialog.h \
|
||||||
genericlinuxdeviceconfigurationwizard.h \
|
genericlinuxdeviceconfigurationwizard.h \
|
||||||
@@ -57,7 +57,7 @@ SOURCES += \
|
|||||||
embeddedlinuxqtversion.cpp \
|
embeddedlinuxqtversion.cpp \
|
||||||
embeddedlinuxqtversionfactory.cpp \
|
embeddedlinuxqtversionfactory.cpp \
|
||||||
remotelinuxplugin.cpp \
|
remotelinuxplugin.cpp \
|
||||||
linuxdeviceconfiguration.cpp \
|
linuxdevice.cpp \
|
||||||
remotelinuxrunconfiguration.cpp \
|
remotelinuxrunconfiguration.cpp \
|
||||||
publickeydeploymentdialog.cpp \
|
publickeydeploymentdialog.cpp \
|
||||||
genericlinuxdeviceconfigurationwizard.cpp \
|
genericlinuxdeviceconfigurationwizard.cpp \
|
||||||
|
@@ -53,8 +53,8 @@ QtcPlugin {
|
|||||||
"genericlinuxdeviceconfigurationwidget.ui",
|
"genericlinuxdeviceconfigurationwidget.ui",
|
||||||
"genericremotelinuxdeploystepfactory.cpp",
|
"genericremotelinuxdeploystepfactory.cpp",
|
||||||
"genericremotelinuxdeploystepfactory.h",
|
"genericremotelinuxdeploystepfactory.h",
|
||||||
"linuxdeviceconfiguration.cpp",
|
"linuxdevice.cpp",
|
||||||
"linuxdeviceconfiguration.h",
|
"linuxdevice.h",
|
||||||
"linuxdevicetestdialog.cpp",
|
"linuxdevicetestdialog.cpp",
|
||||||
"linuxdevicetestdialog.h",
|
"linuxdevicetestdialog.h",
|
||||||
"linuxdevicetester.cpp",
|
"linuxdevicetester.cpp",
|
||||||
|
@@ -27,15 +27,11 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "remotelinuxcheckforfreediskspaceservice.h"
|
#include "remotelinuxcheckforfreediskspaceservice.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
|
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
|
|
||||||
#include <QByteArray>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class RemoteLinuxCheckForFreeDiskSpaceServicePrivate
|
class RemoteLinuxCheckForFreeDiskSpaceServicePrivate
|
||||||
|
@@ -27,15 +27,12 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "remotelinuxcustomcommanddeployservice.h"
|
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "remotelinuxcustomcommanddeployservice.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
@@ -101,7 +101,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
|
|||||||
DebuggerStartParameters params;
|
DebuggerStartParameters params;
|
||||||
Target *target = runConfig->target();
|
Target *target = runConfig->target();
|
||||||
Profile *profile = target->profile();
|
Profile *profile = target->profile();
|
||||||
const IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
|
const IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
||||||
|
|
||||||
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
||||||
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
||||||
@@ -110,7 +110,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
|
|||||||
|
|
||||||
if (runConfig->debuggerAspect()->useQmlDebugger()) {
|
if (runConfig->debuggerAspect()->useQmlDebugger()) {
|
||||||
params.languages |= QmlLanguage;
|
params.languages |= QmlLanguage;
|
||||||
params.qmlServerAddress = devConf->sshParameters().host;
|
params.qmlServerAddress = device->sshParameters().host;
|
||||||
params.qmlServerPort = 0; // port is selected later on
|
params.qmlServerPort = 0; // port is selected later on
|
||||||
}
|
}
|
||||||
if (runConfig->debuggerAspect()->useCppDebugger()) {
|
if (runConfig->debuggerAspect()->useCppDebugger()) {
|
||||||
@@ -118,7 +118,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
|
|||||||
params.processArgs = runConfig->arguments();
|
params.processArgs = runConfig->arguments();
|
||||||
params.startMode = AttachToRemoteServer;
|
params.startMode = AttachToRemoteServer;
|
||||||
params.executable = runConfig->localExecutableFilePath();
|
params.executable = runConfig->localExecutableFilePath();
|
||||||
params.remoteChannel = devConf->sshParameters().host + QLatin1String(":-1");
|
params.remoteChannel = device->sshParameters().host + QLatin1String(":-1");
|
||||||
} else {
|
} else {
|
||||||
params.startMode = AttachToRemoteServer;
|
params.startMode = AttachToRemoteServer;
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "remotelinuxenvironmentreader.h"
|
#include "remotelinuxenvironmentreader.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdevice.h"
|
||||||
|
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
@@ -53,8 +53,8 @@ RemoteLinuxEnvironmentReader::RemoteLinuxEnvironmentReader(RunConfiguration *con
|
|||||||
|
|
||||||
void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
|
void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
|
||||||
{
|
{
|
||||||
IDevice::ConstPtr devConfig = DeviceProfileInformation::device(m_profile);
|
IDevice::ConstPtr device = DeviceProfileInformation::device(m_profile);
|
||||||
if (!devConfig)
|
if (!device)
|
||||||
return;
|
return;
|
||||||
m_stop = false;
|
m_stop = false;
|
||||||
if (!m_remoteProcessRunner)
|
if (!m_remoteProcessRunner)
|
||||||
@@ -63,7 +63,7 @@ void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
|
|||||||
connect(m_remoteProcessRunner, SIGNAL(processClosed(int)), SLOT(remoteProcessFinished(int)));
|
connect(m_remoteProcessRunner, SIGNAL(processClosed(int)), SLOT(remoteProcessFinished(int)));
|
||||||
const QByteArray remoteCall
|
const QByteArray remoteCall
|
||||||
= QString(environmentSetupCommand + QLatin1String("; env")).toUtf8();
|
= QString(environmentSetupCommand + QLatin1String("; env")).toUtf8();
|
||||||
m_remoteProcessRunner->run(remoteCall, devConfig->sshParameters());
|
m_remoteProcessRunner->run(remoteCall, device->sshParameters());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxEnvironmentReader::stop()
|
void RemoteLinuxEnvironmentReader::stop()
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
#include "remotelinuxrunconfiguration.h"
|
#include "remotelinuxrunconfiguration.h"
|
||||||
|
|
||||||
#include "deploymentinfo.h"
|
#include "deploymentinfo.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "remotelinuxdeployconfiguration.h"
|
#include "remotelinuxdeployconfiguration.h"
|
||||||
#include "remotelinuxrunconfigurationwidget.h"
|
#include "remotelinuxrunconfigurationwidget.h"
|
||||||
|
|
||||||
|
@@ -29,15 +29,9 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "remotelinuxutils.h"
|
#include "remotelinuxutils.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdevice.h"
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QList>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
using namespace ExtensionSystem;
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class LinuxDeviceConfiguration;
|
class LinuxDevice;
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxUtils
|
class REMOTELINUX_EXPORT RemoteLinuxUtils
|
||||||
{
|
{
|
||||||
|
@@ -66,11 +66,11 @@ QVariant TypeSpecificDeviceConfigurationListModel::data(const QModelIndex &index
|
|||||||
{
|
{
|
||||||
if (!index.isValid() || index.row() >= rowCount() || role != Qt::DisplayRole)
|
if (!index.isValid() || index.row() >= rowCount() || role != Qt::DisplayRole)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
const IDevice::ConstPtr &devConf = deviceAt(index.row());
|
const IDevice::ConstPtr &device = deviceAt(index.row());
|
||||||
Q_ASSERT(devConf);
|
Q_ASSERT(device);
|
||||||
QString displayedName = devConf->displayName();
|
QString displayedName = device->displayName();
|
||||||
if (deviceMatches(devConf)
|
if (deviceMatches(device)
|
||||||
&& DeviceManager::instance()->defaultDevice(devConf->type()) == devConf) {
|
&& DeviceManager::instance()->defaultDevice(device->type()) == device) {
|
||||||
displayedName = tr("%1 (default)").arg(displayedName);
|
displayedName = tr("%1 (default)").arg(displayedName);
|
||||||
}
|
}
|
||||||
return displayedName;
|
return displayedName;
|
||||||
@@ -106,9 +106,9 @@ IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::defaultDeviceConfig(
|
|||||||
|
|
||||||
IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::find(Core::Id id) const
|
IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::find(Core::Id id) const
|
||||||
{
|
{
|
||||||
const IDevice::ConstPtr &devConf = DeviceManager::instance()->find(id);
|
const IDevice::ConstPtr &device = DeviceManager::instance()->find(id);
|
||||||
if (deviceMatches(devConf))
|
if (deviceMatches(device))
|
||||||
return devConf;
|
return device;
|
||||||
return defaultDeviceConfig();
|
return defaultDeviceConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -33,7 +33,6 @@
|
|||||||
#include "valgrindtool.h"
|
#include "valgrindtool.h"
|
||||||
|
|
||||||
#include <remotelinux/remotelinuxrunconfiguration.h>
|
#include <remotelinux/remotelinuxrunconfiguration.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/applicationrunconfiguration.h>
|
#include <projectexplorer/applicationrunconfiguration.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
|
@@ -27,10 +27,11 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "devicemanagertest.h"
|
#include "devicemanagertest.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/linuxdevice.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -59,8 +60,8 @@ void DeviceManagerTest::run()
|
|||||||
|
|
||||||
std::cout << "Initial add." << std::endl;
|
std::cout << "Initial add." << std::endl;
|
||||||
m_currentId = m_currentUpdateId = Core::Id("id1");
|
m_currentId = m_currentUpdateId = Core::Id("id1");
|
||||||
LinuxDeviceConfiguration::Ptr device = LinuxDeviceConfiguration::create("blubb", "mytype",
|
LinuxDevice::Ptr device = LinuxDevice::create("blubb", "mytype",
|
||||||
LinuxDeviceConfiguration::Hardware, IDevice::AutoDetected, m_currentId);
|
LinuxDevice::Hardware, IDevice::AutoDetected, m_currentId);
|
||||||
devMgr->addDevice(device);
|
devMgr->addDevice(device);
|
||||||
DEV_MGR_CHECK(devMgr->deviceCount() == 1);
|
DEV_MGR_CHECK(devMgr->deviceCount() == 1);
|
||||||
DEV_MGR_CHECK(devMgr->defaultDevice("mytype") == device);
|
DEV_MGR_CHECK(devMgr->defaultDevice("mytype") == device);
|
||||||
@@ -72,8 +73,8 @@ void DeviceManagerTest::run()
|
|||||||
m_slotsCalled.clear();
|
m_slotsCalled.clear();
|
||||||
m_currentId = Core::Id("id2");
|
m_currentId = Core::Id("id2");
|
||||||
m_currentUpdateId = Core::Id("doesnotexist");
|
m_currentUpdateId = Core::Id("doesnotexist");
|
||||||
device = LinuxDeviceConfiguration::create("blubb", "mytype",
|
device = LinuxDevice::create("blubb", "mytype",
|
||||||
LinuxDeviceConfiguration::Hardware, IDevice::AutoDetected, m_currentId);
|
LinuxDevice::Hardware, IDevice::AutoDetected, m_currentId);
|
||||||
devMgr->addDevice(device);
|
devMgr->addDevice(device);
|
||||||
DEV_MGR_CHECK(devMgr->deviceCount() == 2);
|
DEV_MGR_CHECK(devMgr->deviceCount() == 2);
|
||||||
DEV_MGR_CHECK(devMgr->defaultDevice("mytype")->id() == Core::Id("id1"));
|
DEV_MGR_CHECK(devMgr->defaultDevice("mytype")->id() == Core::Id("id1"));
|
||||||
@@ -85,8 +86,8 @@ void DeviceManagerTest::run()
|
|||||||
std::cout << "Add with same id." << std::endl;
|
std::cout << "Add with same id." << std::endl;
|
||||||
m_slotsCalled.clear();
|
m_slotsCalled.clear();
|
||||||
m_currentId = m_currentUpdateId = Core::Id("id1");
|
m_currentId = m_currentUpdateId = Core::Id("id1");
|
||||||
device = LinuxDeviceConfiguration::create("blubbblubb", "mytype",
|
device = LinuxDevice::create("blubbblubb", "mytype",
|
||||||
LinuxDeviceConfiguration::Hardware, IDevice::AutoDetected, m_currentId);
|
LinuxDevice::Hardware, IDevice::AutoDetected, m_currentId);
|
||||||
devMgr->addDevice(device);
|
devMgr->addDevice(device);
|
||||||
DEV_MGR_CHECK(devMgr->deviceCount() == 2);
|
DEV_MGR_CHECK(devMgr->deviceCount() == 2);
|
||||||
DEV_MGR_CHECK(devMgr->defaultDevice("mytype")->id() == Core::Id("id1"));
|
DEV_MGR_CHECK(devMgr->defaultDevice("mytype")->id() == Core::Id("id1"));
|
||||||
|
@@ -7014,7 +7014,7 @@
|
|||||||
"genericlinuxdeviceconfigurationwizard.h" "4"
|
"genericlinuxdeviceconfigurationwizard.h" "4"
|
||||||
"genericlinuxdeviceconfigurationwizardpages.h" "4"
|
"genericlinuxdeviceconfigurationwizardpages.h" "4"
|
||||||
"genericremotelinuxdeploystepfactory.h" "4"
|
"genericremotelinuxdeploystepfactory.h" "4"
|
||||||
"linuxdeviceconfiguration.h" "4"
|
"linuxdevice.h" "4"
|
||||||
"linuxdevicetestdialog.h" "4"
|
"linuxdevicetestdialog.h" "4"
|
||||||
"linuxdevicetester.h" "4"
|
"linuxdevicetester.h" "4"
|
||||||
"packageuploader.h" "4"
|
"packageuploader.h" "4"
|
||||||
|
|
Reference in New Issue
Block a user