madde/qnx/remotelinux: adjust after profile changes

More Profile use, less dependency on QtSupport,
Derive qtVersionId from profile instead of qt build configuration.
Replace qt4BuildConfiguration with buildConfiguration.
Use IDevice base class in AbstractRemoteLinuxApplicationRunner
and in other places.  Simplify remote linux runconfiguration

Change-Id: I6414d3d8146d16c360b3a0465c57a052ea71f899
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
hjk
2012-07-25 17:41:01 +02:00
committed by Christian Kandeler
parent 0fcd30cc61
commit b906360a34
64 changed files with 300 additions and 455 deletions

View File

@@ -38,19 +38,14 @@
#include <projectexplorer/target.h>
#include <qtsupport/qtoutputformatter.h>
#include <qtsupport/qtprofileinformation.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4project.h>
#include <utils/qtcassert.h>
using namespace Qt4ProjectManager;
using namespace ProjectExplorer;
namespace Android {
namespace Internal {
using namespace ProjectExplorer;
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, const QString &path)
: RunConfiguration(parent, id)
, m_proFilePath(path)
@@ -58,8 +53,7 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, co
init();
}
AndroidRunConfiguration::AndroidRunConfiguration(ProjectExplorer::Target *parent,
AndroidRunConfiguration *source)
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, AndroidRunConfiguration *source)
: RunConfiguration(parent, source)
, m_proFilePath(source->m_proFilePath)
{
@@ -71,15 +65,6 @@ void AndroidRunConfiguration::init()
setDefaultDisplayName(defaultDisplayName());
}
AndroidRunConfiguration::~AndroidRunConfiguration()
{
}
Qt4BuildConfiguration *AndroidRunConfiguration::activeQt4BuildConfiguration() const
{
return static_cast<Qt4BuildConfiguration *>(activeBuildConfiguration());
}
QWidget *AndroidRunConfiguration::createConfigurationWidget()
{
return 0;// no special running configurations

View File

@@ -34,19 +34,8 @@
#include "androidconstants.h"
#include "androidconfigurations.h"
#include <utils/environment.h>
#include <projectexplorer/runconfiguration.h>
QT_FORWARD_DECLARE_CLASS(QWidget)
namespace Qt4ProjectManager {
class Qt4BuildConfiguration;
class Qt4Project;
class Qt4ProFileNode;
}
namespace Android {
namespace Internal {
@@ -69,11 +58,9 @@ public:
enum DebuggingType { DebugCppOnly, DebugQmlOnly, DebugCppAndQml };
AndroidRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, const QString &path);
virtual ~AndroidRunConfiguration();
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
Qt4ProjectManager::Qt4BuildConfiguration *activeQt4BuildConfiguration() const;
AndroidDeployStep *deployStep() const;
@@ -95,7 +82,6 @@ private:
void init();
QString m_proFilePath;
};
} // namespace Internal

View File

@@ -59,7 +59,7 @@ MaddeDeviceTester::~MaddeDeviceTester()
{
}
void MaddeDeviceTester::testDevice(const LinuxDeviceConfiguration::ConstPtr &deviceConfiguration)
void MaddeDeviceTester::testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration)
{
QTC_ASSERT(m_state == Inactive, return);

View File

@@ -32,8 +32,6 @@
#include <remotelinux/linuxdevicetester.h>
#include <QByteArray>
namespace QSsh {
class SshRemoteProcessRunner;
}
@@ -44,11 +42,12 @@ namespace Internal {
class MaddeDeviceTester : public RemoteLinux::AbstractLinuxDeviceTester
{
Q_OBJECT
public:
explicit MaddeDeviceTester(QObject *parent = 0);
~MaddeDeviceTester();
void testDevice(const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &deviceConfiguration);
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
void stopTest();
private slots:
@@ -70,7 +69,7 @@ private:
State m_state;
TestResult m_result;
QSsh::SshRemoteProcessRunner *m_processRunner;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_deviceConfiguration;
ProjectExplorer::IDevice::ConstPtr m_deviceConfiguration;
};
} // namespace Internal

View File

@@ -33,16 +33,15 @@
#include "maemopackagecreationstep.h"
#include "maemopackageinstaller.h"
#include "maemoqemumanager.h"
#include "qt4maemodeployconfiguration.h"
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtprofileinformation.h>
#include <remotelinux/abstractuploadandinstallpackageservice.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/remotelinuxdeployconfiguration.h>
#include <ssh/sshconnection.h>
using namespace ProjectExplorer;
using namespace RemoteLinux;
namespace Madde {
@@ -60,7 +59,7 @@ protected:
void doDeviceSetup()
{
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Hardware) {
if (deviceConfiguration()->machineType() == IDevice::Hardware) {
handleDeviceSetupDone(true);
return;
}
@@ -71,8 +70,7 @@ protected:
}
MaemoQemuRuntime rt;
const int qtId = qt4BuildConfiguration()
? QtSupport::QtProfileInformation::qtVersionId(qt4BuildConfiguration()->target()->profile()) : -1;
const int qtId = QtSupport::QtProfileInformation::qtVersionId(profile());
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
MaemoQemuManager::instance().startRuntime();
emit errorMessage(tr("Cannot deploy: Qemu was not running. "

View File

@@ -156,7 +156,7 @@ void AbstractMaemoDeployByMountService::doDeviceSetup()
{
QTC_ASSERT(m_state == Inactive, return);
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Hardware) {
if (deviceConfiguration()->machineType() == IDevice::Hardware) {
handleDeviceSetupDone(true);
return;
}
@@ -167,8 +167,7 @@ void AbstractMaemoDeployByMountService::doDeviceSetup()
}
MaemoQemuRuntime rt;
const int qtId = qt4BuildConfiguration()
? QtSupport::QtProfileInformation::qtVersionId(qt4BuildConfiguration()->target()->profile()) : -1;
const int qtId = QtSupport::QtProfileInformation::qtVersionId(profile());
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
MaemoQemuManager::instance().startRuntime();
emit errorMessage(tr("Cannot deploy: Qemu was not running. "
@@ -192,14 +191,14 @@ void AbstractMaemoDeployByMountService::doDeploy()
{
QTC_ASSERT(m_state == Inactive, return);
if (!qt4BuildConfiguration()) {
if (!buildConfiguration()) {
emit errorMessage(tr("Missing build configuration."));
setFinished();
return;
}
m_state = Mounting;
m_mounter->setupMounts(connection(), deviceConfiguration(), mountSpecifications(), profile());
m_mounter->setupMounts(connection(), mountSpecifications(), profile());
}
void AbstractMaemoDeployByMountService::stopDeployment()
@@ -279,7 +278,7 @@ QString AbstractMaemoDeployByMountService::deployMountPoint() const
{
return MaemoGlobal::homeDirOnDevice(deviceConfiguration()->sshParameters().userName)
+ QLatin1String("/deployMountPoint_")
+ qt4BuildConfiguration()->target()->project()->displayName();
+ buildConfiguration()->target()->project()->displayName();
}

View File

@@ -34,8 +34,7 @@
#include "maemoremotemounter.h"
#include <projectexplorer/target.h>
#include <qtsupport/qtprofileinformation.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <projectexplorer/profileinformation.h>
#include <remotelinux/remotelinuxusedportsgatherer.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
@@ -70,7 +69,6 @@ MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
const LinuxDeviceConfiguration::ConstPtr &devConf,
const QList<MaemoMountSpecification> &mountSpecs,
const Profile *profile)
{
@@ -78,9 +76,9 @@ void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
m_mountSpecs = mountSpecs;
m_connection = connection;
m_devConf = devConf;
m_mounter->setConnection(m_connection, m_devConf);
m_profile = profile;
m_devConf = DeviceProfileInformation::device(profile);
m_mounter->setConnection(m_connection, m_devConf);
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
setState(UnmountingOldDirs);
unmount();
@@ -172,7 +170,7 @@ void MaemoDeploymentMounter::handlePortListReady()
return;
setState(Mounting);
m_freePorts = MaemoGlobal::freePorts(m_devConf, QtSupport::QtProfileInformation::qtVersion(m_profile));
m_freePorts = MaemoGlobal::freePorts(m_profile);
m_mounter->mount(&m_freePorts, m_portsGatherer);
}

View File

@@ -33,19 +33,14 @@
#include "maemomountspecification.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/portlist.h>
#include <QList>
#include <QObject>
#include <QSharedPointer>
namespace QSsh { class SshConnection; }
namespace ProjectExplorer { class Profile; }
namespace RemoteLinux {
class LinuxDeviceConfiguration;
class RemoteLinuxUsedPortsGatherer;
}
namespace QSsh { class SshConnection; }
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
namespace Madde {
namespace Internal {
@@ -60,7 +55,6 @@ public:
// Connection must be in connected state.
void setupMounts(QSsh::SshConnection *connection,
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
const QList<MaemoMountSpecification> &mountSpecs,
const ProjectExplorer::Profile *profile);
void tearDownMounts();
@@ -92,7 +86,7 @@ private:
State m_state;
QSsh::SshConnection *m_connection;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
ProjectExplorer::IDevice::ConstPtr m_devConf;
MaemoRemoteMounter * const m_mounter;
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
Utils::PortList m_freePorts;

View File

@@ -68,9 +68,9 @@ QString defaultUser(Core::Id deviceType)
return QLatin1String("developer");
}
QString defaultHost(LinuxDeviceConfiguration::MachineType type)
QString defaultHost(IDevice::MachineType type)
{
return QLatin1String(type == LinuxDeviceConfiguration::Hardware ? "192.168.2.15" : "localhost");
return QLatin1String(type == IDevice::Hardware ? "192.168.2.15" : "localhost");
}
struct WizardData
@@ -79,7 +79,7 @@ struct WizardData
QString hostName;
Core::Id deviceType;
SshConnectionParameters::AuthenticationType authType;
LinuxDeviceConfiguration::MachineType machineType;
IDevice::MachineType machineType;
QString privateKeyFilePath;
QString publicKeyFilePath;
QString userName;
@@ -138,8 +138,8 @@ public:
QString hostName() const
{
return machineType() == LinuxDeviceConfiguration::Emulator
? defaultHost(LinuxDeviceConfiguration::Emulator)
return machineType() == IDevice::Emulator
? defaultHost(IDevice::Emulator)
: m_ui->hostNameLineEdit->text().trimmed();
}
@@ -148,22 +148,20 @@ public:
return m_deviceType;
}
LinuxDeviceConfiguration::MachineType machineType() const
IDevice::MachineType machineType() const
{
return m_ui->hwButton->isChecked()
? LinuxDeviceConfiguration::Hardware : LinuxDeviceConfiguration::Emulator;
return m_ui->hwButton->isChecked() ? IDevice::Hardware : IDevice::Emulator;
}
int sshPort() const
{
return machineType() == LinuxDeviceConfiguration::Emulator
? 6666 : m_ui->sshPortSpinBox->value();
return machineType() == IDevice::Emulator ? 6666 : m_ui->sshPortSpinBox->value();
}
private slots:
void handleMachineTypeChanged()
{
const bool enable = machineType() == LinuxDeviceConfiguration::Hardware;
const bool enable = machineType() == IDevice::Hardware;
m_ui->hostNameLabel->setEnabled(enable);
m_ui->hostNameLineEdit->setEnabled(enable);
m_ui->sshPortLabel->setEnabled(enable);
@@ -206,7 +204,7 @@ public:
virtual void initializePage()
{
m_ui->keyWasNotSetUpButton->setChecked(true);
m_ui->privateKeyFilePathChooser->setPath(LinuxDeviceConfiguration::defaultPrivateKeyFilePath());
m_ui->privateKeyFilePathChooser->setPath(IDevice::defaultPrivateKeyFilePath());
handleSelectionChanged();
}
@@ -262,8 +260,8 @@ public:
virtual void initializePage()
{
m_ui->dontReuseButton->setChecked(true);
m_ui->privateKeyFilePathChooser->setPath(LinuxDeviceConfiguration::defaultPrivateKeyFilePath());
m_ui->publicKeyFilePathChooser->setPath(LinuxDeviceConfiguration::defaultPublicKeyFilePath());
m_ui->privateKeyFilePathChooser->setPath(IDevice::defaultPrivateKeyFilePath());
m_ui->publicKeyFilePathChooser->setPath(IDevice::defaultPublicKeyFilePath());
handleSelectionChanged();
}
@@ -504,7 +502,7 @@ public:
private:
QString infoText() const
{
if (m_wizardData.machineType == LinuxDeviceConfiguration::Emulator)
if (m_wizardData.machineType == IDevice::Emulator)
return tr("The new device configuration will now be created.");
return GenericLinuxDeviceConfigurationWizardFinalPage::infoText();
}
@@ -563,7 +561,7 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
sshParams.userName = defaultUser(d->wizardData.deviceType);
sshParams.host = d->wizardData.hostName;
sshParams.port = d->wizardData.sshPort;
if (d->wizardData.machineType == LinuxDeviceConfiguration::Emulator) {
if (d->wizardData.machineType == IDevice::Emulator) {
sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
sshParams.password = d->wizardData.deviceType == Core::Id(MeeGoOsType)
? QLatin1String("meego") : QString();
@@ -597,7 +595,7 @@ int MaemoDeviceConfigWizard::nextId() const
d->wizardData.machineType = d->startPage.machineType();
d->wizardData.hostName = d->startPage.hostName();
d->wizardData.sshPort = d->startPage.sshPort();
if (d->wizardData.machineType == LinuxDeviceConfiguration::Emulator)
if (d->wizardData.machineType == IDevice::Emulator)
return FinalPageId;
return PreviousKeySetupCheckPageId;
case PreviousKeySetupCheckPageId:

View File

@@ -32,11 +32,12 @@
#include "maemoconstants.h"
#include "maemoqemumanager.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/profileinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qtsupport/baseqtversion.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <remotelinux/remotelinux_constants.h>
#include <utils/environment.h>
@@ -46,6 +47,7 @@
#include <QString>
#include <QDesktopServices>
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Constants;
using namespace RemoteLinux;
@@ -56,9 +58,9 @@ namespace {
static const QLatin1String binQmake("/bin/qmake" EXEC_SUFFIX);
} // namespace
bool MaemoGlobal::hasMaemoDevice(const ProjectExplorer::Profile *p)
bool MaemoGlobal::hasMaemoDevice(const Profile *p)
{
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(p);
IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
if (dev.isNull())
return false;
@@ -67,9 +69,9 @@ bool MaemoGlobal::hasMaemoDevice(const ProjectExplorer::Profile *p)
|| type == Core::Id(MeeGoOsType);
}
bool MaemoGlobal::supportsMaemoDevice(const ProjectExplorer::Profile *p)
bool MaemoGlobal::supportsMaemoDevice(const Profile *p)
{
const Core::Id type = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(p);
const Core::Id type = DeviceTypeProfileInformation::deviceTypeId(p);
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType)
|| type == Core::Id(MeeGoOsType);
}
@@ -124,9 +126,9 @@ QString MaemoGlobal::devrootshPath()
return QLatin1String("/usr/lib/mad-developer/devrootsh");
}
int MaemoGlobal::applicationIconSize(const ProjectExplorer::Target *target)
int MaemoGlobal::applicationIconSize(const Target *target)
{
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target->profile());
Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(target->profile());
return deviceType == Core::Id(HarmattanOsType) ? 80 : 64;
}
@@ -151,12 +153,14 @@ QString MaemoGlobal::remoteSourceProfilesCommand()
return QString::fromAscii(remoteCall);
}
Utils::PortList MaemoGlobal::freePorts(const LinuxDeviceConfiguration::ConstPtr &devConf,
const QtSupport::BaseQtVersion *qtVersion)
Utils::PortList MaemoGlobal::freePorts(const Profile *profile)
{
IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(profile);
if (!devConf || !qtVersion)
return Utils::PortList();
if (devConf->machineType() == LinuxDeviceConfiguration::Emulator) {
if (devConf->machineType() == IDevice::Emulator) {
MaemoQemuRuntime rt;
const int id = qtVersion->uniqueId();
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))

View File

@@ -41,11 +41,8 @@
QT_BEGIN_NAMESPACE
class QProcess;
class QString;
QT_END_NAMESPACE
namespace QtSupport { class BaseQtVersion; }
namespace RemoteLinux { class LinuxDeviceConfiguration; }
namespace ProjectExplorer {
class Profile;
class Target;
@@ -96,8 +93,7 @@ public:
static int applicationIconSize(const ProjectExplorer::Target *target);
static QString remoteSudo(Core::Id deviceType, const QString &uname);
static QString remoteSourceProfilesCommand();
static Utils::PortList freePorts(const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
const QtSupport::BaseQtVersion *qtVersion);
static Utils::PortList freePorts(const ProjectExplorer::Profile *profile);
static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath);
static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath);

View File

@@ -34,10 +34,8 @@
#include "maemopublishingwizardfremantlefree.h"
#include <projectexplorer/target.h>
#include <qt4projectmanager/qmakestep.h>
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtprofileinformation.h>
#include <qtsupport/qtsupportconstants.h>

View File

@@ -50,8 +50,6 @@
#include <projectexplorer/target.h>
#include <qtsupport/qtprofileinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <utils/filesystemwatcher.h>
@@ -68,7 +66,6 @@
#include <limits.h>
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
namespace Madde {
@@ -516,10 +513,8 @@ bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target,
if (qtVersion)
*qtVersion = version;
const LinuxDeviceConfiguration::ConstPtr &config
= ProjectExplorer::DeviceProfileInformation::device(target->profile())
.dynamicCast<const LinuxDeviceConfiguration>();
return !config.isNull() && config->machineType() == LinuxDeviceConfiguration::Emulator;
const IDevice::ConstPtr config = DeviceProfileInformation::device(target->profile());
return !config.isNull() && config->machineType() == IDevice::Emulator;
}
void MaemoQemuManager::notify(const QList<int> uniqueIds)

View File

@@ -40,8 +40,6 @@
#include <QStringList>
#include <QTextStream>
using namespace RemoteLinux;
namespace Madde {
namespace Internal {

View File

@@ -31,14 +31,14 @@
#include "maemoglobal.h"
#include <remotelinux/linuxdeviceconfiguration.h>
#include <ssh/sshconnection.h>
#include <ssh/sshremoteprocessrunner.h>
#include <QDir>
using namespace RemoteLinux;
using namespace ProjectExplorer;
using namespace QSsh;
using namespace RemoteLinux;
namespace Madde {
namespace Internal {
@@ -51,7 +51,7 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
const LinuxDeviceConfiguration::ConstPtr &devConf,
const IDevice::ConstPtr &devConf,
const QList<DeployableFile> &deployables, const QString &mountPoint)
{
Q_ASSERT(connection->state() == SshConnection::Connected);

View File

@@ -32,21 +32,16 @@
#define MAEMOREMOTECOPYFACILITY_H
#include <remotelinux/deployablefile.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <QList>
#include <QObject>
#include <QSharedPointer>
#include <QString>
namespace QSsh {
class SshConnection;
class SshRemoteProcessRunner;
}
namespace RemoteLinux {
class LinuxDeviceConfiguration;
}
namespace Madde {
namespace Internal {
@@ -58,7 +53,7 @@ public:
~MaemoRemoteCopyFacility();
void copyFiles(QSsh::SshConnection *connection,
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
const ProjectExplorer::IDevice::ConstPtr &devConf,
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
void cancel();
@@ -81,7 +76,7 @@ private:
QSsh::SshRemoteProcessRunner *m_copyRunner;
QSsh::SshRemoteProcessRunner *m_killProcess;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
ProjectExplorer::IDevice::ConstPtr m_devConf;
QList<RemoteLinux::DeployableFile> m_deployables;
QString m_mountPoint;
bool m_isCopying; // TODO: Redundant due to being in sync with m_copyRunner?

View File

@@ -33,14 +33,13 @@
#include "maemoglobal.h"
#include "maemoremotemountsmodel.h"
#include "maemorunconfigurationwidget.h"
#include "qt4maemodeployconfiguration.h"
#include <debugger/debuggerconstants.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/profileinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <utils/portlist.h>
#include <ssh/sshconnection.h>
@@ -48,7 +47,6 @@
#include <QFileInfo>
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
namespace Madde {
@@ -121,9 +119,7 @@ QString MaemoRunConfiguration::environmentPreparationCommand() const
QString MaemoRunConfiguration::commandPrefix() const
{
LinuxDeviceConfiguration::ConstPtr dev =
ProjectExplorer::DeviceProfileInformation::device(target()->profile())
.dynamicCast<const LinuxDeviceConfiguration>();
IDevice::ConstPtr dev = DeviceProfileInformation::device(target()->profile());
if (!dev)
return QString();
@@ -136,9 +132,7 @@ QString MaemoRunConfiguration::commandPrefix() const
Utils::PortList MaemoRunConfiguration::freePorts() const
{
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
return MaemoGlobal::freePorts(ProjectExplorer::DeviceProfileInformation::device(target()->profile())
.staticCast<const LinuxDeviceConfiguration>(), version);
return MaemoGlobal::freePorts(target()->profile());
}
QString MaemoRunConfiguration::localDirToMountForRemoteGdb() const
@@ -162,7 +156,7 @@ QString MaemoRunConfiguration::localDirToMountForRemoteGdb() const
QString MaemoRunConfiguration::remoteProjectSourcesMountPoint() const
{
return MaemoGlobal::homeDirOnDevice(ProjectExplorer::DeviceProfileInformation::device(target()->profile())->sshParameters().userName)
return MaemoGlobal::homeDirOnDevice(DeviceProfileInformation::device(target()->profile())->sshParameters().userName)
+ QLatin1String("/gdbSourcesDir_")
+ QFileInfo(localExecutableFilePath()).fileName();
}
@@ -170,7 +164,7 @@ QString MaemoRunConfiguration::remoteProjectSourcesMountPoint() const
bool MaemoRunConfiguration::hasEnoughFreePorts(RunMode mode) const
{
const int freePortCount = freePorts().count();
Core::Id typeId = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
Core::Id typeId = DeviceTypeProfileInformation::deviceTypeId(target()->profile());
const bool remoteMountsAllowed = MaddeDevice::allowsRemoteMounts(typeId);
const int mountDirCount = remoteMountsAllowed
? remoteMounts()->validMountSpecificationCount() : 0;

View File

@@ -33,17 +33,15 @@
#include "maemoremotemountsmodel.h"
#include "maemorunconfiguration.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
using namespace QSsh;
using namespace RemoteLinux;
namespace Madde {
namespace Internal {
@@ -68,14 +66,12 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig
SIGNAL(mountDebugOutput(QString)));
}
MaemoSshRunner::~MaemoSshRunner() {}
bool MaemoSshRunner::canRun(QString &whyNot) const
{
if (!AbstractRemoteLinuxApplicationRunner::canRun(whyNot))
return false;
if (devConfig()->machineType() == LinuxDeviceConfiguration::Emulator
if (devConfig()->machineType() == IDevice::Emulator
&& !MaemoQemuManager::instance().qemuIsRunning()) {
MaemoQemuRuntime rt;
if (MaemoQemuManager::instance().runtimeForQtVersion(m_qtId, &rt)) {

View File

@@ -42,9 +42,9 @@ class MaemoRunConfiguration;
class MaemoSshRunner : public RemoteLinux::AbstractRemoteLinuxApplicationRunner
{
Q_OBJECT
public:
MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig);
~MaemoSshRunner();
signals:
void mountDebugOutput(const QString &output);

View File

@@ -38,7 +38,6 @@
#include <coreplugin/documentmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <utils/filesystemwatcher.h>
#include <utils/qtcassert.h>

View File

@@ -35,10 +35,6 @@
#include "subcomponentmanager.h"
#include "model/viewlogger.h"
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <itemlibraryview.h>
#include <itemlibrarywidget.h>
#include <navigatorview.h>
@@ -62,8 +58,15 @@
#include <model/modelnodecontextmenu.h>
#include <designmodewidget.h>
#include <utils/fileutils.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionmanager.h>
#include <utils/crumblepath.h>
#include <utils/fileutils.h>
#include <QCoreApplication>
#include <QDir>
@@ -87,12 +90,6 @@
#include <QPlainTextEdit>
#include <QApplication>
#include <projectexplorer/projectexplorer.h>
#include <qt4projectmanager/qt4project.h>
#include <qtsupport/qtversionmanager.h>
#include <qtsupport/qtsupportconstants.h>
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
enum {
debug = false
};

View File

@@ -69,7 +69,6 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt-s60/s60devicedebugruncontrol.h>
#include <qt4projectmanager/qt-s60/s60devicerunconfiguration.h>
#include <qt4projectmanager/qt-s60/s60deployconfiguration.h>

View File

@@ -79,6 +79,7 @@ bool parseRunningState(const QString &line)
}
}
using namespace ProjectExplorer;
using namespace Qnx;
using namespace Qnx::Internal;
@@ -97,18 +98,16 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBe
{
QTC_ASSERT(runConfiguration, return);
Qt4ProjectManager::Qt4BuildConfiguration *qt4BuildConfig = runConfiguration->activeQt4BuildConfiguration();
m_environment = qt4BuildConfig->environment();
Target *target = runConfiguration->target();
BuildConfiguration *buildConfig = target->activeBuildConfiguration();
m_environment = buildConfig->environment();
m_deployCmd = m_environment.searchInPath(QLatin1String(DEPLOY_CMD));
m_deviceHost = runConfiguration->deployConfiguration()->deviceHost();
m_password = runConfiguration->deployConfiguration()->password();
m_barPackage = runConfiguration->barPackage();
BlackBerryRunConfiguration *blackberryRunConfiguration = qobject_cast<BlackBerryRunConfiguration *>(runConfiguration);
if (blackberryRunConfiguration)
m_barPackage = blackberryRunConfiguration->barPackage();
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfiguration->target()->profile());
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->profile());
m_sshParams = device->sshParameters();
// The BlackBerry device always uses key authentication
m_sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByKey;

View File

@@ -35,7 +35,7 @@
#include "blackberryrunconfiguration.h"
#include "blackberrydeployconfiguration.h"
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/target.h>
#include <ssh/sshconnection.h>
#include <utils/qtcassert.h>
@@ -43,6 +43,7 @@
#include <QProcess>
#include <QApplication>
using namespace ProjectExplorer;
using namespace Qnx;
using namespace Qnx::Internal;
@@ -90,8 +91,9 @@ BlackBerryConnect::BlackBerryConnect(BlackBerryRunConfiguration *runConfig)
m_process = new QProcess(this);
Utils::Environment env;
if (runConfig->activeQt4BuildConfiguration())
env = runConfig->activeQt4BuildConfiguration()->environment();
Target *target = runConfig->target();
if (target->activeBuildConfiguration())
env = target->activeBuildConfiguration()->environment();
m_process->setEnvironment(env.toStringList());
m_connectCmd = env.searchInPath(QLatin1String(CONNECT_CMD));
@@ -101,7 +103,7 @@ BlackBerryConnect::BlackBerryConnect(BlackBerryRunConfiguration *runConfig)
m_deviceHost = deployConfig->deviceHost();
m_password = deployConfig->password();
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->profile());
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->profile());
m_publicKeyFile = device->sshParameters().privateKeyFile + QLatin1String(".pub");
connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));

View File

@@ -40,6 +40,7 @@
using namespace Qnx;
using namespace Qnx::Internal;
using namespace ProjectExplorer;
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
: RemoteLinux::LinuxDeviceConfiguration()
@@ -47,8 +48,8 @@ BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
}
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
RemoteLinux::LinuxDeviceConfiguration::MachineType machineType,
ProjectExplorer::IDevice::Origin origin, Core::Id id)
IDevice::MachineType machineType,
IDevice::Origin origin, Core::Id id)
: RemoteLinux::LinuxDeviceConfiguration(name, type, machineType, origin, id)
{
}
@@ -65,8 +66,8 @@ BlackBerryDeviceConfiguration::Ptr BlackBerryDeviceConfiguration::create()
}
BlackBerryDeviceConfiguration::Ptr BlackBerryDeviceConfiguration::create(const QString &name, Core::Id type,
RemoteLinux::LinuxDeviceConfiguration::MachineType machineType,
ProjectExplorer::IDevice::Origin origin, Core::Id id)
IDevice::MachineType machineType,
IDevice::Origin origin, Core::Id id)
{
return Ptr(new BlackBerryDeviceConfiguration(name, type, machineType, origin, id));
}
@@ -87,14 +88,14 @@ void BlackBerryDeviceConfiguration::fromMap(const QVariantMap &map)
m_debugToken = map.value(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY)).toString();
}
ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfiguration::clone() const
IDevice::Ptr BlackBerryDeviceConfiguration::clone() const
{
return Ptr(new BlackBerryDeviceConfiguration(*this));
}
BlackBerryDeviceConfiguration::ConstPtr BlackBerryDeviceConfiguration::device(const ProjectExplorer::Profile *p)
BlackBerryDeviceConfiguration::ConstPtr BlackBerryDeviceConfiguration::device(const Profile *p)
{
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(p);
IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
return dev.dynamicCast<const BlackBerryDeviceConfiguration>();
}
@@ -103,7 +104,7 @@ QString BlackBerryDeviceConfiguration::displayType() const
return tr("BlackBerry");
}
ProjectExplorer::IDeviceWidget *BlackBerryDeviceConfiguration::createWidget()
IDeviceWidget *BlackBerryDeviceConfiguration::createWidget()
{
return new BlackBerryDeviceConfigurationWidget(sharedFromThis()
.staticCast<BlackBerryDeviceConfiguration>());

View File

@@ -35,15 +35,14 @@
#include "ui_blackberrydeviceconfigurationwidget.h"
#include "qnxconstants.h"
#include <remotelinux/linuxdeviceconfiguration.h>
#include <ssh/sshconnection.h>
#include <utils/pathchooser.h>
using namespace ProjectExplorer;
using namespace Qnx::Internal;
BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const ProjectExplorer::IDevice::Ptr &device, QWidget *parent) :
ProjectExplorer::IDeviceWidget(device, parent),
BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent) :
IDeviceWidget(device, parent),
ui(new Ui::BlackBerryDeviceConfigurationWidget)
{
ui->setupUi(this);
@@ -112,7 +111,7 @@ void BlackBerryDeviceConfigurationWidget::initGui()
ui->showPasswordCheckBox->setChecked(false);
ui->debugToken->setPath(deviceConfiguration()->debugToken());
if (deviceConfiguration()->machineType() == RemoteLinux::LinuxDeviceConfiguration::Emulator) {
if (deviceConfiguration()->machineType() == IDevice::Emulator) {
ui->debugToken->setEnabled(false);
ui->debugTokenLabel->setEnabled(false);
}

View File

@@ -41,6 +41,7 @@
#include <QFormLayout>
#include <QMessageBox>
using namespace ProjectExplorer;
using namespace Qnx;
using namespace Qnx::Internal;
@@ -110,12 +111,9 @@ QString BlackBerryDeviceConfigurationWizardSetupPage::debugToken() const
return m_ui->debugToken->fileName().toString();
}
RemoteLinux::LinuxDeviceConfiguration::MachineType BlackBerryDeviceConfigurationWizardSetupPage::machineType() const
IDevice::MachineType BlackBerryDeviceConfigurationWizardSetupPage::machineType() const
{
if (m_ui->physicalDevice->isChecked())
return RemoteLinux::LinuxDeviceConfiguration::Hardware;
else
return RemoteLinux::LinuxDeviceConfiguration::Emulator;
return m_ui->physicalDevice->isChecked() ? IDevice::Hardware : IDevice::Emulator;
}

View File

@@ -63,7 +63,7 @@ public:
QString hostName() const;
QString password() const;
QString debugToken() const;
RemoteLinux::LinuxDeviceConfiguration::MachineType machineType() const;
ProjectExplorer::IDevice::MachineType machineType() const;
private:
Ui::BlackBerryDeviceConfigurationWizardSetupPage *m_ui;

View File

@@ -142,11 +142,6 @@ BlackBerryDeployConfiguration *BlackBerryRunConfiguration::deployConfiguration()
return qobject_cast<BlackBerryDeployConfiguration *>(target()->activeDeployConfiguration());
}
Qt4ProjectManager::Qt4BuildConfiguration *BlackBerryRunConfiguration::activeQt4BuildConfiguration() const
{
return static_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(activeBuildConfiguration());
}
QString BlackBerryRunConfiguration::key() const
{
return barPackage() + QLatin1Char('_') + BlackBerryDeviceConfiguration::device(target()->profile())->sshParameters().host;

View File

@@ -57,7 +57,7 @@ QnxDeviceConfiguration::Ptr QnxDeviceConfiguration::create()
return Ptr(new QnxDeviceConfiguration);
}
QnxDeviceConfiguration::Ptr QnxDeviceConfiguration::create(const QString &name, Core::Id type, RemoteLinux::LinuxDeviceConfiguration::MachineType machineType, ProjectExplorer::IDevice::Origin origin, Core::Id id)
QnxDeviceConfiguration::Ptr QnxDeviceConfiguration::create(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
{
return Ptr(new QnxDeviceConfiguration(name, type, machineType, origin, id));
}

View File

@@ -44,6 +44,7 @@
#include <remotelinux/remotelinuxusedportsgatherer.h>
#include <ssh/sshconnection.h>
using namespace ProjectExplorer;
using namespace Qnx;
using namespace Qnx::Internal;
@@ -60,7 +61,7 @@ QnxDeviceConfigurationWizard::QnxDeviceConfigurationWizard(QWidget *parent) :
m_finalPage->setCommitPage(true);
}
ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationWizard::device()
IDevice::Ptr QnxDeviceConfigurationWizard::device()
{
QSsh::SshConnectionParameters sshParams;
sshParams.proxyType = QSsh::SshConnectionParameters::NoProxy;
@@ -76,7 +77,7 @@ ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationWizard::device()
}
QnxDeviceConfiguration::Ptr devConf = QnxDeviceConfiguration::create(m_setupPage->configurationName(),
Core::Id(Constants::QNX_QNX_OS_TYPE), RemoteLinux::LinuxDeviceConfiguration::Hardware);
Core::Id(Constants::QNX_QNX_OS_TYPE), IDevice::Hardware);
devConf->setSshParameters(sshParams);
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));

View File

@@ -45,27 +45,58 @@
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerprofileinformation.h>
#include <debugger/debuggerstartparameters.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <utils/portlist.h>
using namespace Debugger;
using namespace ProjectExplorer;
using namespace Qnx;
using namespace Qnx::Internal;
DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConfig)
{
DebuggerStartParameters params;
Target *target = runConfig->target();
Profile *profile = target->profile();
const IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
if (devConf.isNull())
return params;
params.startMode = AttachToRemoteServer;
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
params.toolChainAbi = tc->targetAbi();
params.symbolFileName = runConfig->localExecutableFilePath();
params.remoteExecutable = runConfig->remoteExecutableFilePath();
params.remoteChannel = devConf->sshParameters().host + QLatin1String(":-1");
params.displayName = runConfig->displayName();
params.remoteSetupNeeded = true;
params.closeMode = DetachAtClose;
QnxQtVersion *qtVersion =
dynamic_cast<QnxQtVersion *>(QtSupport::QtProfileInformation::qtVersion(profile));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
return params;
}
QnxRunControlFactory::QnxRunControlFactory(QObject *parent)
: IRunControlFactory(parent)
{
}
QnxRunControlFactory::~QnxRunControlFactory()
bool QnxRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
{
}
bool QnxRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode) const
{
if (mode != ProjectExplorer::NormalRunMode && mode != ProjectExplorer::DebugRunMode)
if (mode != NormalRunMode && mode != DebugRunMode)
return false;
if (!runConfiguration->isEnabled()
@@ -75,8 +106,8 @@ bool QnxRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfigur
const QnxRunConfiguration * const rc = qobject_cast<QnxRunConfiguration *>(runConfiguration);
if (mode == ProjectExplorer::DebugRunMode) {
const QnxDeviceConfiguration::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(runConfiguration->target()->profile())
if (mode == DebugRunMode) {
const QnxDeviceConfiguration::ConstPtr dev = DeviceProfileInformation::device(runConfiguration->target()->profile())
.dynamicCast<const QnxDeviceConfiguration>();
if (dev.isNull())
return false;
@@ -85,17 +116,17 @@ bool QnxRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfigur
return true;
}
ProjectExplorer::RunControl *QnxRunControlFactory::create(ProjectExplorer::RunConfiguration *runConfig, ProjectExplorer::RunMode mode)
RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, RunMode mode)
{
Q_ASSERT(canRun(runConfig, mode));
QnxRunConfiguration *rc = qobject_cast<QnxRunConfiguration *>(runConfig);
Q_ASSERT(rc);
if (mode == ProjectExplorer::NormalRunMode)
if (mode == NormalRunMode)
return new QnxRunControl(rc);
const Debugger::DebuggerStartParameters params = startParameters(rc);
Debugger::DebuggerRunControl * const runControl = Debugger::DebuggerPlugin::createDebugger(params, rc);
const DebuggerStartParameters params = createStartParameters(rc);
DebuggerRunControl * const runControl = DebuggerPlugin::createDebugger(params, rc);
if (!runControl)
return 0;
@@ -110,42 +141,8 @@ QString QnxRunControlFactory::displayName() const
return tr("Run on remote QNX device");
}
ProjectExplorer::RunConfigWidget *QnxRunControlFactory::createConfigurationWidget(ProjectExplorer::RunConfiguration *config)
RunConfigWidget *QnxRunControlFactory::createConfigurationWidget(RunConfiguration *config)
{
Q_UNUSED(config)
return 0;
}
Debugger::DebuggerStartParameters QnxRunControlFactory::startParameters(
const QnxRunConfiguration *runConfig)
{
Debugger::DebuggerStartParameters params;
ProjectExplorer::Target *target = runConfig->target();
ProjectExplorer::Profile *profile = target->profile();
const QnxDeviceConfiguration::ConstPtr devConf = ProjectExplorer::DeviceProfileInformation::device(runConfig->target()->profile())
.dynamicCast<const QnxDeviceConfiguration>();
if (devConf.isNull())
return params;
params.startMode = Debugger::AttachToRemoteServer;
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString();
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile))
params.toolChainAbi = tc->targetAbi();
params.symbolFileName = runConfig->localExecutableFilePath();
params.remoteExecutable = runConfig->remoteExecutableFilePath();
params.remoteChannel = devConf->sshParameters().host + QLatin1String(":-1");
params.displayName = runConfig->displayName();
params.remoteSetupNeeded = true;
params.closeMode = Debugger::DetachAtClose;
QnxQtVersion *qtVersion =
dynamic_cast<QnxQtVersion *>(QtSupport::QtProfileInformation::qtVersion(profile));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
return params;
}

View File

@@ -34,20 +34,17 @@
#ifndef QNX_INTERNAL_QNXRUNCONTROLFACTORY_H
#define QNX_INTERNAL_QNXRUNCONTROLFACTORY_H
#include <debugger/debuggerstartparameters.h>
#include <projectexplorer/runconfiguration.h>
namespace Qnx {
namespace Internal {
class QnxRunConfiguration;
class QnxRunControlFactory : public ProjectExplorer::IRunControlFactory
{
Q_OBJECT
public:
explicit QnxRunControlFactory(QObject *parent = 0);
~QnxRunControlFactory();
QString displayName() const;
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration *runConfiguration);
@@ -56,9 +53,6 @@ public:
ProjectExplorer::RunMode mode) const;
ProjectExplorer::RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration,
ProjectExplorer::RunMode mode);
private:
static Debugger::DebuggerStartParameters startParameters( const QnxRunConfiguration *runConfig);
};
} // namespace Internal

View File

@@ -31,7 +31,6 @@
#include "externaleditors.h"
#include "qt4project.h"
#include "qt4projectmanagerconstants.h"
#include "qt4buildconfiguration.h"
#include <utils/synchronousprocess.h>
#include <projectexplorer/projectexplorer.h>

View File

@@ -32,8 +32,8 @@
#include "deployablefile.h"
#include "linuxdeviceconfiguration.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
@@ -44,7 +44,7 @@
#include <QPointer>
#include <QString>
using namespace Qt4ProjectManager;
using namespace ProjectExplorer;
using namespace QSsh;
namespace RemoteLinux {
@@ -86,9 +86,9 @@ public:
AbstractRemoteLinuxDeployServicePrivate()
: profile(0), connection(0), state(Inactive), stopRequested(false) {}
LinuxDeviceConfiguration::ConstPtr deviceConfiguration;
QPointer<Qt4BuildConfiguration> buildConfiguration;
ProjectExplorer::Profile *profile;
IDevice::ConstPtr deviceConfiguration;
QPointer<BuildConfiguration> buildConfiguration;
Profile *profile;
SshConnection *connection;
State state;
bool stopRequested;
@@ -109,17 +109,17 @@ AbstractRemoteLinuxDeployService::~AbstractRemoteLinuxDeployService()
delete d;
}
const Qt4BuildConfiguration *AbstractRemoteLinuxDeployService::qt4BuildConfiguration() const
const BuildConfiguration *AbstractRemoteLinuxDeployService::buildConfiguration() const
{
return d->buildConfiguration;
}
const ProjectExplorer::Profile *AbstractRemoteLinuxDeployService::profile() const
const Profile *AbstractRemoteLinuxDeployService::profile() const
{
return d->profile;
}
LinuxDeviceConfiguration::ConstPtr AbstractRemoteLinuxDeployService::deviceConfiguration() const
IDevice::ConstPtr AbstractRemoteLinuxDeployService::deviceConfiguration() const
{
return d->deviceConfiguration;
}
@@ -136,8 +136,8 @@ void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableF
const QtSupport::BaseQtVersion *const qtVersion
= QtSupport::QtProfileInformation::qtVersion(d->profile);
QString systemRoot;
if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->profile))
systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->profile).toString();
if (SysRootProfileInformation::hasSysRoot(d->profile))
systemRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
if (!qtVersion || !qtVersion->isValid())
return;
d->lastDeployed.insert(DeployParameters(deployableFile,
@@ -155,26 +155,22 @@ bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const Deplo
if (!qtVersion || !qtVersion->isValid())
return true;
QString systemRoot;
if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->profile))
systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->profile).toString();
if (SysRootProfileInformation::hasSysRoot(d->profile))
systemRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
const QDateTime &lastDeployed = d->lastDeployed.value(DeployParameters(deployableFile,
deviceConfiguration()->sshParameters().host, systemRoot));
return !lastDeployed.isValid()
|| QFileInfo(deployableFile.localFilePath).lastModified() > lastDeployed;
}
void AbstractRemoteLinuxDeployService::setDeviceConfiguration(const LinuxDeviceConfiguration::ConstPtr &deviceConfiguration)
{
d->deviceConfiguration = deviceConfiguration;
}
void AbstractRemoteLinuxDeployService::setBuildConfiguration(Qt4BuildConfiguration *bc)
void AbstractRemoteLinuxDeployService::setBuildConfiguration(BuildConfiguration *bc)
{
d->buildConfiguration = bc;
if (bc && bc->target())
d->profile = bc->target()->profile();
else
d->profile = 0;
d->deviceConfiguration = DeviceProfileInformation::device(d->profile);
}
void AbstractRemoteLinuxDeployService::start()
@@ -282,7 +278,7 @@ void AbstractRemoteLinuxDeployService::handleDeviceSetupDone(bool success)
}
d->state = Connecting;
d->connection = SshConnectionManager::instance().acquireConnection(d->deviceConfiguration->sshParameters());
d->connection = SshConnectionManager::instance().acquireConnection(deviceConfiguration()->sshParameters());
connect(d->connection, SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionFailure()));
if (d->connection->state() == SshConnection::Connected) {
@@ -324,7 +320,7 @@ void AbstractRemoteLinuxDeployService::handleConnectionFailure()
break;
case Connecting: {
QString errorMsg = tr("Could not connect to host: %1").arg(d->connection->errorString());
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Emulator)
if (deviceConfiguration()->machineType() == IDevice::Emulator)
errorMsg += tr("\nDid the emulator fail to start?");
else
errorMsg += tr("\nIs the device connected and set up for network access?");

View File

@@ -32,18 +32,22 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <QObject>
#include <QSharedPointer>
#include <QVariantMap>
namespace QSsh { class SshConnection; }
namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
namespace ProjectExplorer { class Profile; }
namespace ProjectExplorer {
class BuildConfiguration;
class Profile;
}
namespace RemoteLinux {
class DeployableFile;
class DeploymentInfo;
class LinuxDeviceConfiguration;
namespace Internal {
class AbstractRemoteLinuxDeployServicePrivate;
@@ -57,8 +61,7 @@ public:
explicit AbstractRemoteLinuxDeployService(QObject *parent = 0);
~AbstractRemoteLinuxDeployService();
void setDeviceConfiguration(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration);
void setBuildConfiguration(Qt4ProjectManager::Qt4BuildConfiguration *bc);
void setBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
void start();
void stop();
@@ -75,9 +78,9 @@ signals:
void stdErrData(const QString &data);
protected:
const Qt4ProjectManager::Qt4BuildConfiguration *qt4BuildConfiguration() const;
const ProjectExplorer::BuildConfiguration *buildConfiguration() const;
const ProjectExplorer::Profile *profile() const;
QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const;
ProjectExplorer::IDevice::ConstPtr deviceConfiguration() const;
QSsh::SshConnection *connection() const;
void saveDeploymentTimeStamp(const DeployableFile &deployableFile);

View File

@@ -27,17 +27,16 @@
**
**
**************************************************************************/
#include "abstractremotelinuxdeploystep.h"
#include "abstractremotelinuxdeployservice.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxdeployconfiguration.h"
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/profileinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
using namespace ProjectExplorer;
@@ -85,9 +84,7 @@ QVariantMap AbstractRemoteLinuxDeployStep::toMap() const
bool AbstractRemoteLinuxDeployStep::init()
{
QString error;
deployService()->setDeviceConfiguration(ProjectExplorer::DeviceProfileInformation::device(target()->profile())
.dynamicCast<const LinuxDeviceConfiguration>());
deployService()->setBuildConfiguration(qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()));
deployService()->setBuildConfiguration(target()->activeBuildConfiguration());
const bool canDeploy = initInternal(&error);
if (!canDeploy)
emit addOutput(tr("Cannot deploy: %1").arg(error), ErrorMessageOutput);
@@ -138,7 +135,7 @@ void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
{
emit addOutput(message, ErrorMessageOutput);
emit addTask(Task(Task::Error, message, Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
d->hasError = true;
}
@@ -146,7 +143,7 @@ void AbstractRemoteLinuxDeployStep::handleWarningMessage(const QString &message)
{
emit addOutput(message, ErrorMessageOutput);
emit addTask(Task(Task::Warning, message, Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
void AbstractRemoteLinuxDeployStep::handleFinished()

View File

@@ -35,7 +35,6 @@
#include <projectexplorer/buildstep.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4project.h>
#include <qtsupport/qtprofileinformation.h>

View File

@@ -71,8 +71,8 @@ bool GenericLinuxDeviceConfigurationFactory::canRestore(const QVariantMap &map)
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::restore(const QVariantMap &map) const
{
QTC_ASSERT(canRestore(map), return LinuxDeviceConfiguration::Ptr());
const LinuxDeviceConfiguration::Ptr device = LinuxDeviceConfiguration::create();
QTC_ASSERT(canRestore(map), return IDevice::Ptr());
const IDevice::Ptr device = LinuxDeviceConfiguration::create();
device->fromMap(map);
return device;
}

View File

@@ -36,14 +36,14 @@
#include <QTextStream>
using namespace ProjectExplorer;
using namespace RemoteLinux;
using namespace QSsh;
using namespace Utils;
GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
const LinuxDeviceConfiguration::Ptr &deviceConfig,
QWidget *parent) :
ProjectExplorer::IDeviceWidget(deviceConfig, parent),
const IDevice::Ptr &deviceConfig, QWidget *parent) :
IDeviceWidget(deviceConfig, parent),
m_ui(new Ui::GenericLinuxDeviceConfigurationWidget)
{
m_ui->setupUi(this);
@@ -72,12 +72,12 @@ GenericLinuxDeviceConfigurationWidget::~GenericLinuxDeviceConfigurationWidget()
void GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
const bool usePassword = m_ui->passwordButton->isChecked();
sshParams.authenticationType = usePassword
? SshConnectionParameters::AuthenticationByPassword
: SshConnectionParameters::AuthenticationByKey;
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
m_ui->pwdLineEdit->setEnabled(usePassword);
m_ui->passwordLabel->setEnabled(usePassword);
m_ui->keyFileLineEdit->setEnabled(!usePassword);
@@ -86,49 +86,49 @@ void GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged()
void GenericLinuxDeviceConfigurationWidget::hostNameEditingFinished()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
sshParams.host = m_ui->hostLineEdit->text().trimmed();
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
}
void GenericLinuxDeviceConfigurationWidget::sshPortEditingFinished()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
sshParams.port = m_ui->sshPortSpinBox->value();
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
}
void GenericLinuxDeviceConfigurationWidget::timeoutEditingFinished()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
sshParams.timeout = m_ui->timeoutSpinBox->value();
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
}
void GenericLinuxDeviceConfigurationWidget::userNameEditingFinished()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
sshParams.userName = m_ui->userLineEdit->text();
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
}
void GenericLinuxDeviceConfigurationWidget::passwordEditingFinished()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
sshParams.password = m_ui->pwdLineEdit->text();
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
}
void GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished()
{
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
SshConnectionParameters sshParams = device()->sshParameters();
sshParams.privateKeyFile = m_ui->keyFileLineEdit->path();
deviceConfiguration()->setSshParameters(sshParams);
device()->setSshParameters(sshParams);
}
void GenericLinuxDeviceConfigurationWidget::handleFreePortsChanged()
{
deviceConfiguration()->setFreePorts(PortList::fromString(m_ui->portsLineEdit->text()));
device()->setFreePorts(PortList::fromString(m_ui->portsLineEdit->text()));
updatePortsWarningLabel();
}
@@ -153,12 +153,12 @@ void GenericLinuxDeviceConfigurationWidget::createNewKey()
void GenericLinuxDeviceConfigurationWidget::updatePortsWarningLabel()
{
m_ui->portsWarningLabel->setVisible(!deviceConfiguration()->freePorts().hasMore());
m_ui->portsWarningLabel->setVisible(!device()->freePorts().hasMore());
}
void GenericLinuxDeviceConfigurationWidget::initGui()
{
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Hardware)
if (device()->machineType() == IDevice::Hardware)
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
else
m_ui->machineTypeValueLabel->setText(tr("Emulator"));
@@ -171,19 +171,19 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
= new QRegExpValidator(QRegExp(PortList::regularExpression()), this);
m_ui->portsLineEdit->setValidator(portsValidator);
const SshConnectionParameters &sshParams = deviceConfiguration()->sshParameters();
const SshConnectionParameters &sshParams = device()->sshParameters();
if (sshParams.authenticationType == SshConnectionParameters::AuthenticationByPassword)
m_ui->passwordButton->setChecked(true);
else
m_ui->keyButton->setChecked(true);
m_ui->timeoutSpinBox->setValue(sshParams.timeout);
m_ui->hostLineEdit->setEnabled(!deviceConfiguration()->isAutoDetected());
m_ui->sshPortSpinBox->setEnabled(!deviceConfiguration()->isAutoDetected());
m_ui->hostLineEdit->setEnabled(!device()->isAutoDetected());
m_ui->sshPortSpinBox->setEnabled(!device()->isAutoDetected());
m_ui->hostLineEdit->setText(sshParams.host);
m_ui->sshPortSpinBox->setValue(sshParams.port);
m_ui->portsLineEdit->setText(deviceConfiguration()->freePorts().toString());
m_ui->portsLineEdit->setText(device()->freePorts().toString());
m_ui->timeoutSpinBox->setValue(sshParams.timeout);
m_ui->userLineEdit->setText(sshParams.userName);
m_ui->pwdLineEdit->setText(sshParams.password);
@@ -191,8 +191,3 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
m_ui->showPasswordCheckBox->setChecked(false);
updatePortsWarningLabel();
}
LinuxDeviceConfiguration::Ptr GenericLinuxDeviceConfigurationWidget::deviceConfiguration() const
{
return device().staticCast<LinuxDeviceConfiguration>();
}

View File

@@ -32,7 +32,6 @@
#include <projectexplorer/devicesupport/idevicewidget.h>
#include "linuxdeviceconfiguration.h"
#include "remotelinux_export.h"
namespace RemoteLinux {
@@ -48,7 +47,7 @@ class REMOTELINUX_EXPORT GenericLinuxDeviceConfigurationWidget
public:
explicit GenericLinuxDeviceConfigurationWidget(
const LinuxDeviceConfiguration::Ptr &deviceConfig, QWidget *parent = 0);
const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0);
~GenericLinuxDeviceConfigurationWidget();
private slots:
@@ -67,7 +66,6 @@ private slots:
private:
void updatePortsWarningLabel();
void initGui();
LinuxDeviceConfiguration::Ptr deviceConfiguration() const;
Ui::GenericLinuxDeviceConfigurationWidget *m_ui;
};

View File

@@ -84,8 +84,8 @@ IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
sshParams.password = d->setupPage.password();
else
sshParams.privateKeyFile = d->setupPage.privateKeyFilePath();
LinuxDeviceConfiguration::Ptr devConf = LinuxDeviceConfiguration::create(d->setupPage.configurationName(),
Core::Id(Constants::GenericLinuxOsType), LinuxDeviceConfiguration::Hardware);
IDevice::Ptr devConf = LinuxDeviceConfiguration::create(d->setupPage.configurationName(),
Core::Id(Constants::GenericLinuxOsType), IDevice::Hardware);
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
devConf->setSshParameters(sshParams);
LinuxDeviceTestDialog dlg(devConf, new GenericLinuxDeviceTester(this), this);

View File

@@ -77,7 +77,7 @@ void GenericLinuxDeviceConfigurationWizardSetupPage::initializePage()
d->ui.userNameLineEdit->setText(defaultUserName());
d->ui.passwordButton->setChecked(true);
d->ui.passwordLineEdit->setText(defaultPassWord());
d->ui.privateKeyPathChooser->setPath(LinuxDeviceConfiguration::defaultPrivateKeyFilePath());
d->ui.privateKeyPathChooser->setPath(ProjectExplorer::IDevice::defaultPrivateKeyFilePath());
handleAuthTypeChanged();
}

View File

@@ -54,7 +54,7 @@ public:
using namespace Internal;
LinuxDeviceTestDialog::LinuxDeviceTestDialog(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration,
LinuxDeviceTestDialog::LinuxDeviceTestDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration,
AbstractLinuxDeviceTester *deviceTester, QWidget *parent)
: QDialog(parent), d(new LinuxDeviceTestDialogPrivate(deviceTester))
{

View File

@@ -43,10 +43,10 @@ class LinuxDeviceTestDialogPrivate;
class REMOTELINUX_EXPORT LinuxDeviceTestDialog : public QDialog
{
Q_OBJECT
public:
public:
// Note: The dialog takes ownership of deviceTester
explicit LinuxDeviceTestDialog(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration,
LinuxDeviceTestDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration,
AbstractLinuxDeviceTester * deviceTester, QWidget *parent = 0);
~LinuxDeviceTestDialog();

View File

@@ -29,13 +29,13 @@
**************************************************************************/
#include "linuxdevicetester.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxusedportsgatherer.h"
#include <utils/qtcassert.h>
#include <ssh/sshremoteprocess.h>
#include <ssh/sshconnection.h>
using namespace ProjectExplorer;
using namespace QSsh;
namespace RemoteLinux {
@@ -51,7 +51,7 @@ class GenericLinuxDeviceTesterPrivate
public:
GenericLinuxDeviceTesterPrivate() : connection(0), state(Inactive) {}
LinuxDeviceConfiguration::ConstPtr deviceConfiguration;
IDevice::ConstPtr deviceConfiguration;
SshConnection *connection;
SshRemoteProcess::Ptr process;
RemoteLinuxUsedPortsGatherer portsGatherer;
@@ -77,7 +77,7 @@ GenericLinuxDeviceTester::~GenericLinuxDeviceTester()
delete d;
}
void GenericLinuxDeviceTester::testDevice(const LinuxDeviceConfiguration::ConstPtr &deviceConfiguration)
void GenericLinuxDeviceTester::testDevice(const IDevice::ConstPtr &deviceConfiguration)
{
QTC_ASSERT(d->state == Inactive, return);

View File

@@ -27,36 +27,33 @@
**
**
**************************************************************************/
#ifndef LINUXDEVICETESTER_H
#define LINUXDEVICETESTER_H
#include "remotelinux_export.h"
#include <QObject>
#include <QSharedPointer>
QT_FORWARD_DECLARE_CLASS(QString)
#include <projectexplorer/devicesupport/idevice.h>
namespace QSsh {
class SshConnection;
}
namespace RemoteLinux {
class LinuxDeviceConfiguration;
class RemoteLinuxUsedPortsGatherer;
namespace Internal {
class GenericLinuxDeviceTesterPrivate;
} // namespace Internal
}
class REMOTELINUX_EXPORT AbstractLinuxDeviceTester : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(AbstractLinuxDeviceTester)
public:
enum TestResult { TestSuccess, TestFailure };
virtual void testDevice(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration) = 0;
virtual void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration) = 0;
virtual void stopTest() = 0;
signals:
@@ -72,11 +69,12 @@ protected:
class REMOTELINUX_EXPORT GenericLinuxDeviceTester : public AbstractLinuxDeviceTester
{
Q_OBJECT
public:
explicit GenericLinuxDeviceTester(QObject *parent = 0);
~GenericLinuxDeviceTester();
void testDevice(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration);
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
void stopTest();
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;

View File

@@ -28,7 +28,6 @@
**************************************************************************/
#include "publickeydeploymentdialog.h"
#include "linuxdeviceconfiguration.h"
#include "sshkeydeployer.h"
#include <coreplugin/icore.h>
@@ -37,6 +36,8 @@
#include <QTimer>
#include <QFileDialog>
using namespace ProjectExplorer;
namespace RemoteLinux {
namespace Internal {
class PublicKeyDeploymentDialogPrivate
@@ -49,7 +50,7 @@ public:
using namespace Internal;
PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog(const LinuxDeviceConfiguration::ConstPtr &deviceConfig,
PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog(const IDevice::ConstPtr &deviceConfig,
QWidget *parent)
{
const QString &dir = QFileInfo(deviceConfig->sshParameters().privateKeyFile).path();
@@ -62,7 +63,7 @@ PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog(const LinuxDe
return new PublicKeyDeploymentDialog(deviceConfig, publicKeyFileName, parent);
}
PublicKeyDeploymentDialog::PublicKeyDeploymentDialog(const LinuxDeviceConfiguration::ConstPtr &deviceConfig,
PublicKeyDeploymentDialog::PublicKeyDeploymentDialog(const IDevice::ConstPtr &deviceConfig,
const QString &publicKeyFileName, QWidget *parent)
: QProgressDialog(parent), d(new PublicKeyDeploymentDialogPrivate)
{

View File

@@ -31,16 +31,11 @@
#include "remotelinux_export.h"
#include <QSharedPointer>
#include <projectexplorer/devicesupport/idevice.h>
#include <QProgressDialog>
QT_BEGIN_NAMESPACE
class QString;
QT_END_NAMESPACE
namespace RemoteLinux {
class LinuxDeviceConfiguration;
namespace Internal {
class PublicKeyDeploymentDialogPrivate;
} // namespace Internal
@@ -50,7 +45,7 @@ class REMOTELINUX_EXPORT PublicKeyDeploymentDialog : public QProgressDialog
Q_OBJECT
public:
// Asks for public key and returns null if the file dialog is canceled.
static PublicKeyDeploymentDialog *createDialog(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig,
static PublicKeyDeploymentDialog *createDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
QWidget *parent = 0);
~PublicKeyDeploymentDialog();
@@ -61,7 +56,7 @@ private slots:
void handleCanceled();
private:
explicit PublicKeyDeploymentDialog(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig,
explicit PublicKeyDeploymentDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
const QString &publicKeyFileName, QWidget *parent = 0);
void handleDeploymentFinished(const QString &errorMsg);

View File

@@ -44,7 +44,7 @@
#include <limits>
using namespace Qt4ProjectManager;
using namespace ProjectExplorer;
using namespace QSsh;
using namespace Utils;
@@ -64,8 +64,7 @@ class AbstractRemoteLinuxApplicationRunnerPrivate
{
public:
AbstractRemoteLinuxApplicationRunnerPrivate(const RemoteLinuxRunConfiguration *runConfig)
: devConfig(ProjectExplorer::DeviceProfileInformation::device(runConfig->target()->profile())
.dynamicCast<const LinuxDeviceConfiguration>()),
: devConfig(DeviceProfileInformation::device(runConfig->target()->profile())),
remoteExecutable(runConfig->remoteExecutableFilePath()),
appArguments(runConfig->arguments()),
commandPrefix(runConfig->commandPrefix()),
@@ -76,7 +75,7 @@ public:
{ }
RemoteLinuxUsedPortsGatherer portsGatherer;
LinuxDeviceConfiguration::ConstPtr devConfig;
IDevice::ConstPtr devConfig;
const QString remoteExecutable;
const QString appArguments;
const QString commandPrefix;
@@ -115,7 +114,7 @@ SshConnection *AbstractRemoteLinuxApplicationRunner::connection() const
return d->connection;
}
LinuxDeviceConfiguration::ConstPtr AbstractRemoteLinuxApplicationRunner::devConfig() const
IDevice::ConstPtr AbstractRemoteLinuxApplicationRunner::devConfig() const
{
return d->devConfig;
}
@@ -383,11 +382,6 @@ bool AbstractRemoteLinuxApplicationRunner::canRun(QString &whyNot) const
return true;
}
void AbstractRemoteLinuxApplicationRunner::setDeviceConfiguration(const LinuxDeviceConfiguration::ConstPtr &deviceConfig)
{
d->devConfig = deviceConfig;
}
void AbstractRemoteLinuxApplicationRunner::handleDeviceSetupDone(bool success)
{
QTC_ASSERT(d->state == SettingUpDevice, return);

View File

@@ -31,6 +31,8 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <QObject>
#include <QSharedPointer>
@@ -38,7 +40,6 @@ namespace QSsh { class SshConnection; }
namespace Utils { class PortList; }
namespace RemoteLinux {
class LinuxDeviceConfiguration;
class RemoteLinuxRunConfiguration;
class RemoteLinuxUsedPortsGatherer;
@@ -60,7 +61,7 @@ public:
void startExecution(const QByteArray &remoteCall);
QSharedPointer<const LinuxDeviceConfiguration> devConfig() const;
ProjectExplorer::IDevice::ConstPtr devConfig() const;
QSsh::SshConnection *connection() const;
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
Utils::PortList *freePorts();
@@ -83,8 +84,6 @@ protected:
// Override to to additional checks.
virtual bool canRun(QString &whyNot) const;
void setDeviceConfiguration(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig);
void handleDeviceSetupDone(bool success);
void handleInitialCleanupDone(bool success);
void handleInitializationsDone(bool success);

View File

@@ -26,9 +26,9 @@
**
**
**************************************************************************/
#include "remotelinuxdebugsupport.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxapplicationrunner.h"
#include "remotelinuxrunconfiguration.h"
#include "remotelinuxusedportsgatherer.h"
@@ -37,12 +37,11 @@
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerprofileinformation.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/profile.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <utils/qtcassert.h>
#include <QPointer>
@@ -97,9 +96,7 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
DebuggerStartParameters params;
Target *target = runConfig->target();
Profile *profile = target->profile();
const LinuxDeviceConfiguration::ConstPtr devConf
= DeviceProfileInformation::device(profile)
.dynamicCast<const RemoteLinux::LinuxDeviceConfiguration>();
const IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();

View File

@@ -33,8 +33,8 @@
#include "remotelinuxdeployconfigurationwidget.h"
#include "typespecificdeviceconfigurationlistmodel.h"
#include <coreplugin/id.h>
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4project.h>

View File

@@ -31,23 +31,18 @@
#ifndef REMOTELINUXDEPLOYCONFIGURATION_H
#define REMOTELINUXDEPLOYCONFIGURATION_H
#include "linuxdeviceconfiguration.h"
#include "remotelinux_export.h"
#include <coreplugin/id.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/devicesupport/idevice.h>
namespace RemoteLinux {
class AbstractEmbeddedLinuxTarget;
class DeploymentInfo;
namespace Internal {
class RemoteLinuxDeployConfigurationFactory;
class TypeSpecificDeviceConfigurationListModel;
} // namespace Internal
namespace Internal { class RemoteLinuxDeployConfigurationFactory; }
class REMOTELINUX_EXPORT RemoteLinuxDeployConfiguration
: public ProjectExplorer::DeployConfiguration

View File

@@ -29,34 +29,32 @@
#include "remotelinuxenvironmentreader.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxrunconfiguration.h"
#include <ssh/sshremoteprocessrunner.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/profileinformation.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
namespace RemoteLinux {
namespace Internal {
RemoteLinuxEnvironmentReader::RemoteLinuxEnvironmentReader(RemoteLinuxRunConfiguration *config,
QObject *parent)
RemoteLinuxEnvironmentReader::RemoteLinuxEnvironmentReader(RunConfiguration *config, QObject *parent)
: QObject(parent)
, m_stop(false)
, m_devConfig(ProjectExplorer::DeviceProfileInformation::device(config->target()->profile()))
, m_runConfig(config)
, m_profile(config->target()->profile())
, m_remoteProcessRunner(0)
{
connect(config->target(), SIGNAL(profileChanged()),
this, SLOT(handleCurrentDeviceConfigChanged()));
}
RemoteLinuxEnvironmentReader::~RemoteLinuxEnvironmentReader()
{
}
void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
{
if (!m_devConfig)
IDevice::ConstPtr devConfig = DeviceProfileInformation::device(m_profile);
if (!devConfig)
return;
m_stop = false;
if (!m_remoteProcessRunner)
@@ -65,7 +63,7 @@ void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
connect(m_remoteProcessRunner, SIGNAL(processClosed(int)), SLOT(remoteProcessFinished(int)));
const QByteArray remoteCall
= QString(environmentSetupCommand + QLatin1String("; env")).toUtf8();
m_remoteProcessRunner->run(remoteCall, m_devConfig->sshParameters());
m_remoteProcessRunner->run(remoteCall, devConfig->sshParameters());
}
void RemoteLinuxEnvironmentReader::stop()
@@ -87,8 +85,6 @@ void RemoteLinuxEnvironmentReader::handleConnectionFailure()
void RemoteLinuxEnvironmentReader::handleCurrentDeviceConfigChanged()
{
m_devConfig = ProjectExplorer::DeviceProfileInformation::device(m_runConfig->target()->profile());
if (m_remoteProcessRunner)
disconnect(m_remoteProcessRunner, 0, this, 0);
m_env.clear();

View File

@@ -33,25 +33,22 @@
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/environment.h>
#include <QObject>
namespace QSsh {
class SshRemoteProcessRunner;
namespace ProjectExplorer {
class RunConfiguration;
class Profile;
}
namespace RemoteLinux {
class LinuxDeviceConfiguration;
class RemoteLinuxRunConfiguration;
namespace QSsh { class SshRemoteProcessRunner; }
namespace RemoteLinux {
namespace Internal {
class RemoteLinuxEnvironmentReader : public QObject
{
Q_OBJECT
public:
RemoteLinuxEnvironmentReader(RemoteLinuxRunConfiguration *config, QObject *parent = 0);
~RemoteLinuxEnvironmentReader();
RemoteLinuxEnvironmentReader(ProjectExplorer::RunConfiguration *config, QObject *parent = 0);
void start(const QString &environmentSetupCommand);
void stop();
@@ -73,8 +70,7 @@ private:
bool m_stop;
Utils::Environment m_env;
ProjectExplorer::IDevice::ConstPtr m_devConfig;
RemoteLinuxRunConfiguration *m_runConfig;
ProjectExplorer::Profile *m_profile;
QSsh::SshRemoteProcessRunner *m_remoteProcessRunner;
};

View File

@@ -29,13 +29,10 @@
**************************************************************************/
#include "remotelinuxpackageinstaller.h"
#include "linuxdeviceconfiguration.h"
#include <utils/qtcassert.h>
#include <ssh/sshremoteprocessrunner.h>
#include <QByteArray>
using namespace ProjectExplorer;
using namespace QSsh;
namespace RemoteLinux {
@@ -47,7 +44,7 @@ public:
AbstractRemoteLinuxPackageInstallerPrivate() : isRunning(false), installer(0), killProcess(0) {}
bool isRunning;
LinuxDeviceConfiguration::ConstPtr deviceConfig;
IDevice::ConstPtr deviceConfig;
QSsh::SshRemoteProcessRunner *installer;
QSsh::SshRemoteProcessRunner *killProcess;
};
@@ -64,7 +61,7 @@ AbstractRemoteLinuxPackageInstaller::~AbstractRemoteLinuxPackageInstaller()
delete d;
}
void AbstractRemoteLinuxPackageInstaller::installPackage(const LinuxDeviceConfiguration::ConstPtr &deviceConfig,
void AbstractRemoteLinuxPackageInstaller::installPackage(const IDevice::ConstPtr &deviceConfig,
const QString &packageFilePath, bool removePackageFile)
{
QTC_ASSERT(!d->isRunning, return);

View File

@@ -27,17 +27,17 @@
**
**
**************************************************************************/
#ifndef REMOTELINUXPACKAGEINSTALLER_H
#define REMOTELINUXPACKAGEINSTALLER_H
#include "remotelinux_export.h"
#include <QObject>
#include <projectexplorer/devicesupport/idevice.h>
#include <QSharedPointer>
#include <QString>
namespace RemoteLinux {
class LinuxDeviceConfiguration;
namespace Internal {
class AbstractRemoteLinuxPackageInstallerPrivate;
@@ -50,7 +50,7 @@ class REMOTELINUX_EXPORT AbstractRemoteLinuxPackageInstaller : public QObject
public:
~AbstractRemoteLinuxPackageInstaller();
void installPackage(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig,
void installPackage(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
const QString &packageFilePath, bool removePackageFile);
void cancelInstallation();

View File

@@ -40,7 +40,6 @@
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qtsupport/qtoutputformatter.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h>
@@ -141,18 +140,13 @@ void RemoteLinuxRunConfiguration::init()
this, SLOT(handleDeployConfigChanged()));
handleDeployConfigChanged();
Qt4Project *pro = static_cast<Qt4Project *>(target()->project());
Project *pro = target()->project();
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
connect(target(), SIGNAL(profileChanged()),
this, SLOT(handleDeployablesUpdated())); // Handles device changes, etc.
}
Qt4BuildConfiguration *RemoteLinuxRunConfiguration::activeQt4BuildConfiguration() const
{
return static_cast<Qt4BuildConfiguration *>(activeBuildConfiguration());
}
bool RemoteLinuxRunConfiguration::isEnabled() const
{
if (d->parseInProgress) {
@@ -165,7 +159,7 @@ bool RemoteLinuxRunConfiguration::isEnabled() const
d->disabledReason = project->disabledReasonForRunConfiguration(d->proFilePath);
return false;
}
if (!activeQt4BuildConfiguration()) {
if (!activeBuildConfiguration()) {
d->disabledReason = tr("No active build configuration.");
return false;
}

View File

@@ -33,13 +33,10 @@
#include "remotelinux_export.h"
#include "linuxdeviceconfiguration.h"
#include <projectexplorer/runconfiguration.h>
#include <utils/environment.h>
namespace Qt4ProjectManager {
class Qt4BuildConfiguration;
class Qt4ProFileNode;
} // namespace Qt4ProjectManager
@@ -77,10 +74,8 @@ public:
QString disabledReason() const;
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
Qt4ProjectManager::Qt4BuildConfiguration *activeQt4BuildConfiguration() const;
RemoteLinuxDeployConfiguration *deployConfig() const;
LinuxDeviceConfiguration::ConstPtr device() const;
virtual QString environmentPreparationCommand() const;
virtual QString commandPrefix() const;

View File

@@ -29,7 +29,6 @@
**************************************************************************/
#include "remotelinuxrunconfigurationwidget.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxrunconfiguration.h"
#include "remotelinuxenvironmentreader.h"
#include "remotelinuxutils.h"
@@ -38,7 +37,6 @@
#include <coreplugin/icore.h>
#include <projectexplorer/environmentwidget.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <utils/detailswidget.h>
#include <QCoreApplication>
@@ -53,8 +51,6 @@
#include <QMessageBox>
#include <QPushButton>
using namespace Qt4ProjectManager;
namespace RemoteLinux {
namespace Internal {
namespace {

View File

@@ -72,9 +72,7 @@ bool RemoteLinuxRunControlFactory::canRun(RunConfiguration *runConfiguration, Ru
const RemoteLinuxRunConfiguration * const remoteRunConfig
= qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration);
if (mode == DebugRunMode) {
LinuxDeviceConfiguration::ConstPtr dev =
ProjectExplorer::DeviceProfileInformation::device(runConfiguration->target()->profile())
.dynamicCast<const LinuxDeviceConfiguration>();
IDevice::ConstPtr dev = DeviceProfileInformation::device(runConfiguration->target()->profile());
if (dev.isNull())
return false;
return remoteRunConfig->portsUsedByDebuggers() <= dev->freePorts().count();

View File

@@ -39,7 +39,7 @@ using namespace ProjectExplorer;
namespace RemoteLinux {
namespace Internal {
TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListModel(ProjectExplorer::Target *target)
TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListModel(Target *target)
: QAbstractListModel(target)
{
const DeviceManager * const devConfs = DeviceManager::instance();
@@ -47,10 +47,6 @@ TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListMod
connect(target, SIGNAL(profileChanged()), this, SIGNAL(modelReset()));
}
TypeSpecificDeviceConfigurationListModel::~TypeSpecificDeviceConfigurationListModel()
{
}
int TypeSpecificDeviceConfigurationListModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid())
@@ -70,7 +66,7 @@ QVariant TypeSpecificDeviceConfigurationListModel::data(const QModelIndex &index
{
if (!index.isValid() || index.row() >= rowCount() || role != Qt::DisplayRole)
return QVariant();
const LinuxDeviceConfiguration::ConstPtr &devConf = deviceAt(index.row());
const IDevice::ConstPtr &devConf = deviceAt(index.row());
Q_ASSERT(devConf);
QString displayedName = devConf->displayName();
if (deviceMatches(devConf)
@@ -80,7 +76,7 @@ QVariant TypeSpecificDeviceConfigurationListModel::data(const QModelIndex &index
return displayedName;
}
LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::deviceAt(int idx) const
IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::deviceAt(int idx) const
{
int currentRow = -1;
const DeviceManager * const devConfs = DeviceManager::instance();
@@ -88,13 +84,13 @@ LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::dev
for (int i = 0; i < devConfsCount; ++i) {
const IDevice::ConstPtr device = devConfs->deviceAt(i);
if (deviceMatches(device) && ++currentRow == idx)
return device.staticCast<const LinuxDeviceConfiguration>();
return device;
}
QTC_CHECK(false);
return LinuxDeviceConfiguration::ConstPtr();
return IDevice::ConstPtr();
}
LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::defaultDeviceConfig() const
IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::defaultDeviceConfig() const
{
const DeviceManager * const deviceManager = DeviceManager::instance();
const int deviceCount = deviceManager->deviceCount();
@@ -102,17 +98,17 @@ LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::def
const IDevice::ConstPtr device = deviceManager->deviceAt(i);
if (deviceMatches(device)
&& deviceManager->defaultDevice(device->type()) == device) {
return device.staticCast<const LinuxDeviceConfiguration>();
return device;
}
}
return LinuxDeviceConfiguration::ConstPtr();
return IDevice::ConstPtr();
}
LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::find(Core::Id id) const
IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::find(Core::Id id) const
{
const IDevice::ConstPtr &devConf = DeviceManager::instance()->find(id);
if (deviceMatches(devConf))
return devConf.staticCast<const LinuxDeviceConfiguration>();
return devConf;
return defaultDeviceConfig();
}
@@ -126,12 +122,12 @@ int TypeSpecificDeviceConfigurationListModel::indexForId(Core::Id id) const
return -1;
}
ProjectExplorer::Target *TypeSpecificDeviceConfigurationListModel::target() const
Target *TypeSpecificDeviceConfigurationListModel::target() const
{
return qobject_cast<ProjectExplorer::Target *>(QObject::parent());
return qobject_cast<Target *>(QObject::parent());
}
bool TypeSpecificDeviceConfigurationListModel::deviceMatches(ProjectExplorer::IDevice::ConstPtr dev) const
bool TypeSpecificDeviceConfigurationListModel::deviceMatches(IDevice::ConstPtr dev) const
{
if (dev.isNull())
return false;

View File

@@ -30,10 +30,9 @@
#ifndef TYPESPECIFICDEVICECONFIGURATIONLISTMODEL_H
#define TYPESPECIFICDEVICECONFIGURATIONLISTMODEL_H
#include "linuxdeviceconfiguration.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <QAbstractListModel>
#include <QSharedPointer>
namespace ProjectExplorer { class Target; }
@@ -43,20 +42,18 @@ namespace Internal {
class TypeSpecificDeviceConfigurationListModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit TypeSpecificDeviceConfigurationListModel(ProjectExplorer::Target *target);
~TypeSpecificDeviceConfigurationListModel();
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex &index,
int role = Qt::DisplayRole) const;
QSharedPointer<const LinuxDeviceConfiguration> deviceAt(int idx) const;
QSharedPointer<const LinuxDeviceConfiguration> defaultDeviceConfig() const;
QSharedPointer<const LinuxDeviceConfiguration> find(Core::Id id) const;
int indexForId(Core::Id id) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
private:
int indexForId(Core::Id id) const;
ProjectExplorer::IDevice::ConstPtr deviceAt(int idx) const;
ProjectExplorer::IDevice::ConstPtr defaultDeviceConfig() const;
ProjectExplorer::IDevice::ConstPtr find(Core::Id id) const;
ProjectExplorer::Target *target() const;
bool deviceMatches(ProjectExplorer::IDevice::ConstPtr dev) const;
};