Commit 64602549 authored by hjk's avatar hjk Committed by Christian Kandeler
Browse files

remotelinux: rename LinuxDeviceConfiguration to LinuxDevice



Change-Id: I7e8a99d3339d2040a23e4e78816b13b57197dcdb
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent c80af2a4
......@@ -29,7 +29,6 @@
**************************************************************************/
#include "hostutils.h"
#include "breakpoint.h"
#include <utils/synchronousprocess.h>
......
......@@ -64,11 +64,11 @@ MaddeDevice::MaddeDevice()
MaddeDevice::MaddeDevice(const QString &name, Core::Id type, MachineType machineType,
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
#define MADDEDEVICE_H
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/linuxdevice.h>
#include <QCoreApplication>
namespace Madde {
namespace Internal {
class MaddeDevice : public RemoteLinux::LinuxDeviceConfiguration
class MaddeDevice : public RemoteLinux::LinuxDevice
{
Q_DECLARE_TR_FUNCTIONS(Madde::Internal::MaddeDevice)
public:
......
......@@ -32,7 +32,7 @@
#include "maemoconstants.h"
#include "maemoglobal.h"
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/linuxdevice.h>
#include <utils/qtcassert.h>
#include <ssh/sshremoteprocessrunner.h>
......
......@@ -45,7 +45,7 @@
#include <remotelinux/abstractremotelinuxdeployservice.h>
#include <remotelinux/deployablefile.h>
#include <remotelinux/deploymentinfo.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/linuxdevice.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
......
......@@ -572,15 +572,15 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
freePortsSpec = QLatin1String("10000-10100");
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);
devConf->setFreePorts(PortList::fromString(freePortsSpec));
devConf->setSshParameters(sshParams);
device->setFreePorts(PortList::fromString(freePortsSpec));
device->setSshParameters(sshParams);
if (doTest) {
LinuxDeviceTestDialog dlg(devConf, new MaddeDeviceTester(this), this);
LinuxDeviceTestDialog dlg(device, new MaddeDeviceTester(this), this);
dlg.exec();
}
return devConf;
return device;
}
int MaemoDeviceConfigWizard::nextId() const
......
......@@ -146,18 +146,18 @@ QString MaemoGlobal::remoteSourceProfilesCommand()
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);
if (!devConf || !qtVersion)
if (!device || !qtVersion)
return Utils::PortList();
if (devConf->machineType() == IDevice::Emulator) {
if (device->machineType() == IDevice::Emulator) {
MaemoQemuRuntime rt;
const int id = qtVersion->uniqueId();
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
return rt.m_freePorts;
}
return devConf->freePorts();
return device->freePorts();
}
QString MaemoGlobal::maddeRoot(const QString &qmakePath)
......
......@@ -51,13 +51,13 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
const IDevice::ConstPtr &devConf,
const IDevice::ConstPtr &device,
const QList<DeployableFile> &deployables, const QString &mountPoint)
{
Q_ASSERT(connection->state() == SshConnection::Connected);
Q_ASSERT(!m_isCopying);
m_devConf = devConf;
m_devConf = device;
m_deployables = deployables;
m_mountPoint = mountPoint;
......
......@@ -53,7 +53,7 @@ public:
~MaemoRemoteCopyFacility();
void copyFiles(QSsh::SshConnection *connection,
const ProjectExplorer::IDevice::ConstPtr &devConf,
const ProjectExplorer::IDevice::ConstPtr &device,
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
void cancel();
......
......@@ -42,8 +42,8 @@ enum State { Inactive, Listing, Killing };
class DeviceProcessListPrivate
{
public:
DeviceProcessListPrivate(const IDevice::ConstPtr &devConf)
: device(devConf),
DeviceProcessListPrivate(const IDevice::ConstPtr &device)
: device(device),
state(Inactive)
{ }
......@@ -58,8 +58,8 @@ public:
using namespace Internal;
DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent)
: QAbstractTableModel(parent), d(new DeviceProcessListPrivate(devConfig))
DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent)
: QAbstractTableModel(parent), d(new DeviceProcessListPrivate(device))
{
}
......
......@@ -45,7 +45,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessList : public QAbstractTableModel
Q_OBJECT
public:
DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent = 0);
DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
~DeviceProcessList();
void update();
......
......@@ -67,11 +67,11 @@ DeviceUsedPortsGatherer::~DeviceUsedPortsGatherer()
delete d;
}
void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &devConf)
void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
{
QTC_ASSERT(!d->connection, return);
d->portsToCheck = devConf->freePorts();
d->connection = SshConnectionManager::instance().acquireConnection(devConf->sshParameters());
d->portsToCheck = device->freePorts();
d->connection = SshConnectionManager::instance().acquireConnection(device->sshParameters());
connect(d->connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
if (d->connection->state() == SshConnection::Connected) {
handleConnectionEstablished();
......
......@@ -45,7 +45,7 @@ public:
DeviceUsedPortsGatherer(QObject *parent = 0);
~DeviceUsedPortsGatherer();
void start(const ProjectExplorer::IDevice::ConstPtr &devConf);
void start(const ProjectExplorer::IDevice::ConstPtr &device);
void stop();
int getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
QList<int> usedPorts() const;
......
......@@ -56,7 +56,7 @@
#include <projectexplorer/applicationrunconfiguration.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/linuxdevice.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
......
......@@ -43,19 +43,19 @@ using namespace Qnx::Internal;
using namespace ProjectExplorer;
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
: RemoteLinux::LinuxDeviceConfiguration()
: RemoteLinux::LinuxDevice()
{
}
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
IDevice::MachineType machineType,
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)
: RemoteLinux::LinuxDeviceConfiguration(other)
: RemoteLinux::LinuxDevice(other)
, m_debugToken(other.m_debugToken)
{
}
......@@ -84,7 +84,7 @@ void BlackBerryDeviceConfiguration::setDebugToken(const QString &debugToken)
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();
}
......@@ -129,7 +129,7 @@ void BlackBerryDeviceConfiguration::executeAction(Core::Id actionId, QWidget *pa
QVariantMap BlackBerryDeviceConfiguration::toMap() const
{
QVariantMap map = RemoteLinux::LinuxDeviceConfiguration::toMap();
QVariantMap map = RemoteLinux::LinuxDevice::toMap();
map.insert(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY), m_debugToken);
return map;
}
......@@ -34,7 +34,7 @@
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/linuxdevice.h>
namespace ProjectExplorer {
class Profile;
......@@ -43,7 +43,7 @@ class Profile;
namespace Qnx {
namespace Internal {
class BlackBerryDeviceConfiguration : public RemoteLinux::LinuxDeviceConfiguration
class BlackBerryDeviceConfiguration : public RemoteLinux::LinuxDevice
{
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryDeviceConfiguration)
public:
......
......@@ -34,7 +34,7 @@
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
#include <remotelinux/linuxdeviceconfiguration.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <QWizardPage>
......
......@@ -37,17 +37,17 @@ using namespace Qnx;
using namespace Qnx::Internal;
QnxDeviceConfiguration::QnxDeviceConfiguration()
: RemoteLinux::LinuxDeviceConfiguration()
: RemoteLinux::LinuxDevice()
{
}
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)
: RemoteLinux::LinuxDeviceConfiguration(other)
: RemoteLinux::LinuxDevice(other)
{
}
......
......@@ -34,14 +34,15 @@
#ifndef QNX_INTERNAL_QNXDEVICECONFIGURATION_H
#define QNX_INTERNAL_QNXDEVICECONFIGURATION_H
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/linuxdevice.h>
namespace Qnx {
namespace Internal {
class QnxDeviceConfiguration : public RemoteLinux::LinuxDeviceConfiguration
class QnxDeviceConfiguration : public RemoteLinux::LinuxDevice
{
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDeviceConfiguration)
public:
typedef QSharedPointer<QnxDeviceConfiguration> Ptr;
typedef QSharedPointer<const QnxDeviceConfiguration> ConstPtr;
......@@ -53,7 +54,6 @@ public:
QString displayType() const;
protected:
QnxDeviceConfiguration();
QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
......
......@@ -75,16 +75,16 @@ IDevice::Ptr QnxDeviceConfigurationWizard::device()
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);
devConf->setSshParameters(sshParams);
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
device->setSshParameters(sshParams);
device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
RemoteLinux::GenericLinuxDeviceTester *devTester = new RemoteLinux::GenericLinuxDeviceTester(this);
devTester->usedPortsGatherer()->setCommand(QLatin1String(Constants::QNX_PORT_GATHERER_COMMAND));
RemoteLinux::LinuxDeviceTestDialog dlg(devConf, devTester, this);
RemoteLinux::LinuxDeviceTestDialog dlg(device, devTester, this);
dlg.exec();
return devConf;
return device;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment