forked from qt-creator/qt-creator
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:
@@ -38,19 +38,14 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qtsupport/qtoutputformatter.h>
|
#include <qtsupport/qtoutputformatter.h>
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qt4projectmanager/qt4project.h>
|
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qt4ProjectManager;
|
|
||||||
|
|
||||||
namespace Android {
|
namespace Android {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
|
||||||
|
|
||||||
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, const QString &path)
|
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, const QString &path)
|
||||||
: RunConfiguration(parent, id)
|
: RunConfiguration(parent, id)
|
||||||
, m_proFilePath(path)
|
, m_proFilePath(path)
|
||||||
@@ -58,8 +53,7 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, co
|
|||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidRunConfiguration::AndroidRunConfiguration(ProjectExplorer::Target *parent,
|
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, AndroidRunConfiguration *source)
|
||||||
AndroidRunConfiguration *source)
|
|
||||||
: RunConfiguration(parent, source)
|
: RunConfiguration(parent, source)
|
||||||
, m_proFilePath(source->m_proFilePath)
|
, m_proFilePath(source->m_proFilePath)
|
||||||
{
|
{
|
||||||
@@ -71,15 +65,6 @@ void AndroidRunConfiguration::init()
|
|||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidRunConfiguration::~AndroidRunConfiguration()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt4BuildConfiguration *AndroidRunConfiguration::activeQt4BuildConfiguration() const
|
|
||||||
{
|
|
||||||
return static_cast<Qt4BuildConfiguration *>(activeBuildConfiguration());
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *AndroidRunConfiguration::createConfigurationWidget()
|
QWidget *AndroidRunConfiguration::createConfigurationWidget()
|
||||||
{
|
{
|
||||||
return 0;// no special running configurations
|
return 0;// no special running configurations
|
||||||
|
@@ -34,19 +34,8 @@
|
|||||||
#include "androidconstants.h"
|
#include "androidconstants.h"
|
||||||
#include "androidconfigurations.h"
|
#include "androidconfigurations.h"
|
||||||
|
|
||||||
#include <utils/environment.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QWidget)
|
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
|
||||||
|
|
||||||
class Qt4BuildConfiguration;
|
|
||||||
class Qt4Project;
|
|
||||||
class Qt4ProFileNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Android {
|
namespace Android {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -69,11 +58,9 @@ public:
|
|||||||
enum DebuggingType { DebugCppOnly, DebugQmlOnly, DebugCppAndQml };
|
enum DebuggingType { DebugCppOnly, DebugQmlOnly, DebugCppAndQml };
|
||||||
|
|
||||||
AndroidRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, const QString &path);
|
AndroidRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, const QString &path);
|
||||||
virtual ~AndroidRunConfiguration();
|
|
||||||
|
|
||||||
QWidget *createConfigurationWidget();
|
QWidget *createConfigurationWidget();
|
||||||
Utils::OutputFormatter *createOutputFormatter() const;
|
Utils::OutputFormatter *createOutputFormatter() const;
|
||||||
Qt4ProjectManager::Qt4BuildConfiguration *activeQt4BuildConfiguration() const;
|
|
||||||
|
|
||||||
AndroidDeployStep *deployStep() const;
|
AndroidDeployStep *deployStep() const;
|
||||||
|
|
||||||
@@ -95,7 +82,6 @@ private:
|
|||||||
void init();
|
void init();
|
||||||
|
|
||||||
QString m_proFilePath;
|
QString m_proFilePath;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -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);
|
QTC_ASSERT(m_state == Inactive, return);
|
||||||
|
|
||||||
|
@@ -32,8 +32,6 @@
|
|||||||
|
|
||||||
#include <remotelinux/linuxdevicetester.h>
|
#include <remotelinux/linuxdevicetester.h>
|
||||||
|
|
||||||
#include <QByteArray>
|
|
||||||
|
|
||||||
namespace QSsh {
|
namespace QSsh {
|
||||||
class SshRemoteProcessRunner;
|
class SshRemoteProcessRunner;
|
||||||
}
|
}
|
||||||
@@ -44,11 +42,12 @@ namespace Internal {
|
|||||||
class MaddeDeviceTester : public RemoteLinux::AbstractLinuxDeviceTester
|
class MaddeDeviceTester : public RemoteLinux::AbstractLinuxDeviceTester
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MaddeDeviceTester(QObject *parent = 0);
|
explicit MaddeDeviceTester(QObject *parent = 0);
|
||||||
~MaddeDeviceTester();
|
~MaddeDeviceTester();
|
||||||
|
|
||||||
void testDevice(const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &deviceConfiguration);
|
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
|
||||||
void stopTest();
|
void stopTest();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@@ -70,7 +69,7 @@ private:
|
|||||||
State m_state;
|
State m_state;
|
||||||
TestResult m_result;
|
TestResult m_result;
|
||||||
QSsh::SshRemoteProcessRunner *m_processRunner;
|
QSsh::SshRemoteProcessRunner *m_processRunner;
|
||||||
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_deviceConfiguration;
|
ProjectExplorer::IDevice::ConstPtr m_deviceConfiguration;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -33,16 +33,15 @@
|
|||||||
#include "maemopackagecreationstep.h"
|
#include "maemopackagecreationstep.h"
|
||||||
#include "maemopackageinstaller.h"
|
#include "maemopackageinstaller.h"
|
||||||
#include "maemoqemumanager.h"
|
#include "maemoqemumanager.h"
|
||||||
#include "qt4maemodeployconfiguration.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <remotelinux/abstractuploadandinstallpackageservice.h>
|
#include <remotelinux/abstractuploadandinstallpackageservice.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <remotelinux/remotelinuxdeployconfiguration.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace RemoteLinux;
|
using namespace RemoteLinux;
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
@@ -60,7 +59,7 @@ protected:
|
|||||||
|
|
||||||
void doDeviceSetup()
|
void doDeviceSetup()
|
||||||
{
|
{
|
||||||
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Hardware) {
|
if (deviceConfiguration()->machineType() == IDevice::Hardware) {
|
||||||
handleDeviceSetupDone(true);
|
handleDeviceSetupDone(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -71,8 +70,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
MaemoQemuRuntime rt;
|
MaemoQemuRuntime rt;
|
||||||
const int qtId = qt4BuildConfiguration()
|
const int qtId = QtSupport::QtProfileInformation::qtVersionId(profile());
|
||||||
? QtSupport::QtProfileInformation::qtVersionId(qt4BuildConfiguration()->target()->profile()) : -1;
|
|
||||||
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
|
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
|
||||||
MaemoQemuManager::instance().startRuntime();
|
MaemoQemuManager::instance().startRuntime();
|
||||||
emit errorMessage(tr("Cannot deploy: Qemu was not running. "
|
emit errorMessage(tr("Cannot deploy: Qemu was not running. "
|
||||||
|
@@ -156,7 +156,7 @@ void AbstractMaemoDeployByMountService::doDeviceSetup()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(m_state == Inactive, return);
|
QTC_ASSERT(m_state == Inactive, return);
|
||||||
|
|
||||||
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Hardware) {
|
if (deviceConfiguration()->machineType() == IDevice::Hardware) {
|
||||||
handleDeviceSetupDone(true);
|
handleDeviceSetupDone(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -167,8 +167,7 @@ void AbstractMaemoDeployByMountService::doDeviceSetup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
MaemoQemuRuntime rt;
|
MaemoQemuRuntime rt;
|
||||||
const int qtId = qt4BuildConfiguration()
|
const int qtId = QtSupport::QtProfileInformation::qtVersionId(profile());
|
||||||
? QtSupport::QtProfileInformation::qtVersionId(qt4BuildConfiguration()->target()->profile()) : -1;
|
|
||||||
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
|
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
|
||||||
MaemoQemuManager::instance().startRuntime();
|
MaemoQemuManager::instance().startRuntime();
|
||||||
emit errorMessage(tr("Cannot deploy: Qemu was not running. "
|
emit errorMessage(tr("Cannot deploy: Qemu was not running. "
|
||||||
@@ -192,14 +191,14 @@ void AbstractMaemoDeployByMountService::doDeploy()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(m_state == Inactive, return);
|
QTC_ASSERT(m_state == Inactive, return);
|
||||||
|
|
||||||
if (!qt4BuildConfiguration()) {
|
if (!buildConfiguration()) {
|
||||||
emit errorMessage(tr("Missing build configuration."));
|
emit errorMessage(tr("Missing build configuration."));
|
||||||
setFinished();
|
setFinished();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_state = Mounting;
|
m_state = Mounting;
|
||||||
m_mounter->setupMounts(connection(), deviceConfiguration(), mountSpecifications(), profile());
|
m_mounter->setupMounts(connection(), mountSpecifications(), profile());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractMaemoDeployByMountService::stopDeployment()
|
void AbstractMaemoDeployByMountService::stopDeployment()
|
||||||
@@ -279,7 +278,7 @@ QString AbstractMaemoDeployByMountService::deployMountPoint() const
|
|||||||
{
|
{
|
||||||
return MaemoGlobal::homeDirOnDevice(deviceConfiguration()->sshParameters().userName)
|
return MaemoGlobal::homeDirOnDevice(deviceConfiguration()->sshParameters().userName)
|
||||||
+ QLatin1String("/deployMountPoint_")
|
+ QLatin1String("/deployMountPoint_")
|
||||||
+ qt4BuildConfiguration()->target()->project()->displayName();
|
+ buildConfiguration()->target()->project()->displayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -34,8 +34,7 @@
|
|||||||
#include "maemoremotemounter.h"
|
#include "maemoremotemounter.h"
|
||||||
|
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
|
||||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
@@ -70,7 +69,6 @@ MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
|
|||||||
MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
|
MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
|
||||||
|
|
||||||
void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
|
void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
|
||||||
const LinuxDeviceConfiguration::ConstPtr &devConf,
|
|
||||||
const QList<MaemoMountSpecification> &mountSpecs,
|
const QList<MaemoMountSpecification> &mountSpecs,
|
||||||
const Profile *profile)
|
const Profile *profile)
|
||||||
{
|
{
|
||||||
@@ -78,9 +76,9 @@ void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
|
|||||||
|
|
||||||
m_mountSpecs = mountSpecs;
|
m_mountSpecs = mountSpecs;
|
||||||
m_connection = connection;
|
m_connection = connection;
|
||||||
m_devConf = devConf;
|
|
||||||
m_mounter->setConnection(m_connection, m_devConf);
|
|
||||||
m_profile = profile;
|
m_profile = profile;
|
||||||
|
m_devConf = DeviceProfileInformation::device(profile);
|
||||||
|
m_mounter->setConnection(m_connection, m_devConf);
|
||||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
||||||
setState(UnmountingOldDirs);
|
setState(UnmountingOldDirs);
|
||||||
unmount();
|
unmount();
|
||||||
@@ -172,7 +170,7 @@ void MaemoDeploymentMounter::handlePortListReady()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
setState(Mounting);
|
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);
|
m_mounter->mount(&m_freePorts, m_portsGatherer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -33,19 +33,14 @@
|
|||||||
|
|
||||||
#include "maemomountspecification.h"
|
#include "maemomountspecification.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QObject>
|
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
namespace QSsh { class SshConnection; }
|
|
||||||
namespace ProjectExplorer { class Profile; }
|
namespace ProjectExplorer { class Profile; }
|
||||||
|
namespace QSsh { class SshConnection; }
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
class RemoteLinuxUsedPortsGatherer;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -60,7 +55,6 @@ public:
|
|||||||
|
|
||||||
// Connection must be in connected state.
|
// Connection must be in connected state.
|
||||||
void setupMounts(QSsh::SshConnection *connection,
|
void setupMounts(QSsh::SshConnection *connection,
|
||||||
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
|
|
||||||
const QList<MaemoMountSpecification> &mountSpecs,
|
const QList<MaemoMountSpecification> &mountSpecs,
|
||||||
const ProjectExplorer::Profile *profile);
|
const ProjectExplorer::Profile *profile);
|
||||||
void tearDownMounts();
|
void tearDownMounts();
|
||||||
@@ -92,7 +86,7 @@ private:
|
|||||||
|
|
||||||
State m_state;
|
State m_state;
|
||||||
QSsh::SshConnection *m_connection;
|
QSsh::SshConnection *m_connection;
|
||||||
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
|
ProjectExplorer::IDevice::ConstPtr m_devConf;
|
||||||
MaemoRemoteMounter * const m_mounter;
|
MaemoRemoteMounter * const m_mounter;
|
||||||
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
|
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
|
||||||
Utils::PortList m_freePorts;
|
Utils::PortList m_freePorts;
|
||||||
|
@@ -68,9 +68,9 @@ QString defaultUser(Core::Id deviceType)
|
|||||||
return QLatin1String("developer");
|
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
|
struct WizardData
|
||||||
@@ -79,7 +79,7 @@ struct WizardData
|
|||||||
QString hostName;
|
QString hostName;
|
||||||
Core::Id deviceType;
|
Core::Id deviceType;
|
||||||
SshConnectionParameters::AuthenticationType authType;
|
SshConnectionParameters::AuthenticationType authType;
|
||||||
LinuxDeviceConfiguration::MachineType machineType;
|
IDevice::MachineType machineType;
|
||||||
QString privateKeyFilePath;
|
QString privateKeyFilePath;
|
||||||
QString publicKeyFilePath;
|
QString publicKeyFilePath;
|
||||||
QString userName;
|
QString userName;
|
||||||
@@ -138,8 +138,8 @@ public:
|
|||||||
|
|
||||||
QString hostName() const
|
QString hostName() const
|
||||||
{
|
{
|
||||||
return machineType() == LinuxDeviceConfiguration::Emulator
|
return machineType() == IDevice::Emulator
|
||||||
? defaultHost(LinuxDeviceConfiguration::Emulator)
|
? defaultHost(IDevice::Emulator)
|
||||||
: m_ui->hostNameLineEdit->text().trimmed();
|
: m_ui->hostNameLineEdit->text().trimmed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,22 +148,20 @@ public:
|
|||||||
return m_deviceType;
|
return m_deviceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::MachineType machineType() const
|
IDevice::MachineType machineType() const
|
||||||
{
|
{
|
||||||
return m_ui->hwButton->isChecked()
|
return m_ui->hwButton->isChecked() ? IDevice::Hardware : IDevice::Emulator;
|
||||||
? LinuxDeviceConfiguration::Hardware : LinuxDeviceConfiguration::Emulator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int sshPort() const
|
int sshPort() const
|
||||||
{
|
{
|
||||||
return machineType() == LinuxDeviceConfiguration::Emulator
|
return machineType() == IDevice::Emulator ? 6666 : m_ui->sshPortSpinBox->value();
|
||||||
? 6666 : m_ui->sshPortSpinBox->value();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleMachineTypeChanged()
|
void handleMachineTypeChanged()
|
||||||
{
|
{
|
||||||
const bool enable = machineType() == LinuxDeviceConfiguration::Hardware;
|
const bool enable = machineType() == IDevice::Hardware;
|
||||||
m_ui->hostNameLabel->setEnabled(enable);
|
m_ui->hostNameLabel->setEnabled(enable);
|
||||||
m_ui->hostNameLineEdit->setEnabled(enable);
|
m_ui->hostNameLineEdit->setEnabled(enable);
|
||||||
m_ui->sshPortLabel->setEnabled(enable);
|
m_ui->sshPortLabel->setEnabled(enable);
|
||||||
@@ -206,7 +204,7 @@ public:
|
|||||||
virtual void initializePage()
|
virtual void initializePage()
|
||||||
{
|
{
|
||||||
m_ui->keyWasNotSetUpButton->setChecked(true);
|
m_ui->keyWasNotSetUpButton->setChecked(true);
|
||||||
m_ui->privateKeyFilePathChooser->setPath(LinuxDeviceConfiguration::defaultPrivateKeyFilePath());
|
m_ui->privateKeyFilePathChooser->setPath(IDevice::defaultPrivateKeyFilePath());
|
||||||
handleSelectionChanged();
|
handleSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,8 +260,8 @@ public:
|
|||||||
virtual void initializePage()
|
virtual void initializePage()
|
||||||
{
|
{
|
||||||
m_ui->dontReuseButton->setChecked(true);
|
m_ui->dontReuseButton->setChecked(true);
|
||||||
m_ui->privateKeyFilePathChooser->setPath(LinuxDeviceConfiguration::defaultPrivateKeyFilePath());
|
m_ui->privateKeyFilePathChooser->setPath(IDevice::defaultPrivateKeyFilePath());
|
||||||
m_ui->publicKeyFilePathChooser->setPath(LinuxDeviceConfiguration::defaultPublicKeyFilePath());
|
m_ui->publicKeyFilePathChooser->setPath(IDevice::defaultPublicKeyFilePath());
|
||||||
handleSelectionChanged();
|
handleSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,7 +502,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
QString infoText() const
|
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 tr("The new device configuration will now be created.");
|
||||||
return GenericLinuxDeviceConfigurationWizardFinalPage::infoText();
|
return GenericLinuxDeviceConfigurationWizardFinalPage::infoText();
|
||||||
}
|
}
|
||||||
@@ -563,7 +561,7 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
|
|||||||
sshParams.userName = defaultUser(d->wizardData.deviceType);
|
sshParams.userName = defaultUser(d->wizardData.deviceType);
|
||||||
sshParams.host = d->wizardData.hostName;
|
sshParams.host = d->wizardData.hostName;
|
||||||
sshParams.port = d->wizardData.sshPort;
|
sshParams.port = d->wizardData.sshPort;
|
||||||
if (d->wizardData.machineType == LinuxDeviceConfiguration::Emulator) {
|
if (d->wizardData.machineType == IDevice::Emulator) {
|
||||||
sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
|
sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
|
||||||
sshParams.password = d->wizardData.deviceType == Core::Id(MeeGoOsType)
|
sshParams.password = d->wizardData.deviceType == Core::Id(MeeGoOsType)
|
||||||
? QLatin1String("meego") : QString();
|
? QLatin1String("meego") : QString();
|
||||||
@@ -597,7 +595,7 @@ int MaemoDeviceConfigWizard::nextId() const
|
|||||||
d->wizardData.machineType = d->startPage.machineType();
|
d->wizardData.machineType = d->startPage.machineType();
|
||||||
d->wizardData.hostName = d->startPage.hostName();
|
d->wizardData.hostName = d->startPage.hostName();
|
||||||
d->wizardData.sshPort = d->startPage.sshPort();
|
d->wizardData.sshPort = d->startPage.sshPort();
|
||||||
if (d->wizardData.machineType == LinuxDeviceConfiguration::Emulator)
|
if (d->wizardData.machineType == IDevice::Emulator)
|
||||||
return FinalPageId;
|
return FinalPageId;
|
||||||
return PreviousKeySetupCheckPageId;
|
return PreviousKeySetupCheckPageId;
|
||||||
case PreviousKeySetupCheckPageId:
|
case PreviousKeySetupCheckPageId:
|
||||||
|
@@ -32,11 +32,12 @@
|
|||||||
#include "maemoconstants.h"
|
#include "maemoconstants.h"
|
||||||
#include "maemoqemumanager.h"
|
#include "maemoqemumanager.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <remotelinux/remotelinux_constants.h>
|
#include <remotelinux/remotelinux_constants.h>
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
|
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qt4ProjectManager;
|
using namespace Qt4ProjectManager;
|
||||||
using namespace Qt4ProjectManager::Constants;
|
using namespace Qt4ProjectManager::Constants;
|
||||||
using namespace RemoteLinux;
|
using namespace RemoteLinux;
|
||||||
@@ -56,9 +58,9 @@ namespace {
|
|||||||
static const QLatin1String binQmake("/bin/qmake" EXEC_SUFFIX);
|
static const QLatin1String binQmake("/bin/qmake" EXEC_SUFFIX);
|
||||||
} // namespace
|
} // 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())
|
if (dev.isNull())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -67,9 +69,9 @@ bool MaemoGlobal::hasMaemoDevice(const ProjectExplorer::Profile *p)
|
|||||||
|| type == Core::Id(MeeGoOsType);
|
|| 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)
|
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType)
|
||||||
|| type == Core::Id(MeeGoOsType);
|
|| type == Core::Id(MeeGoOsType);
|
||||||
}
|
}
|
||||||
@@ -124,9 +126,9 @@ QString MaemoGlobal::devrootshPath()
|
|||||||
return QLatin1String("/usr/lib/mad-developer/devrootsh");
|
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;
|
return deviceType == Core::Id(HarmattanOsType) ? 80 : 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,12 +153,14 @@ QString MaemoGlobal::remoteSourceProfilesCommand()
|
|||||||
return QString::fromAscii(remoteCall);
|
return QString::fromAscii(remoteCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::PortList MaemoGlobal::freePorts(const LinuxDeviceConfiguration::ConstPtr &devConf,
|
Utils::PortList MaemoGlobal::freePorts(const Profile *profile)
|
||||||
const QtSupport::BaseQtVersion *qtVersion)
|
|
||||||
{
|
{
|
||||||
|
IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
|
||||||
|
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(profile);
|
||||||
|
|
||||||
if (!devConf || !qtVersion)
|
if (!devConf || !qtVersion)
|
||||||
return Utils::PortList();
|
return Utils::PortList();
|
||||||
if (devConf->machineType() == LinuxDeviceConfiguration::Emulator) {
|
if (devConf->machineType() == IDevice::Emulator) {
|
||||||
MaemoQemuRuntime rt;
|
MaemoQemuRuntime rt;
|
||||||
const int id = qtVersion->uniqueId();
|
const int id = qtVersion->uniqueId();
|
||||||
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
|
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
|
||||||
|
@@ -41,11 +41,8 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QProcess;
|
class QProcess;
|
||||||
class QString;
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace QtSupport { class BaseQtVersion; }
|
|
||||||
namespace RemoteLinux { class LinuxDeviceConfiguration; }
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class Profile;
|
class Profile;
|
||||||
class Target;
|
class Target;
|
||||||
@@ -96,8 +93,7 @@ public:
|
|||||||
static int applicationIconSize(const ProjectExplorer::Target *target);
|
static int applicationIconSize(const ProjectExplorer::Target *target);
|
||||||
static QString remoteSudo(Core::Id deviceType, const QString &uname);
|
static QString remoteSudo(Core::Id deviceType, const QString &uname);
|
||||||
static QString remoteSourceProfilesCommand();
|
static QString remoteSourceProfilesCommand();
|
||||||
static Utils::PortList freePorts(const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
|
static Utils::PortList freePorts(const ProjectExplorer::Profile *profile);
|
||||||
const QtSupport::BaseQtVersion *qtVersion);
|
|
||||||
|
|
||||||
static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath);
|
static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath);
|
||||||
static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath);
|
static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath);
|
||||||
|
@@ -34,10 +34,8 @@
|
|||||||
#include "maemopublishingwizardfremantlefree.h"
|
#include "maemopublishingwizardfremantlefree.h"
|
||||||
|
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qmakestep.h>
|
|
||||||
#include <qt4projectmanager/qt4project.h>
|
#include <qt4projectmanager/qt4project.h>
|
||||||
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include <qtsupport/qtsupportconstants.h>
|
||||||
|
@@ -50,8 +50,6 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <qtsupport/qtversionmanager.h>
|
#include <qtsupport/qtversionmanager.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
|
||||||
#include <remotelinux/remotelinuxrunconfiguration.h>
|
#include <remotelinux/remotelinuxrunconfiguration.h>
|
||||||
#include <utils/filesystemwatcher.h>
|
#include <utils/filesystemwatcher.h>
|
||||||
|
|
||||||
@@ -68,7 +66,6 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Qt4ProjectManager;
|
|
||||||
using namespace RemoteLinux;
|
using namespace RemoteLinux;
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
@@ -516,10 +513,8 @@ bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target,
|
|||||||
|
|
||||||
if (qtVersion)
|
if (qtVersion)
|
||||||
*qtVersion = version;
|
*qtVersion = version;
|
||||||
const LinuxDeviceConfiguration::ConstPtr &config
|
const IDevice::ConstPtr config = DeviceProfileInformation::device(target->profile());
|
||||||
= ProjectExplorer::DeviceProfileInformation::device(target->profile())
|
return !config.isNull() && config->machineType() == IDevice::Emulator;
|
||||||
.dynamicCast<const LinuxDeviceConfiguration>();
|
|
||||||
return !config.isNull() && config->machineType() == LinuxDeviceConfiguration::Emulator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoQemuManager::notify(const QList<int> uniqueIds)
|
void MaemoQemuManager::notify(const QList<int> uniqueIds)
|
||||||
|
@@ -40,8 +40,6 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
using namespace RemoteLinux;
|
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
@@ -31,14 +31,14 @@
|
|||||||
|
|
||||||
#include "maemoglobal.h"
|
#include "maemoglobal.h"
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
using namespace RemoteLinux;
|
using namespace ProjectExplorer;
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
using namespace RemoteLinux;
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -51,7 +51,7 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
|
|||||||
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
||||||
|
|
||||||
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
|
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
|
||||||
const LinuxDeviceConfiguration::ConstPtr &devConf,
|
const IDevice::ConstPtr &devConf,
|
||||||
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
||||||
{
|
{
|
||||||
Q_ASSERT(connection->state() == SshConnection::Connected);
|
Q_ASSERT(connection->state() == SshConnection::Connected);
|
||||||
|
@@ -32,21 +32,16 @@
|
|||||||
#define MAEMOREMOTECOPYFACILITY_H
|
#define MAEMOREMOTECOPYFACILITY_H
|
||||||
|
|
||||||
#include <remotelinux/deployablefile.h>
|
#include <remotelinux/deployablefile.h>
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QObject>
|
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
namespace QSsh {
|
namespace QSsh {
|
||||||
class SshConnection;
|
class SshConnection;
|
||||||
class SshRemoteProcessRunner;
|
class SshRemoteProcessRunner;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace RemoteLinux {
|
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -58,7 +53,7 @@ public:
|
|||||||
~MaemoRemoteCopyFacility();
|
~MaemoRemoteCopyFacility();
|
||||||
|
|
||||||
void copyFiles(QSsh::SshConnection *connection,
|
void copyFiles(QSsh::SshConnection *connection,
|
||||||
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
|
const ProjectExplorer::IDevice::ConstPtr &devConf,
|
||||||
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
|
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|
||||||
@@ -81,7 +76,7 @@ private:
|
|||||||
|
|
||||||
QSsh::SshRemoteProcessRunner *m_copyRunner;
|
QSsh::SshRemoteProcessRunner *m_copyRunner;
|
||||||
QSsh::SshRemoteProcessRunner *m_killProcess;
|
QSsh::SshRemoteProcessRunner *m_killProcess;
|
||||||
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
|
ProjectExplorer::IDevice::ConstPtr m_devConf;
|
||||||
QList<RemoteLinux::DeployableFile> m_deployables;
|
QList<RemoteLinux::DeployableFile> m_deployables;
|
||||||
QString m_mountPoint;
|
QString m_mountPoint;
|
||||||
bool m_isCopying; // TODO: Redundant due to being in sync with m_copyRunner?
|
bool m_isCopying; // TODO: Redundant due to being in sync with m_copyRunner?
|
||||||
|
@@ -33,14 +33,13 @@
|
|||||||
#include "maemoglobal.h"
|
#include "maemoglobal.h"
|
||||||
#include "maemoremotemountsmodel.h"
|
#include "maemoremotemountsmodel.h"
|
||||||
#include "maemorunconfigurationwidget.h"
|
#include "maemorunconfigurationwidget.h"
|
||||||
#include "qt4maemodeployconfiguration.h"
|
|
||||||
|
|
||||||
#include <debugger/debuggerconstants.h>
|
#include <debugger/debuggerconstants.h>
|
||||||
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
|
#include <projectexplorer/profileinformation.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
@@ -48,7 +47,6 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Qt4ProjectManager;
|
|
||||||
using namespace RemoteLinux;
|
using namespace RemoteLinux;
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
@@ -121,9 +119,7 @@ QString MaemoRunConfiguration::environmentPreparationCommand() const
|
|||||||
|
|
||||||
QString MaemoRunConfiguration::commandPrefix() const
|
QString MaemoRunConfiguration::commandPrefix() const
|
||||||
{
|
{
|
||||||
LinuxDeviceConfiguration::ConstPtr dev =
|
IDevice::ConstPtr dev = DeviceProfileInformation::device(target()->profile());
|
||||||
ProjectExplorer::DeviceProfileInformation::device(target()->profile())
|
|
||||||
.dynamicCast<const LinuxDeviceConfiguration>();
|
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
@@ -136,9 +132,7 @@ QString MaemoRunConfiguration::commandPrefix() const
|
|||||||
|
|
||||||
Utils::PortList MaemoRunConfiguration::freePorts() const
|
Utils::PortList MaemoRunConfiguration::freePorts() const
|
||||||
{
|
{
|
||||||
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
|
return MaemoGlobal::freePorts(target()->profile());
|
||||||
return MaemoGlobal::freePorts(ProjectExplorer::DeviceProfileInformation::device(target()->profile())
|
|
||||||
.staticCast<const LinuxDeviceConfiguration>(), version);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MaemoRunConfiguration::localDirToMountForRemoteGdb() const
|
QString MaemoRunConfiguration::localDirToMountForRemoteGdb() const
|
||||||
@@ -162,7 +156,7 @@ QString MaemoRunConfiguration::localDirToMountForRemoteGdb() const
|
|||||||
|
|
||||||
QString MaemoRunConfiguration::remoteProjectSourcesMountPoint() 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_")
|
+ QLatin1String("/gdbSourcesDir_")
|
||||||
+ QFileInfo(localExecutableFilePath()).fileName();
|
+ QFileInfo(localExecutableFilePath()).fileName();
|
||||||
}
|
}
|
||||||
@@ -170,7 +164,7 @@ QString MaemoRunConfiguration::remoteProjectSourcesMountPoint() const
|
|||||||
bool MaemoRunConfiguration::hasEnoughFreePorts(RunMode mode) const
|
bool MaemoRunConfiguration::hasEnoughFreePorts(RunMode mode) const
|
||||||
{
|
{
|
||||||
const int freePortCount = freePorts().count();
|
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 bool remoteMountsAllowed = MaddeDevice::allowsRemoteMounts(typeId);
|
||||||
const int mountDirCount = remoteMountsAllowed
|
const int mountDirCount = remoteMountsAllowed
|
||||||
? remoteMounts()->validMountSpecificationCount() : 0;
|
? remoteMounts()->validMountSpecificationCount() : 0;
|
||||||
|
@@ -33,17 +33,15 @@
|
|||||||
#include "maemoremotemountsmodel.h"
|
#include "maemoremotemountsmodel.h"
|
||||||
#include "maemorunconfiguration.h"
|
#include "maemorunconfiguration.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Qt4ProjectManager;
|
|
||||||
using namespace RemoteLinux;
|
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
using namespace RemoteLinux;
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -68,14 +66,12 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig
|
|||||||
SIGNAL(mountDebugOutput(QString)));
|
SIGNAL(mountDebugOutput(QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
MaemoSshRunner::~MaemoSshRunner() {}
|
|
||||||
|
|
||||||
bool MaemoSshRunner::canRun(QString &whyNot) const
|
bool MaemoSshRunner::canRun(QString &whyNot) const
|
||||||
{
|
{
|
||||||
if (!AbstractRemoteLinuxApplicationRunner::canRun(whyNot))
|
if (!AbstractRemoteLinuxApplicationRunner::canRun(whyNot))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (devConfig()->machineType() == LinuxDeviceConfiguration::Emulator
|
if (devConfig()->machineType() == IDevice::Emulator
|
||||||
&& !MaemoQemuManager::instance().qemuIsRunning()) {
|
&& !MaemoQemuManager::instance().qemuIsRunning()) {
|
||||||
MaemoQemuRuntime rt;
|
MaemoQemuRuntime rt;
|
||||||
if (MaemoQemuManager::instance().runtimeForQtVersion(m_qtId, &rt)) {
|
if (MaemoQemuManager::instance().runtimeForQtVersion(m_qtId, &rt)) {
|
||||||
|
@@ -42,9 +42,9 @@ class MaemoRunConfiguration;
|
|||||||
class MaemoSshRunner : public RemoteLinux::AbstractRemoteLinuxApplicationRunner
|
class MaemoSshRunner : public RemoteLinux::AbstractRemoteLinuxApplicationRunner
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig);
|
MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig);
|
||||||
~MaemoSshRunner();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void mountDebugOutput(const QString &output);
|
void mountDebugOutput(const QString &output);
|
||||||
|
@@ -38,7 +38,6 @@
|
|||||||
#include <coreplugin/documentmanager.h>
|
#include <coreplugin/documentmanager.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <utils/filesystemwatcher.h>
|
#include <utils/filesystemwatcher.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
@@ -35,10 +35,6 @@
|
|||||||
#include "subcomponentmanager.h"
|
#include "subcomponentmanager.h"
|
||||||
#include "model/viewlogger.h"
|
#include "model/viewlogger.h"
|
||||||
|
|
||||||
#include <projectexplorer/target.h>
|
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
|
||||||
|
|
||||||
#include <itemlibraryview.h>
|
#include <itemlibraryview.h>
|
||||||
#include <itemlibrarywidget.h>
|
#include <itemlibrarywidget.h>
|
||||||
#include <navigatorview.h>
|
#include <navigatorview.h>
|
||||||
@@ -62,8 +58,15 @@
|
|||||||
#include <model/modelnodecontextmenu.h>
|
#include <model/modelnodecontextmenu.h>
|
||||||
#include <designmodewidget.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/crumblepath.h>
|
||||||
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -87,12 +90,6 @@
|
|||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
#include <projectexplorer/projectexplorer.h>
|
|
||||||
#include <qt4projectmanager/qt4project.h>
|
|
||||||
#include <qtsupport/qtversionmanager.h>
|
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
|
||||||
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
debug = false
|
debug = false
|
||||||
};
|
};
|
||||||
|
@@ -69,7 +69,6 @@
|
|||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
|
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qt4projectmanager/qt-s60/s60devicedebugruncontrol.h>
|
#include <qt4projectmanager/qt-s60/s60devicedebugruncontrol.h>
|
||||||
#include <qt4projectmanager/qt-s60/s60devicerunconfiguration.h>
|
#include <qt4projectmanager/qt-s60/s60devicerunconfiguration.h>
|
||||||
#include <qt4projectmanager/qt-s60/s60deployconfiguration.h>
|
#include <qt4projectmanager/qt-s60/s60deployconfiguration.h>
|
||||||
|
@@ -79,6 +79,7 @@ bool parseRunningState(const QString &line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
@@ -97,18 +98,16 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBe
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(runConfiguration, return);
|
QTC_ASSERT(runConfiguration, return);
|
||||||
|
|
||||||
Qt4ProjectManager::Qt4BuildConfiguration *qt4BuildConfig = runConfiguration->activeQt4BuildConfiguration();
|
Target *target = runConfiguration->target();
|
||||||
m_environment = qt4BuildConfig->environment();
|
BuildConfiguration *buildConfig = target->activeBuildConfiguration();
|
||||||
|
m_environment = buildConfig->environment();
|
||||||
m_deployCmd = m_environment.searchInPath(QLatin1String(DEPLOY_CMD));
|
m_deployCmd = m_environment.searchInPath(QLatin1String(DEPLOY_CMD));
|
||||||
|
|
||||||
m_deviceHost = runConfiguration->deployConfiguration()->deviceHost();
|
m_deviceHost = runConfiguration->deployConfiguration()->deviceHost();
|
||||||
m_password = runConfiguration->deployConfiguration()->password();
|
m_password = runConfiguration->deployConfiguration()->password();
|
||||||
|
m_barPackage = runConfiguration->barPackage();
|
||||||
|
|
||||||
BlackBerryRunConfiguration *blackberryRunConfiguration = qobject_cast<BlackBerryRunConfiguration *>(runConfiguration);
|
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->profile());
|
||||||
if (blackberryRunConfiguration)
|
|
||||||
m_barPackage = blackberryRunConfiguration->barPackage();
|
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfiguration->target()->profile());
|
|
||||||
m_sshParams = device->sshParameters();
|
m_sshParams = device->sshParameters();
|
||||||
// The BlackBerry device always uses key authentication
|
// The BlackBerry device always uses key authentication
|
||||||
m_sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByKey;
|
m_sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByKey;
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include "blackberryrunconfiguration.h"
|
#include "blackberryrunconfiguration.h"
|
||||||
#include "blackberrydeployconfiguration.h"
|
#include "blackberrydeployconfiguration.h"
|
||||||
|
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
@@ -90,8 +91,9 @@ BlackBerryConnect::BlackBerryConnect(BlackBerryRunConfiguration *runConfig)
|
|||||||
m_process = new QProcess(this);
|
m_process = new QProcess(this);
|
||||||
|
|
||||||
Utils::Environment env;
|
Utils::Environment env;
|
||||||
if (runConfig->activeQt4BuildConfiguration())
|
Target *target = runConfig->target();
|
||||||
env = runConfig->activeQt4BuildConfiguration()->environment();
|
if (target->activeBuildConfiguration())
|
||||||
|
env = target->activeBuildConfiguration()->environment();
|
||||||
|
|
||||||
m_process->setEnvironment(env.toStringList());
|
m_process->setEnvironment(env.toStringList());
|
||||||
m_connectCmd = env.searchInPath(QLatin1String(CONNECT_CMD));
|
m_connectCmd = env.searchInPath(QLatin1String(CONNECT_CMD));
|
||||||
@@ -101,7 +103,7 @@ BlackBerryConnect::BlackBerryConnect(BlackBerryRunConfiguration *runConfig)
|
|||||||
m_deviceHost = deployConfig->deviceHost();
|
m_deviceHost = deployConfig->deviceHost();
|
||||||
m_password = deployConfig->password();
|
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");
|
m_publicKeyFile = device->sshParameters().privateKeyFile + QLatin1String(".pub");
|
||||||
|
|
||||||
connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));
|
connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
|
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
|
||||||
: RemoteLinux::LinuxDeviceConfiguration()
|
: RemoteLinux::LinuxDeviceConfiguration()
|
||||||
@@ -47,8 +48,8 @@ BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
|
|||||||
}
|
}
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
|
BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
|
||||||
RemoteLinux::LinuxDeviceConfiguration::MachineType machineType,
|
IDevice::MachineType machineType,
|
||||||
ProjectExplorer::IDevice::Origin origin, Core::Id id)
|
IDevice::Origin origin, Core::Id id)
|
||||||
: RemoteLinux::LinuxDeviceConfiguration(name, type, machineType, origin, 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,
|
BlackBerryDeviceConfiguration::Ptr BlackBerryDeviceConfiguration::create(const QString &name, Core::Id type,
|
||||||
RemoteLinux::LinuxDeviceConfiguration::MachineType machineType,
|
IDevice::MachineType machineType,
|
||||||
ProjectExplorer::IDevice::Origin origin, Core::Id id)
|
IDevice::Origin origin, Core::Id id)
|
||||||
{
|
{
|
||||||
return Ptr(new BlackBerryDeviceConfiguration(name, type, machineType, origin, 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();
|
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));
|
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>();
|
return dev.dynamicCast<const BlackBerryDeviceConfiguration>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ QString BlackBerryDeviceConfiguration::displayType() const
|
|||||||
return tr("BlackBerry");
|
return tr("BlackBerry");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDeviceWidget *BlackBerryDeviceConfiguration::createWidget()
|
IDeviceWidget *BlackBerryDeviceConfiguration::createWidget()
|
||||||
{
|
{
|
||||||
return new BlackBerryDeviceConfigurationWidget(sharedFromThis()
|
return new BlackBerryDeviceConfigurationWidget(sharedFromThis()
|
||||||
.staticCast<BlackBerryDeviceConfiguration>());
|
.staticCast<BlackBerryDeviceConfiguration>());
|
||||||
|
@@ -35,15 +35,14 @@
|
|||||||
#include "ui_blackberrydeviceconfigurationwidget.h"
|
#include "ui_blackberrydeviceconfigurationwidget.h"
|
||||||
#include "qnxconstants.h"
|
#include "qnxconstants.h"
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
|
||||||
|
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const ProjectExplorer::IDevice::Ptr &device, QWidget *parent) :
|
BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent) :
|
||||||
ProjectExplorer::IDeviceWidget(device, parent),
|
IDeviceWidget(device, parent),
|
||||||
ui(new Ui::BlackBerryDeviceConfigurationWidget)
|
ui(new Ui::BlackBerryDeviceConfigurationWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@@ -112,7 +111,7 @@ void BlackBerryDeviceConfigurationWidget::initGui()
|
|||||||
ui->showPasswordCheckBox->setChecked(false);
|
ui->showPasswordCheckBox->setChecked(false);
|
||||||
ui->debugToken->setPath(deviceConfiguration()->debugToken());
|
ui->debugToken->setPath(deviceConfiguration()->debugToken());
|
||||||
|
|
||||||
if (deviceConfiguration()->machineType() == RemoteLinux::LinuxDeviceConfiguration::Emulator) {
|
if (deviceConfiguration()->machineType() == IDevice::Emulator) {
|
||||||
ui->debugToken->setEnabled(false);
|
ui->debugToken->setEnabled(false);
|
||||||
ui->debugTokenLabel->setEnabled(false);
|
ui->debugTokenLabel->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
@@ -110,12 +111,9 @@ QString BlackBerryDeviceConfigurationWizardSetupPage::debugToken() const
|
|||||||
return m_ui->debugToken->fileName().toString();
|
return m_ui->debugToken->fileName().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinux::LinuxDeviceConfiguration::MachineType BlackBerryDeviceConfigurationWizardSetupPage::machineType() const
|
IDevice::MachineType BlackBerryDeviceConfigurationWizardSetupPage::machineType() const
|
||||||
{
|
{
|
||||||
if (m_ui->physicalDevice->isChecked())
|
return m_ui->physicalDevice->isChecked() ? IDevice::Hardware : IDevice::Emulator;
|
||||||
return RemoteLinux::LinuxDeviceConfiguration::Hardware;
|
|
||||||
else
|
|
||||||
return RemoteLinux::LinuxDeviceConfiguration::Emulator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -63,7 +63,7 @@ public:
|
|||||||
QString hostName() const;
|
QString hostName() const;
|
||||||
QString password() const;
|
QString password() const;
|
||||||
QString debugToken() const;
|
QString debugToken() const;
|
||||||
RemoteLinux::LinuxDeviceConfiguration::MachineType machineType() const;
|
ProjectExplorer::IDevice::MachineType machineType() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::BlackBerryDeviceConfigurationWizardSetupPage *m_ui;
|
Ui::BlackBerryDeviceConfigurationWizardSetupPage *m_ui;
|
||||||
|
@@ -142,11 +142,6 @@ BlackBerryDeployConfiguration *BlackBerryRunConfiguration::deployConfiguration()
|
|||||||
return qobject_cast<BlackBerryDeployConfiguration *>(target()->activeDeployConfiguration());
|
return qobject_cast<BlackBerryDeployConfiguration *>(target()->activeDeployConfiguration());
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt4ProjectManager::Qt4BuildConfiguration *BlackBerryRunConfiguration::activeQt4BuildConfiguration() const
|
|
||||||
{
|
|
||||||
return static_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(activeBuildConfiguration());
|
|
||||||
}
|
|
||||||
|
|
||||||
QString BlackBerryRunConfiguration::key() const
|
QString BlackBerryRunConfiguration::key() const
|
||||||
{
|
{
|
||||||
return barPackage() + QLatin1Char('_') + BlackBerryDeviceConfiguration::device(target()->profile())->sshParameters().host;
|
return barPackage() + QLatin1Char('_') + BlackBerryDeviceConfiguration::device(target()->profile())->sshParameters().host;
|
||||||
|
@@ -57,7 +57,7 @@ QnxDeviceConfiguration::Ptr QnxDeviceConfiguration::create()
|
|||||||
return Ptr(new QnxDeviceConfiguration);
|
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));
|
return Ptr(new QnxDeviceConfiguration(name, type, machineType, origin, id));
|
||||||
}
|
}
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ QnxDeviceConfigurationWizard::QnxDeviceConfigurationWizard(QWidget *parent) :
|
|||||||
m_finalPage->setCommitPage(true);
|
m_finalPage->setCommitPage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationWizard::device()
|
IDevice::Ptr QnxDeviceConfigurationWizard::device()
|
||||||
{
|
{
|
||||||
QSsh::SshConnectionParameters sshParams;
|
QSsh::SshConnectionParameters sshParams;
|
||||||
sshParams.proxyType = QSsh::SshConnectionParameters::NoProxy;
|
sshParams.proxyType = QSsh::SshConnectionParameters::NoProxy;
|
||||||
@@ -76,7 +77,7 @@ ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationWizard::device()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QnxDeviceConfiguration::Ptr devConf = QnxDeviceConfiguration::create(m_setupPage->configurationName(),
|
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->setSshParameters(sshParams);
|
||||||
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
||||||
|
|
||||||
|
@@ -45,27 +45,58 @@
|
|||||||
#include <debugger/debuggerrunner.h>
|
#include <debugger/debuggerrunner.h>
|
||||||
#include <debugger/debuggerstartparameters.h>
|
#include <debugger/debuggerstartparameters.h>
|
||||||
#include <debugger/debuggerprofileinformation.h>
|
#include <debugger/debuggerprofileinformation.h>
|
||||||
|
#include <debugger/debuggerstartparameters.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
|
|
||||||
|
using namespace Debugger;
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
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)
|
QnxRunControlFactory::QnxRunControlFactory(QObject *parent)
|
||||||
: IRunControlFactory(parent)
|
: IRunControlFactory(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QnxRunControlFactory::~QnxRunControlFactory()
|
bool QnxRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
|
||||||
{
|
{
|
||||||
}
|
if (mode != NormalRunMode && mode != DebugRunMode)
|
||||||
|
|
||||||
bool QnxRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode) const
|
|
||||||
{
|
|
||||||
if (mode != ProjectExplorer::NormalRunMode && mode != ProjectExplorer::DebugRunMode)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!runConfiguration->isEnabled()
|
if (!runConfiguration->isEnabled()
|
||||||
@@ -75,8 +106,8 @@ bool QnxRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfigur
|
|||||||
|
|
||||||
|
|
||||||
const QnxRunConfiguration * const rc = qobject_cast<QnxRunConfiguration *>(runConfiguration);
|
const QnxRunConfiguration * const rc = qobject_cast<QnxRunConfiguration *>(runConfiguration);
|
||||||
if (mode == ProjectExplorer::DebugRunMode) {
|
if (mode == DebugRunMode) {
|
||||||
const QnxDeviceConfiguration::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(runConfiguration->target()->profile())
|
const QnxDeviceConfiguration::ConstPtr dev = DeviceProfileInformation::device(runConfiguration->target()->profile())
|
||||||
.dynamicCast<const QnxDeviceConfiguration>();
|
.dynamicCast<const QnxDeviceConfiguration>();
|
||||||
if (dev.isNull())
|
if (dev.isNull())
|
||||||
return false;
|
return false;
|
||||||
@@ -85,17 +116,17 @@ bool QnxRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfigur
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::RunControl *QnxRunControlFactory::create(ProjectExplorer::RunConfiguration *runConfig, ProjectExplorer::RunMode mode)
|
RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, RunMode mode)
|
||||||
{
|
{
|
||||||
Q_ASSERT(canRun(runConfig, mode));
|
Q_ASSERT(canRun(runConfig, mode));
|
||||||
|
|
||||||
QnxRunConfiguration *rc = qobject_cast<QnxRunConfiguration *>(runConfig);
|
QnxRunConfiguration *rc = qobject_cast<QnxRunConfiguration *>(runConfig);
|
||||||
Q_ASSERT(rc);
|
Q_ASSERT(rc);
|
||||||
if (mode == ProjectExplorer::NormalRunMode)
|
if (mode == NormalRunMode)
|
||||||
return new QnxRunControl(rc);
|
return new QnxRunControl(rc);
|
||||||
|
|
||||||
const Debugger::DebuggerStartParameters params = startParameters(rc);
|
const DebuggerStartParameters params = createStartParameters(rc);
|
||||||
Debugger::DebuggerRunControl * const runControl = Debugger::DebuggerPlugin::createDebugger(params, rc);
|
DebuggerRunControl * const runControl = DebuggerPlugin::createDebugger(params, rc);
|
||||||
if (!runControl)
|
if (!runControl)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -110,42 +141,8 @@ QString QnxRunControlFactory::displayName() const
|
|||||||
return tr("Run on remote QNX device");
|
return tr("Run on remote QNX device");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::RunConfigWidget *QnxRunControlFactory::createConfigurationWidget(ProjectExplorer::RunConfiguration *config)
|
RunConfigWidget *QnxRunControlFactory::createConfigurationWidget(RunConfiguration *config)
|
||||||
{
|
{
|
||||||
Q_UNUSED(config)
|
Q_UNUSED(config)
|
||||||
return 0;
|
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;
|
|
||||||
}
|
|
||||||
|
@@ -34,20 +34,17 @@
|
|||||||
#ifndef QNX_INTERNAL_QNXRUNCONTROLFACTORY_H
|
#ifndef QNX_INTERNAL_QNXRUNCONTROLFACTORY_H
|
||||||
#define QNX_INTERNAL_QNXRUNCONTROLFACTORY_H
|
#define QNX_INTERNAL_QNXRUNCONTROLFACTORY_H
|
||||||
|
|
||||||
#include <debugger/debuggerstartparameters.h>
|
|
||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
|
|
||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QnxRunConfiguration;
|
|
||||||
|
|
||||||
class QnxRunControlFactory : public ProjectExplorer::IRunControlFactory
|
class QnxRunControlFactory : public ProjectExplorer::IRunControlFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QnxRunControlFactory(QObject *parent = 0);
|
explicit QnxRunControlFactory(QObject *parent = 0);
|
||||||
~QnxRunControlFactory();
|
|
||||||
|
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration *runConfiguration);
|
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration *runConfiguration);
|
||||||
@@ -56,9 +53,6 @@ public:
|
|||||||
ProjectExplorer::RunMode mode) const;
|
ProjectExplorer::RunMode mode) const;
|
||||||
ProjectExplorer::RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration,
|
ProjectExplorer::RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration,
|
||||||
ProjectExplorer::RunMode mode);
|
ProjectExplorer::RunMode mode);
|
||||||
|
|
||||||
private:
|
|
||||||
static Debugger::DebuggerStartParameters startParameters( const QnxRunConfiguration *runConfig);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
#include "externaleditors.h"
|
#include "externaleditors.h"
|
||||||
#include "qt4project.h"
|
#include "qt4project.h"
|
||||||
#include "qt4projectmanagerconstants.h"
|
#include "qt4projectmanagerconstants.h"
|
||||||
#include "qt4buildconfiguration.h"
|
|
||||||
|
|
||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
|
@@ -32,8 +32,8 @@
|
|||||||
#include "deployablefile.h"
|
#include "deployablefile.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdeviceconfiguration.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace ProjectExplorer;
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
@@ -86,9 +86,9 @@ public:
|
|||||||
AbstractRemoteLinuxDeployServicePrivate()
|
AbstractRemoteLinuxDeployServicePrivate()
|
||||||
: profile(0), connection(0), state(Inactive), stopRequested(false) {}
|
: profile(0), connection(0), state(Inactive), stopRequested(false) {}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::ConstPtr deviceConfiguration;
|
IDevice::ConstPtr deviceConfiguration;
|
||||||
QPointer<Qt4BuildConfiguration> buildConfiguration;
|
QPointer<BuildConfiguration> buildConfiguration;
|
||||||
ProjectExplorer::Profile *profile;
|
Profile *profile;
|
||||||
SshConnection *connection;
|
SshConnection *connection;
|
||||||
State state;
|
State state;
|
||||||
bool stopRequested;
|
bool stopRequested;
|
||||||
@@ -109,17 +109,17 @@ AbstractRemoteLinuxDeployService::~AbstractRemoteLinuxDeployService()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Qt4BuildConfiguration *AbstractRemoteLinuxDeployService::qt4BuildConfiguration() const
|
const BuildConfiguration *AbstractRemoteLinuxDeployService::buildConfiguration() const
|
||||||
{
|
{
|
||||||
return d->buildConfiguration;
|
return d->buildConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProjectExplorer::Profile *AbstractRemoteLinuxDeployService::profile() const
|
const Profile *AbstractRemoteLinuxDeployService::profile() const
|
||||||
{
|
{
|
||||||
return d->profile;
|
return d->profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::ConstPtr AbstractRemoteLinuxDeployService::deviceConfiguration() const
|
IDevice::ConstPtr AbstractRemoteLinuxDeployService::deviceConfiguration() const
|
||||||
{
|
{
|
||||||
return d->deviceConfiguration;
|
return d->deviceConfiguration;
|
||||||
}
|
}
|
||||||
@@ -136,8 +136,8 @@ void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableF
|
|||||||
const QtSupport::BaseQtVersion *const qtVersion
|
const QtSupport::BaseQtVersion *const qtVersion
|
||||||
= QtSupport::QtProfileInformation::qtVersion(d->profile);
|
= QtSupport::QtProfileInformation::qtVersion(d->profile);
|
||||||
QString systemRoot;
|
QString systemRoot;
|
||||||
if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->profile))
|
if (SysRootProfileInformation::hasSysRoot(d->profile))
|
||||||
systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->profile).toString();
|
systemRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
|
||||||
if (!qtVersion || !qtVersion->isValid())
|
if (!qtVersion || !qtVersion->isValid())
|
||||||
return;
|
return;
|
||||||
d->lastDeployed.insert(DeployParameters(deployableFile,
|
d->lastDeployed.insert(DeployParameters(deployableFile,
|
||||||
@@ -155,26 +155,22 @@ bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const Deplo
|
|||||||
if (!qtVersion || !qtVersion->isValid())
|
if (!qtVersion || !qtVersion->isValid())
|
||||||
return true;
|
return true;
|
||||||
QString systemRoot;
|
QString systemRoot;
|
||||||
if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->profile))
|
if (SysRootProfileInformation::hasSysRoot(d->profile))
|
||||||
systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->profile).toString();
|
systemRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
|
||||||
const QDateTime &lastDeployed = d->lastDeployed.value(DeployParameters(deployableFile,
|
const QDateTime &lastDeployed = d->lastDeployed.value(DeployParameters(deployableFile,
|
||||||
deviceConfiguration()->sshParameters().host, systemRoot));
|
deviceConfiguration()->sshParameters().host, systemRoot));
|
||||||
return !lastDeployed.isValid()
|
return !lastDeployed.isValid()
|
||||||
|| QFileInfo(deployableFile.localFilePath).lastModified() > lastDeployed;
|
|| QFileInfo(deployableFile.localFilePath).lastModified() > lastDeployed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployService::setDeviceConfiguration(const LinuxDeviceConfiguration::ConstPtr &deviceConfiguration)
|
void AbstractRemoteLinuxDeployService::setBuildConfiguration(BuildConfiguration *bc)
|
||||||
{
|
|
||||||
d->deviceConfiguration = deviceConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployService::setBuildConfiguration(Qt4BuildConfiguration *bc)
|
|
||||||
{
|
{
|
||||||
d->buildConfiguration = bc;
|
d->buildConfiguration = bc;
|
||||||
if (bc && bc->target())
|
if (bc && bc->target())
|
||||||
d->profile = bc->target()->profile();
|
d->profile = bc->target()->profile();
|
||||||
else
|
else
|
||||||
d->profile = 0;
|
d->profile = 0;
|
||||||
|
d->deviceConfiguration = DeviceProfileInformation::device(d->profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployService::start()
|
void AbstractRemoteLinuxDeployService::start()
|
||||||
@@ -282,7 +278,7 @@ void AbstractRemoteLinuxDeployService::handleDeviceSetupDone(bool success)
|
|||||||
}
|
}
|
||||||
|
|
||||||
d->state = Connecting;
|
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)),
|
connect(d->connection, SIGNAL(error(QSsh::SshError)),
|
||||||
SLOT(handleConnectionFailure()));
|
SLOT(handleConnectionFailure()));
|
||||||
if (d->connection->state() == SshConnection::Connected) {
|
if (d->connection->state() == SshConnection::Connected) {
|
||||||
@@ -324,7 +320,7 @@ void AbstractRemoteLinuxDeployService::handleConnectionFailure()
|
|||||||
break;
|
break;
|
||||||
case Connecting: {
|
case Connecting: {
|
||||||
QString errorMsg = tr("Could not connect to host: %1").arg(d->connection->errorString());
|
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?");
|
errorMsg += tr("\nDid the emulator fail to start?");
|
||||||
else
|
else
|
||||||
errorMsg += tr("\nIs the device connected and set up for network access?");
|
errorMsg += tr("\nIs the device connected and set up for network access?");
|
||||||
|
@@ -32,18 +32,22 @@
|
|||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
namespace QSsh { class SshConnection; }
|
namespace QSsh { class SshConnection; }
|
||||||
namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
|
|
||||||
namespace ProjectExplorer { class Profile; }
|
namespace ProjectExplorer {
|
||||||
|
class BuildConfiguration;
|
||||||
|
class Profile;
|
||||||
|
}
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class DeployableFile;
|
class DeployableFile;
|
||||||
class DeploymentInfo;
|
class DeploymentInfo;
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class AbstractRemoteLinuxDeployServicePrivate;
|
class AbstractRemoteLinuxDeployServicePrivate;
|
||||||
@@ -57,8 +61,7 @@ public:
|
|||||||
explicit AbstractRemoteLinuxDeployService(QObject *parent = 0);
|
explicit AbstractRemoteLinuxDeployService(QObject *parent = 0);
|
||||||
~AbstractRemoteLinuxDeployService();
|
~AbstractRemoteLinuxDeployService();
|
||||||
|
|
||||||
void setDeviceConfiguration(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration);
|
void setBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
|
||||||
void setBuildConfiguration(Qt4ProjectManager::Qt4BuildConfiguration *bc);
|
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
@@ -75,9 +78,9 @@ signals:
|
|||||||
void stdErrData(const QString &data);
|
void stdErrData(const QString &data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const Qt4ProjectManager::Qt4BuildConfiguration *qt4BuildConfiguration() const;
|
const ProjectExplorer::BuildConfiguration *buildConfiguration() const;
|
||||||
const ProjectExplorer::Profile *profile() const;
|
const ProjectExplorer::Profile *profile() const;
|
||||||
QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const;
|
ProjectExplorer::IDevice::ConstPtr deviceConfiguration() const;
|
||||||
QSsh::SshConnection *connection() const;
|
QSsh::SshConnection *connection() const;
|
||||||
|
|
||||||
void saveDeploymentTimeStamp(const DeployableFile &deployableFile);
|
void saveDeploymentTimeStamp(const DeployableFile &deployableFile);
|
||||||
|
@@ -27,17 +27,16 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "abstractremotelinuxdeploystep.h"
|
#include "abstractremotelinuxdeploystep.h"
|
||||||
|
|
||||||
#include "abstractremotelinuxdeployservice.h"
|
#include "abstractremotelinuxdeployservice.h"
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "remotelinuxdeployconfiguration.h"
|
#include "remotelinuxdeployconfiguration.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
@@ -85,9 +84,7 @@ QVariantMap AbstractRemoteLinuxDeployStep::toMap() const
|
|||||||
bool AbstractRemoteLinuxDeployStep::init()
|
bool AbstractRemoteLinuxDeployStep::init()
|
||||||
{
|
{
|
||||||
QString error;
|
QString error;
|
||||||
deployService()->setDeviceConfiguration(ProjectExplorer::DeviceProfileInformation::device(target()->profile())
|
deployService()->setBuildConfiguration(target()->activeBuildConfiguration());
|
||||||
.dynamicCast<const LinuxDeviceConfiguration>());
|
|
||||||
deployService()->setBuildConfiguration(qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()));
|
|
||||||
const bool canDeploy = initInternal(&error);
|
const bool canDeploy = initInternal(&error);
|
||||||
if (!canDeploy)
|
if (!canDeploy)
|
||||||
emit addOutput(tr("Cannot deploy: %1").arg(error), ErrorMessageOutput);
|
emit addOutput(tr("Cannot deploy: %1").arg(error), ErrorMessageOutput);
|
||||||
@@ -138,7 +135,7 @@ void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
|
|||||||
{
|
{
|
||||||
emit addOutput(message, ErrorMessageOutput);
|
emit addOutput(message, ErrorMessageOutput);
|
||||||
emit addTask(Task(Task::Error, message, Utils::FileName(), -1,
|
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;
|
d->hasError = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +143,7 @@ void AbstractRemoteLinuxDeployStep::handleWarningMessage(const QString &message)
|
|||||||
{
|
{
|
||||||
emit addOutput(message, ErrorMessageOutput);
|
emit addOutput(message, ErrorMessageOutput);
|
||||||
emit addTask(Task(Task::Warning, message, Utils::FileName(), -1,
|
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()
|
void AbstractRemoteLinuxDeployStep::handleFinished()
|
||||||
|
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <projectexplorer/buildstep.h>
|
#include <projectexplorer/buildstep.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qt4projectmanager/qt4project.h>
|
#include <qt4projectmanager/qt4project.h>
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
#include <qtsupport/qtprofileinformation.h>
|
||||||
|
|
||||||
|
@@ -71,8 +71,8 @@ bool GenericLinuxDeviceConfigurationFactory::canRestore(const QVariantMap &map)
|
|||||||
|
|
||||||
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::restore(const QVariantMap &map) const
|
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::restore(const QVariantMap &map) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(canRestore(map), return LinuxDeviceConfiguration::Ptr());
|
QTC_ASSERT(canRestore(map), return IDevice::Ptr());
|
||||||
const LinuxDeviceConfiguration::Ptr device = LinuxDeviceConfiguration::create();
|
const IDevice::Ptr device = LinuxDeviceConfiguration::create();
|
||||||
device->fromMap(map);
|
device->fromMap(map);
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
@@ -36,14 +36,14 @@
|
|||||||
|
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace RemoteLinux;
|
using namespace RemoteLinux;
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
|
GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
|
||||||
const LinuxDeviceConfiguration::Ptr &deviceConfig,
|
const IDevice::Ptr &deviceConfig, QWidget *parent) :
|
||||||
QWidget *parent) :
|
IDeviceWidget(deviceConfig, parent),
|
||||||
ProjectExplorer::IDeviceWidget(deviceConfig, parent),
|
|
||||||
m_ui(new Ui::GenericLinuxDeviceConfigurationWidget)
|
m_ui(new Ui::GenericLinuxDeviceConfigurationWidget)
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
@@ -72,12 +72,12 @@ GenericLinuxDeviceConfigurationWidget::~GenericLinuxDeviceConfigurationWidget()
|
|||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged()
|
void GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
const bool usePassword = m_ui->passwordButton->isChecked();
|
const bool usePassword = m_ui->passwordButton->isChecked();
|
||||||
sshParams.authenticationType = usePassword
|
sshParams.authenticationType = usePassword
|
||||||
? SshConnectionParameters::AuthenticationByPassword
|
? SshConnectionParameters::AuthenticationByPassword
|
||||||
: SshConnectionParameters::AuthenticationByKey;
|
: SshConnectionParameters::AuthenticationByKey;
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
m_ui->pwdLineEdit->setEnabled(usePassword);
|
m_ui->pwdLineEdit->setEnabled(usePassword);
|
||||||
m_ui->passwordLabel->setEnabled(usePassword);
|
m_ui->passwordLabel->setEnabled(usePassword);
|
||||||
m_ui->keyFileLineEdit->setEnabled(!usePassword);
|
m_ui->keyFileLineEdit->setEnabled(!usePassword);
|
||||||
@@ -86,49 +86,49 @@ void GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged()
|
|||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::hostNameEditingFinished()
|
void GenericLinuxDeviceConfigurationWidget::hostNameEditingFinished()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.host = m_ui->hostLineEdit->text().trimmed();
|
sshParams.host = m_ui->hostLineEdit->text().trimmed();
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::sshPortEditingFinished()
|
void GenericLinuxDeviceConfigurationWidget::sshPortEditingFinished()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.port = m_ui->sshPortSpinBox->value();
|
sshParams.port = m_ui->sshPortSpinBox->value();
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::timeoutEditingFinished()
|
void GenericLinuxDeviceConfigurationWidget::timeoutEditingFinished()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.timeout = m_ui->timeoutSpinBox->value();
|
sshParams.timeout = m_ui->timeoutSpinBox->value();
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::userNameEditingFinished()
|
void GenericLinuxDeviceConfigurationWidget::userNameEditingFinished()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.userName = m_ui->userLineEdit->text();
|
sshParams.userName = m_ui->userLineEdit->text();
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::passwordEditingFinished()
|
void GenericLinuxDeviceConfigurationWidget::passwordEditingFinished()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.password = m_ui->pwdLineEdit->text();
|
sshParams.password = m_ui->pwdLineEdit->text();
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished()
|
void GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished()
|
||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.privateKeyFile = m_ui->keyFileLineEdit->path();
|
sshParams.privateKeyFile = m_ui->keyFileLineEdit->path();
|
||||||
deviceConfiguration()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::handleFreePortsChanged()
|
void GenericLinuxDeviceConfigurationWidget::handleFreePortsChanged()
|
||||||
{
|
{
|
||||||
deviceConfiguration()->setFreePorts(PortList::fromString(m_ui->portsLineEdit->text()));
|
device()->setFreePorts(PortList::fromString(m_ui->portsLineEdit->text()));
|
||||||
updatePortsWarningLabel();
|
updatePortsWarningLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,12 +153,12 @@ void GenericLinuxDeviceConfigurationWidget::createNewKey()
|
|||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::updatePortsWarningLabel()
|
void GenericLinuxDeviceConfigurationWidget::updatePortsWarningLabel()
|
||||||
{
|
{
|
||||||
m_ui->portsWarningLabel->setVisible(!deviceConfiguration()->freePorts().hasMore());
|
m_ui->portsWarningLabel->setVisible(!device()->freePorts().hasMore());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceConfigurationWidget::initGui()
|
void GenericLinuxDeviceConfigurationWidget::initGui()
|
||||||
{
|
{
|
||||||
if (deviceConfiguration()->machineType() == LinuxDeviceConfiguration::Hardware)
|
if (device()->machineType() == IDevice::Hardware)
|
||||||
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
|
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
|
||||||
else
|
else
|
||||||
m_ui->machineTypeValueLabel->setText(tr("Emulator"));
|
m_ui->machineTypeValueLabel->setText(tr("Emulator"));
|
||||||
@@ -171,19 +171,19 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
|
|||||||
= new QRegExpValidator(QRegExp(PortList::regularExpression()), this);
|
= new QRegExpValidator(QRegExp(PortList::regularExpression()), this);
|
||||||
m_ui->portsLineEdit->setValidator(portsValidator);
|
m_ui->portsLineEdit->setValidator(portsValidator);
|
||||||
|
|
||||||
const SshConnectionParameters &sshParams = deviceConfiguration()->sshParameters();
|
const SshConnectionParameters &sshParams = device()->sshParameters();
|
||||||
|
|
||||||
if (sshParams.authenticationType == SshConnectionParameters::AuthenticationByPassword)
|
if (sshParams.authenticationType == SshConnectionParameters::AuthenticationByPassword)
|
||||||
m_ui->passwordButton->setChecked(true);
|
m_ui->passwordButton->setChecked(true);
|
||||||
else
|
else
|
||||||
m_ui->keyButton->setChecked(true);
|
m_ui->keyButton->setChecked(true);
|
||||||
m_ui->timeoutSpinBox->setValue(sshParams.timeout);
|
m_ui->timeoutSpinBox->setValue(sshParams.timeout);
|
||||||
m_ui->hostLineEdit->setEnabled(!deviceConfiguration()->isAutoDetected());
|
m_ui->hostLineEdit->setEnabled(!device()->isAutoDetected());
|
||||||
m_ui->sshPortSpinBox->setEnabled(!deviceConfiguration()->isAutoDetected());
|
m_ui->sshPortSpinBox->setEnabled(!device()->isAutoDetected());
|
||||||
|
|
||||||
m_ui->hostLineEdit->setText(sshParams.host);
|
m_ui->hostLineEdit->setText(sshParams.host);
|
||||||
m_ui->sshPortSpinBox->setValue(sshParams.port);
|
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->timeoutSpinBox->setValue(sshParams.timeout);
|
||||||
m_ui->userLineEdit->setText(sshParams.userName);
|
m_ui->userLineEdit->setText(sshParams.userName);
|
||||||
m_ui->pwdLineEdit->setText(sshParams.password);
|
m_ui->pwdLineEdit->setText(sshParams.password);
|
||||||
@@ -191,8 +191,3 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
|
|||||||
m_ui->showPasswordCheckBox->setChecked(false);
|
m_ui->showPasswordCheckBox->setChecked(false);
|
||||||
updatePortsWarningLabel();
|
updatePortsWarningLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::Ptr GenericLinuxDeviceConfigurationWidget::deviceConfiguration() const
|
|
||||||
{
|
|
||||||
return device().staticCast<LinuxDeviceConfiguration>();
|
|
||||||
}
|
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevicewidget.h>
|
#include <projectexplorer/devicesupport/idevicewidget.h>
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
@@ -48,7 +47,7 @@ class REMOTELINUX_EXPORT GenericLinuxDeviceConfigurationWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GenericLinuxDeviceConfigurationWidget(
|
explicit GenericLinuxDeviceConfigurationWidget(
|
||||||
const LinuxDeviceConfiguration::Ptr &deviceConfig, QWidget *parent = 0);
|
const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0);
|
||||||
~GenericLinuxDeviceConfigurationWidget();
|
~GenericLinuxDeviceConfigurationWidget();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@@ -67,7 +66,6 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void updatePortsWarningLabel();
|
void updatePortsWarningLabel();
|
||||||
void initGui();
|
void initGui();
|
||||||
LinuxDeviceConfiguration::Ptr deviceConfiguration() const;
|
|
||||||
|
|
||||||
Ui::GenericLinuxDeviceConfigurationWidget *m_ui;
|
Ui::GenericLinuxDeviceConfigurationWidget *m_ui;
|
||||||
};
|
};
|
||||||
|
@@ -84,8 +84,8 @@ IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
|
|||||||
sshParams.password = d->setupPage.password();
|
sshParams.password = d->setupPage.password();
|
||||||
else
|
else
|
||||||
sshParams.privateKeyFile = d->setupPage.privateKeyFilePath();
|
sshParams.privateKeyFile = d->setupPage.privateKeyFilePath();
|
||||||
LinuxDeviceConfiguration::Ptr devConf = LinuxDeviceConfiguration::create(d->setupPage.configurationName(),
|
IDevice::Ptr devConf = LinuxDeviceConfiguration::create(d->setupPage.configurationName(),
|
||||||
Core::Id(Constants::GenericLinuxOsType), LinuxDeviceConfiguration::Hardware);
|
Core::Id(Constants::GenericLinuxOsType), IDevice::Hardware);
|
||||||
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
devConf->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
||||||
devConf->setSshParameters(sshParams);
|
devConf->setSshParameters(sshParams);
|
||||||
LinuxDeviceTestDialog dlg(devConf, new GenericLinuxDeviceTester(this), this);
|
LinuxDeviceTestDialog dlg(devConf, new GenericLinuxDeviceTester(this), this);
|
||||||
|
@@ -77,7 +77,7 @@ void GenericLinuxDeviceConfigurationWizardSetupPage::initializePage()
|
|||||||
d->ui.userNameLineEdit->setText(defaultUserName());
|
d->ui.userNameLineEdit->setText(defaultUserName());
|
||||||
d->ui.passwordButton->setChecked(true);
|
d->ui.passwordButton->setChecked(true);
|
||||||
d->ui.passwordLineEdit->setText(defaultPassWord());
|
d->ui.passwordLineEdit->setText(defaultPassWord());
|
||||||
d->ui.privateKeyPathChooser->setPath(LinuxDeviceConfiguration::defaultPrivateKeyFilePath());
|
d->ui.privateKeyPathChooser->setPath(ProjectExplorer::IDevice::defaultPrivateKeyFilePath());
|
||||||
handleAuthTypeChanged();
|
handleAuthTypeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
LinuxDeviceTestDialog::LinuxDeviceTestDialog(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration,
|
LinuxDeviceTestDialog::LinuxDeviceTestDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration,
|
||||||
AbstractLinuxDeviceTester *deviceTester, QWidget *parent)
|
AbstractLinuxDeviceTester *deviceTester, QWidget *parent)
|
||||||
: QDialog(parent), d(new LinuxDeviceTestDialogPrivate(deviceTester))
|
: QDialog(parent), d(new LinuxDeviceTestDialogPrivate(deviceTester))
|
||||||
{
|
{
|
||||||
|
@@ -43,10 +43,10 @@ class LinuxDeviceTestDialogPrivate;
|
|||||||
class REMOTELINUX_EXPORT LinuxDeviceTestDialog : public QDialog
|
class REMOTELINUX_EXPORT LinuxDeviceTestDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
|
||||||
|
|
||||||
|
public:
|
||||||
// Note: The dialog takes ownership of deviceTester
|
// 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);
|
AbstractLinuxDeviceTester * deviceTester, QWidget *parent = 0);
|
||||||
~LinuxDeviceTestDialog();
|
~LinuxDeviceTestDialog();
|
||||||
|
|
||||||
|
@@ -29,13 +29,13 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "linuxdevicetester.h"
|
#include "linuxdevicetester.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
#include "remotelinuxusedportsgatherer.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshremoteprocess.h>
|
#include <ssh/sshremoteprocess.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
@@ -51,7 +51,7 @@ class GenericLinuxDeviceTesterPrivate
|
|||||||
public:
|
public:
|
||||||
GenericLinuxDeviceTesterPrivate() : connection(0), state(Inactive) {}
|
GenericLinuxDeviceTesterPrivate() : connection(0), state(Inactive) {}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::ConstPtr deviceConfiguration;
|
IDevice::ConstPtr deviceConfiguration;
|
||||||
SshConnection *connection;
|
SshConnection *connection;
|
||||||
SshRemoteProcess::Ptr process;
|
SshRemoteProcess::Ptr process;
|
||||||
RemoteLinuxUsedPortsGatherer portsGatherer;
|
RemoteLinuxUsedPortsGatherer portsGatherer;
|
||||||
@@ -77,7 +77,7 @@ GenericLinuxDeviceTester::~GenericLinuxDeviceTester()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericLinuxDeviceTester::testDevice(const LinuxDeviceConfiguration::ConstPtr &deviceConfiguration)
|
void GenericLinuxDeviceTester::testDevice(const IDevice::ConstPtr &deviceConfiguration)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->state == Inactive, return);
|
QTC_ASSERT(d->state == Inactive, return);
|
||||||
|
|
||||||
|
@@ -27,36 +27,33 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef LINUXDEVICETESTER_H
|
#ifndef LINUXDEVICETESTER_H
|
||||||
#define LINUXDEVICETESTER_H
|
#define LINUXDEVICETESTER_H
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QString)
|
|
||||||
|
|
||||||
namespace QSsh {
|
namespace QSsh {
|
||||||
class SshConnection;
|
class SshConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
class RemoteLinuxUsedPortsGatherer;
|
class RemoteLinuxUsedPortsGatherer;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class GenericLinuxDeviceTesterPrivate;
|
class GenericLinuxDeviceTesterPrivate;
|
||||||
} // namespace Internal
|
}
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT AbstractLinuxDeviceTester : public QObject
|
class REMOTELINUX_EXPORT AbstractLinuxDeviceTester : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(AbstractLinuxDeviceTester)
|
|
||||||
public:
|
public:
|
||||||
enum TestResult { TestSuccess, TestFailure };
|
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;
|
virtual void stopTest() = 0;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -72,11 +69,12 @@ protected:
|
|||||||
class REMOTELINUX_EXPORT GenericLinuxDeviceTester : public AbstractLinuxDeviceTester
|
class REMOTELINUX_EXPORT GenericLinuxDeviceTester : public AbstractLinuxDeviceTester
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GenericLinuxDeviceTester(QObject *parent = 0);
|
explicit GenericLinuxDeviceTester(QObject *parent = 0);
|
||||||
~GenericLinuxDeviceTester();
|
~GenericLinuxDeviceTester();
|
||||||
|
|
||||||
void testDevice(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration);
|
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
|
||||||
void stopTest();
|
void stopTest();
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
|
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
|
||||||
|
@@ -28,7 +28,6 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "publickeydeploymentdialog.h"
|
#include "publickeydeploymentdialog.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "sshkeydeployer.h"
|
#include "sshkeydeployer.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
@@ -37,6 +36,8 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class PublicKeyDeploymentDialogPrivate
|
class PublicKeyDeploymentDialogPrivate
|
||||||
@@ -49,7 +50,7 @@ public:
|
|||||||
|
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog(const LinuxDeviceConfiguration::ConstPtr &deviceConfig,
|
PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog(const IDevice::ConstPtr &deviceConfig,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
{
|
{
|
||||||
const QString &dir = QFileInfo(deviceConfig->sshParameters().privateKeyFile).path();
|
const QString &dir = QFileInfo(deviceConfig->sshParameters().privateKeyFile).path();
|
||||||
@@ -62,7 +63,7 @@ PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog(const LinuxDe
|
|||||||
return new PublicKeyDeploymentDialog(deviceConfig, publicKeyFileName, parent);
|
return new PublicKeyDeploymentDialog(deviceConfig, publicKeyFileName, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
PublicKeyDeploymentDialog::PublicKeyDeploymentDialog(const LinuxDeviceConfiguration::ConstPtr &deviceConfig,
|
PublicKeyDeploymentDialog::PublicKeyDeploymentDialog(const IDevice::ConstPtr &deviceConfig,
|
||||||
const QString &publicKeyFileName, QWidget *parent)
|
const QString &publicKeyFileName, QWidget *parent)
|
||||||
: QProgressDialog(parent), d(new PublicKeyDeploymentDialogPrivate)
|
: QProgressDialog(parent), d(new PublicKeyDeploymentDialogPrivate)
|
||||||
{
|
{
|
||||||
|
@@ -31,16 +31,11 @@
|
|||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
#include <QSharedPointer>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QString;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class PublicKeyDeploymentDialogPrivate;
|
class PublicKeyDeploymentDialogPrivate;
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -50,7 +45,7 @@ class REMOTELINUX_EXPORT PublicKeyDeploymentDialog : public QProgressDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
// Asks for public key and returns null if the file dialog is canceled.
|
// 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);
|
QWidget *parent = 0);
|
||||||
|
|
||||||
~PublicKeyDeploymentDialog();
|
~PublicKeyDeploymentDialog();
|
||||||
@@ -61,7 +56,7 @@ private slots:
|
|||||||
void handleCanceled();
|
void handleCanceled();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit PublicKeyDeploymentDialog(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig,
|
explicit PublicKeyDeploymentDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
|
||||||
const QString &publicKeyFileName, QWidget *parent = 0);
|
const QString &publicKeyFileName, QWidget *parent = 0);
|
||||||
void handleDeploymentFinished(const QString &errorMsg);
|
void handleDeploymentFinished(const QString &errorMsg);
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace ProjectExplorer;
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -64,8 +64,7 @@ class AbstractRemoteLinuxApplicationRunnerPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AbstractRemoteLinuxApplicationRunnerPrivate(const RemoteLinuxRunConfiguration *runConfig)
|
AbstractRemoteLinuxApplicationRunnerPrivate(const RemoteLinuxRunConfiguration *runConfig)
|
||||||
: devConfig(ProjectExplorer::DeviceProfileInformation::device(runConfig->target()->profile())
|
: devConfig(DeviceProfileInformation::device(runConfig->target()->profile())),
|
||||||
.dynamicCast<const LinuxDeviceConfiguration>()),
|
|
||||||
remoteExecutable(runConfig->remoteExecutableFilePath()),
|
remoteExecutable(runConfig->remoteExecutableFilePath()),
|
||||||
appArguments(runConfig->arguments()),
|
appArguments(runConfig->arguments()),
|
||||||
commandPrefix(runConfig->commandPrefix()),
|
commandPrefix(runConfig->commandPrefix()),
|
||||||
@@ -76,7 +75,7 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer portsGatherer;
|
RemoteLinuxUsedPortsGatherer portsGatherer;
|
||||||
LinuxDeviceConfiguration::ConstPtr devConfig;
|
IDevice::ConstPtr devConfig;
|
||||||
const QString remoteExecutable;
|
const QString remoteExecutable;
|
||||||
const QString appArguments;
|
const QString appArguments;
|
||||||
const QString commandPrefix;
|
const QString commandPrefix;
|
||||||
@@ -115,7 +114,7 @@ SshConnection *AbstractRemoteLinuxApplicationRunner::connection() const
|
|||||||
return d->connection;
|
return d->connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::ConstPtr AbstractRemoteLinuxApplicationRunner::devConfig() const
|
IDevice::ConstPtr AbstractRemoteLinuxApplicationRunner::devConfig() const
|
||||||
{
|
{
|
||||||
return d->devConfig;
|
return d->devConfig;
|
||||||
}
|
}
|
||||||
@@ -383,11 +382,6 @@ bool AbstractRemoteLinuxApplicationRunner::canRun(QString &whyNot) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxApplicationRunner::setDeviceConfiguration(const LinuxDeviceConfiguration::ConstPtr &deviceConfig)
|
|
||||||
{
|
|
||||||
d->devConfig = deviceConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractRemoteLinuxApplicationRunner::handleDeviceSetupDone(bool success)
|
void AbstractRemoteLinuxApplicationRunner::handleDeviceSetupDone(bool success)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->state == SettingUpDevice, return);
|
QTC_ASSERT(d->state == SettingUpDevice, return);
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
@@ -38,7 +40,6 @@ namespace QSsh { class SshConnection; }
|
|||||||
namespace Utils { class PortList; }
|
namespace Utils { class PortList; }
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
class RemoteLinuxRunConfiguration;
|
class RemoteLinuxRunConfiguration;
|
||||||
class RemoteLinuxUsedPortsGatherer;
|
class RemoteLinuxUsedPortsGatherer;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ public:
|
|||||||
|
|
||||||
void startExecution(const QByteArray &remoteCall);
|
void startExecution(const QByteArray &remoteCall);
|
||||||
|
|
||||||
QSharedPointer<const LinuxDeviceConfiguration> devConfig() const;
|
ProjectExplorer::IDevice::ConstPtr devConfig() const;
|
||||||
QSsh::SshConnection *connection() const;
|
QSsh::SshConnection *connection() const;
|
||||||
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
|
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
|
||||||
Utils::PortList *freePorts();
|
Utils::PortList *freePorts();
|
||||||
@@ -83,8 +84,6 @@ protected:
|
|||||||
// Override to to additional checks.
|
// Override to to additional checks.
|
||||||
virtual bool canRun(QString &whyNot) const;
|
virtual bool canRun(QString &whyNot) const;
|
||||||
|
|
||||||
void setDeviceConfiguration(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig);
|
|
||||||
|
|
||||||
void handleDeviceSetupDone(bool success);
|
void handleDeviceSetupDone(bool success);
|
||||||
void handleInitialCleanupDone(bool success);
|
void handleInitialCleanupDone(bool success);
|
||||||
void handleInitializationsDone(bool success);
|
void handleInitializationsDone(bool success);
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "remotelinuxdebugsupport.h"
|
#include "remotelinuxdebugsupport.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "remotelinuxapplicationrunner.h"
|
#include "remotelinuxapplicationrunner.h"
|
||||||
#include "remotelinuxrunconfiguration.h"
|
#include "remotelinuxrunconfiguration.h"
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
#include "remotelinuxusedportsgatherer.h"
|
||||||
@@ -37,12 +37,11 @@
|
|||||||
#include <debugger/debuggerstartparameters.h>
|
#include <debugger/debuggerstartparameters.h>
|
||||||
#include <debugger/debuggerprofileinformation.h>
|
#include <debugger/debuggerprofileinformation.h>
|
||||||
#include <projectexplorer/abi.h>
|
#include <projectexplorer/abi.h>
|
||||||
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/profile.h>
|
#include <projectexplorer/profile.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qtsupport/qtprofileinformation.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
@@ -97,9 +96,7 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
|
|||||||
DebuggerStartParameters params;
|
DebuggerStartParameters params;
|
||||||
Target *target = runConfig->target();
|
Target *target = runConfig->target();
|
||||||
Profile *profile = target->profile();
|
Profile *profile = target->profile();
|
||||||
const LinuxDeviceConfiguration::ConstPtr devConf
|
const IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
|
||||||
= DeviceProfileInformation::device(profile)
|
|
||||||
.dynamicCast<const RemoteLinux::LinuxDeviceConfiguration>();
|
|
||||||
|
|
||||||
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
||||||
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
||||||
|
@@ -33,8 +33,8 @@
|
|||||||
#include "remotelinuxdeployconfigurationwidget.h"
|
#include "remotelinuxdeployconfigurationwidget.h"
|
||||||
#include "typespecificdeviceconfigurationlistmodel.h"
|
#include "typespecificdeviceconfigurationlistmodel.h"
|
||||||
|
|
||||||
#include <coreplugin/id.h>
|
|
||||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||||
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qt4projectmanager/qt4project.h>
|
#include <qt4projectmanager/qt4project.h>
|
||||||
|
|
||||||
|
@@ -31,23 +31,18 @@
|
|||||||
#ifndef REMOTELINUXDEPLOYCONFIGURATION_H
|
#ifndef REMOTELINUXDEPLOYCONFIGURATION_H
|
||||||
#define REMOTELINUXDEPLOYCONFIGURATION_H
|
#define REMOTELINUXDEPLOYCONFIGURATION_H
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
#include <coreplugin/id.h>
|
|
||||||
#include <projectexplorer/buildstep.h>
|
#include <projectexplorer/buildstep.h>
|
||||||
#include <projectexplorer/buildsteplist.h>
|
#include <projectexplorer/buildsteplist.h>
|
||||||
#include <projectexplorer/deployconfiguration.h>
|
#include <projectexplorer/deployconfiguration.h>
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class AbstractEmbeddedLinuxTarget;
|
class AbstractEmbeddedLinuxTarget;
|
||||||
class DeploymentInfo;
|
class DeploymentInfo;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal { class RemoteLinuxDeployConfigurationFactory; }
|
||||||
class RemoteLinuxDeployConfigurationFactory;
|
|
||||||
class TypeSpecificDeviceConfigurationListModel;
|
|
||||||
} // namespace Internal
|
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxDeployConfiguration
|
class REMOTELINUX_EXPORT RemoteLinuxDeployConfiguration
|
||||||
: public ProjectExplorer::DeployConfiguration
|
: public ProjectExplorer::DeployConfiguration
|
||||||
|
@@ -29,34 +29,32 @@
|
|||||||
#include "remotelinuxenvironmentreader.h"
|
#include "remotelinuxenvironmentreader.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdeviceconfiguration.h"
|
||||||
#include "remotelinuxrunconfiguration.h"
|
|
||||||
|
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
|
#include <projectexplorer/runconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
RemoteLinuxEnvironmentReader::RemoteLinuxEnvironmentReader(RemoteLinuxRunConfiguration *config,
|
RemoteLinuxEnvironmentReader::RemoteLinuxEnvironmentReader(RunConfiguration *config, QObject *parent)
|
||||||
QObject *parent)
|
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_stop(false)
|
, m_stop(false)
|
||||||
, m_devConfig(ProjectExplorer::DeviceProfileInformation::device(config->target()->profile()))
|
, m_profile(config->target()->profile())
|
||||||
, m_runConfig(config)
|
|
||||||
, m_remoteProcessRunner(0)
|
, m_remoteProcessRunner(0)
|
||||||
{
|
{
|
||||||
connect(config->target(), SIGNAL(profileChanged()),
|
connect(config->target(), SIGNAL(profileChanged()),
|
||||||
this, SLOT(handleCurrentDeviceConfigChanged()));
|
this, SLOT(handleCurrentDeviceConfigChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxEnvironmentReader::~RemoteLinuxEnvironmentReader()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
|
void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
|
||||||
{
|
{
|
||||||
if (!m_devConfig)
|
IDevice::ConstPtr devConfig = DeviceProfileInformation::device(m_profile);
|
||||||
|
if (!devConfig)
|
||||||
return;
|
return;
|
||||||
m_stop = false;
|
m_stop = false;
|
||||||
if (!m_remoteProcessRunner)
|
if (!m_remoteProcessRunner)
|
||||||
@@ -65,7 +63,7 @@ void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
|
|||||||
connect(m_remoteProcessRunner, SIGNAL(processClosed(int)), SLOT(remoteProcessFinished(int)));
|
connect(m_remoteProcessRunner, SIGNAL(processClosed(int)), SLOT(remoteProcessFinished(int)));
|
||||||
const QByteArray remoteCall
|
const QByteArray remoteCall
|
||||||
= QString(environmentSetupCommand + QLatin1String("; env")).toUtf8();
|
= QString(environmentSetupCommand + QLatin1String("; env")).toUtf8();
|
||||||
m_remoteProcessRunner->run(remoteCall, m_devConfig->sshParameters());
|
m_remoteProcessRunner->run(remoteCall, devConfig->sshParameters());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxEnvironmentReader::stop()
|
void RemoteLinuxEnvironmentReader::stop()
|
||||||
@@ -87,8 +85,6 @@ void RemoteLinuxEnvironmentReader::handleConnectionFailure()
|
|||||||
|
|
||||||
void RemoteLinuxEnvironmentReader::handleCurrentDeviceConfigChanged()
|
void RemoteLinuxEnvironmentReader::handleCurrentDeviceConfigChanged()
|
||||||
{
|
{
|
||||||
m_devConfig = ProjectExplorer::DeviceProfileInformation::device(m_runConfig->target()->profile());
|
|
||||||
|
|
||||||
if (m_remoteProcessRunner)
|
if (m_remoteProcessRunner)
|
||||||
disconnect(m_remoteProcessRunner, 0, this, 0);
|
disconnect(m_remoteProcessRunner, 0, this, 0);
|
||||||
m_env.clear();
|
m_env.clear();
|
||||||
|
@@ -33,25 +33,22 @@
|
|||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
|
|
||||||
#include <QObject>
|
namespace ProjectExplorer {
|
||||||
|
class RunConfiguration;
|
||||||
|
class Profile;
|
||||||
namespace QSsh {
|
|
||||||
class SshRemoteProcessRunner;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace QSsh { class SshRemoteProcessRunner; }
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
class RemoteLinuxRunConfiguration;
|
|
||||||
|
|
||||||
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class RemoteLinuxEnvironmentReader : public QObject
|
class RemoteLinuxEnvironmentReader : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxEnvironmentReader(RemoteLinuxRunConfiguration *config, QObject *parent = 0);
|
RemoteLinuxEnvironmentReader(ProjectExplorer::RunConfiguration *config, QObject *parent = 0);
|
||||||
~RemoteLinuxEnvironmentReader();
|
|
||||||
|
|
||||||
void start(const QString &environmentSetupCommand);
|
void start(const QString &environmentSetupCommand);
|
||||||
void stop();
|
void stop();
|
||||||
@@ -73,8 +70,7 @@ private:
|
|||||||
|
|
||||||
bool m_stop;
|
bool m_stop;
|
||||||
Utils::Environment m_env;
|
Utils::Environment m_env;
|
||||||
ProjectExplorer::IDevice::ConstPtr m_devConfig;
|
ProjectExplorer::Profile *m_profile;
|
||||||
RemoteLinuxRunConfiguration *m_runConfig;
|
|
||||||
QSsh::SshRemoteProcessRunner *m_remoteProcessRunner;
|
QSsh::SshRemoteProcessRunner *m_remoteProcessRunner;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -29,13 +29,10 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "remotelinuxpackageinstaller.h"
|
#include "remotelinuxpackageinstaller.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
|
|
||||||
#include <QByteArray>
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
@@ -47,7 +44,7 @@ public:
|
|||||||
AbstractRemoteLinuxPackageInstallerPrivate() : isRunning(false), installer(0), killProcess(0) {}
|
AbstractRemoteLinuxPackageInstallerPrivate() : isRunning(false), installer(0), killProcess(0) {}
|
||||||
|
|
||||||
bool isRunning;
|
bool isRunning;
|
||||||
LinuxDeviceConfiguration::ConstPtr deviceConfig;
|
IDevice::ConstPtr deviceConfig;
|
||||||
QSsh::SshRemoteProcessRunner *installer;
|
QSsh::SshRemoteProcessRunner *installer;
|
||||||
QSsh::SshRemoteProcessRunner *killProcess;
|
QSsh::SshRemoteProcessRunner *killProcess;
|
||||||
};
|
};
|
||||||
@@ -64,7 +61,7 @@ AbstractRemoteLinuxPackageInstaller::~AbstractRemoteLinuxPackageInstaller()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxPackageInstaller::installPackage(const LinuxDeviceConfiguration::ConstPtr &deviceConfig,
|
void AbstractRemoteLinuxPackageInstaller::installPackage(const IDevice::ConstPtr &deviceConfig,
|
||||||
const QString &packageFilePath, bool removePackageFile)
|
const QString &packageFilePath, bool removePackageFile)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!d->isRunning, return);
|
QTC_ASSERT(!d->isRunning, return);
|
||||||
|
@@ -27,17 +27,17 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef REMOTELINUXPACKAGEINSTALLER_H
|
#ifndef REMOTELINUXPACKAGEINSTALLER_H
|
||||||
#define REMOTELINUXPACKAGEINSTALLER_H
|
#define REMOTELINUXPACKAGEINSTALLER_H
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class LinuxDeviceConfiguration;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class AbstractRemoteLinuxPackageInstallerPrivate;
|
class AbstractRemoteLinuxPackageInstallerPrivate;
|
||||||
@@ -50,7 +50,7 @@ class REMOTELINUX_EXPORT AbstractRemoteLinuxPackageInstaller : public QObject
|
|||||||
public:
|
public:
|
||||||
~AbstractRemoteLinuxPackageInstaller();
|
~AbstractRemoteLinuxPackageInstaller();
|
||||||
|
|
||||||
void installPackage(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfig,
|
void installPackage(const ProjectExplorer::IDevice::ConstPtr &deviceConfig,
|
||||||
const QString &packageFilePath, bool removePackageFile);
|
const QString &packageFilePath, bool removePackageFile);
|
||||||
void cancelInstallation();
|
void cancelInstallation();
|
||||||
|
|
||||||
|
@@ -40,7 +40,6 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <qtsupport/qtoutputformatter.h>
|
#include <qtsupport/qtoutputformatter.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <qt4projectmanager/qt4nodes.h>
|
#include <qt4projectmanager/qt4nodes.h>
|
||||||
#include <qt4projectmanager/qt4project.h>
|
#include <qt4projectmanager/qt4project.h>
|
||||||
|
|
||||||
@@ -141,18 +140,13 @@ void RemoteLinuxRunConfiguration::init()
|
|||||||
this, SLOT(handleDeployConfigChanged()));
|
this, SLOT(handleDeployConfigChanged()));
|
||||||
handleDeployConfigChanged();
|
handleDeployConfigChanged();
|
||||||
|
|
||||||
Qt4Project *pro = static_cast<Qt4Project *>(target()->project());
|
Project *pro = target()->project();
|
||||||
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
|
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
|
||||||
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
|
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
|
||||||
connect(target(), SIGNAL(profileChanged()),
|
connect(target(), SIGNAL(profileChanged()),
|
||||||
this, SLOT(handleDeployablesUpdated())); // Handles device changes, etc.
|
this, SLOT(handleDeployablesUpdated())); // Handles device changes, etc.
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt4BuildConfiguration *RemoteLinuxRunConfiguration::activeQt4BuildConfiguration() const
|
|
||||||
{
|
|
||||||
return static_cast<Qt4BuildConfiguration *>(activeBuildConfiguration());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool RemoteLinuxRunConfiguration::isEnabled() const
|
bool RemoteLinuxRunConfiguration::isEnabled() const
|
||||||
{
|
{
|
||||||
if (d->parseInProgress) {
|
if (d->parseInProgress) {
|
||||||
@@ -165,7 +159,7 @@ bool RemoteLinuxRunConfiguration::isEnabled() const
|
|||||||
d->disabledReason = project->disabledReasonForRunConfiguration(d->proFilePath);
|
d->disabledReason = project->disabledReasonForRunConfiguration(d->proFilePath);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!activeQt4BuildConfiguration()) {
|
if (!activeBuildConfiguration()) {
|
||||||
d->disabledReason = tr("No active build configuration.");
|
d->disabledReason = tr("No active build configuration.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -33,13 +33,10 @@
|
|||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
namespace Qt4ProjectManager {
|
||||||
class Qt4BuildConfiguration;
|
|
||||||
class Qt4ProFileNode;
|
class Qt4ProFileNode;
|
||||||
} // namespace Qt4ProjectManager
|
} // namespace Qt4ProjectManager
|
||||||
|
|
||||||
@@ -77,10 +74,8 @@ public:
|
|||||||
QString disabledReason() const;
|
QString disabledReason() const;
|
||||||
QWidget *createConfigurationWidget();
|
QWidget *createConfigurationWidget();
|
||||||
Utils::OutputFormatter *createOutputFormatter() const;
|
Utils::OutputFormatter *createOutputFormatter() const;
|
||||||
Qt4ProjectManager::Qt4BuildConfiguration *activeQt4BuildConfiguration() const;
|
|
||||||
|
|
||||||
RemoteLinuxDeployConfiguration *deployConfig() const;
|
RemoteLinuxDeployConfiguration *deployConfig() const;
|
||||||
LinuxDeviceConfiguration::ConstPtr device() const;
|
|
||||||
|
|
||||||
virtual QString environmentPreparationCommand() const;
|
virtual QString environmentPreparationCommand() const;
|
||||||
virtual QString commandPrefix() const;
|
virtual QString commandPrefix() const;
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#include "remotelinuxrunconfigurationwidget.h"
|
#include "remotelinuxrunconfigurationwidget.h"
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
|
||||||
#include "remotelinuxrunconfiguration.h"
|
#include "remotelinuxrunconfiguration.h"
|
||||||
#include "remotelinuxenvironmentreader.h"
|
#include "remotelinuxenvironmentreader.h"
|
||||||
#include "remotelinuxutils.h"
|
#include "remotelinuxutils.h"
|
||||||
@@ -38,7 +37,6 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <projectexplorer/environmentwidget.h>
|
#include <projectexplorer/environmentwidget.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
|
||||||
#include <utils/detailswidget.h>
|
#include <utils/detailswidget.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -53,8 +51,6 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
namespace {
|
namespace {
|
||||||
|
@@ -72,9 +72,7 @@ bool RemoteLinuxRunControlFactory::canRun(RunConfiguration *runConfiguration, Ru
|
|||||||
const RemoteLinuxRunConfiguration * const remoteRunConfig
|
const RemoteLinuxRunConfiguration * const remoteRunConfig
|
||||||
= qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration);
|
= qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration);
|
||||||
if (mode == DebugRunMode) {
|
if (mode == DebugRunMode) {
|
||||||
LinuxDeviceConfiguration::ConstPtr dev =
|
IDevice::ConstPtr dev = DeviceProfileInformation::device(runConfiguration->target()->profile());
|
||||||
ProjectExplorer::DeviceProfileInformation::device(runConfiguration->target()->profile())
|
|
||||||
.dynamicCast<const LinuxDeviceConfiguration>();
|
|
||||||
if (dev.isNull())
|
if (dev.isNull())
|
||||||
return false;
|
return false;
|
||||||
return remoteRunConfig->portsUsedByDebuggers() <= dev->freePorts().count();
|
return remoteRunConfig->portsUsedByDebuggers() <= dev->freePorts().count();
|
||||||
|
@@ -39,7 +39,7 @@ using namespace ProjectExplorer;
|
|||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListModel(ProjectExplorer::Target *target)
|
TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListModel(Target *target)
|
||||||
: QAbstractListModel(target)
|
: QAbstractListModel(target)
|
||||||
{
|
{
|
||||||
const DeviceManager * const devConfs = DeviceManager::instance();
|
const DeviceManager * const devConfs = DeviceManager::instance();
|
||||||
@@ -47,10 +47,6 @@ TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListMod
|
|||||||
connect(target, SIGNAL(profileChanged()), this, SIGNAL(modelReset()));
|
connect(target, SIGNAL(profileChanged()), this, SIGNAL(modelReset()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TypeSpecificDeviceConfigurationListModel::~TypeSpecificDeviceConfigurationListModel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int TypeSpecificDeviceConfigurationListModel::rowCount(const QModelIndex &parent) const
|
int TypeSpecificDeviceConfigurationListModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
if (parent.isValid())
|
if (parent.isValid())
|
||||||
@@ -70,7 +66,7 @@ QVariant TypeSpecificDeviceConfigurationListModel::data(const QModelIndex &index
|
|||||||
{
|
{
|
||||||
if (!index.isValid() || index.row() >= rowCount() || role != Qt::DisplayRole)
|
if (!index.isValid() || index.row() >= rowCount() || role != Qt::DisplayRole)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
const LinuxDeviceConfiguration::ConstPtr &devConf = deviceAt(index.row());
|
const IDevice::ConstPtr &devConf = deviceAt(index.row());
|
||||||
Q_ASSERT(devConf);
|
Q_ASSERT(devConf);
|
||||||
QString displayedName = devConf->displayName();
|
QString displayedName = devConf->displayName();
|
||||||
if (deviceMatches(devConf)
|
if (deviceMatches(devConf)
|
||||||
@@ -80,7 +76,7 @@ QVariant TypeSpecificDeviceConfigurationListModel::data(const QModelIndex &index
|
|||||||
return displayedName;
|
return displayedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::deviceAt(int idx) const
|
IDevice::ConstPtr TypeSpecificDeviceConfigurationListModel::deviceAt(int idx) const
|
||||||
{
|
{
|
||||||
int currentRow = -1;
|
int currentRow = -1;
|
||||||
const DeviceManager * const devConfs = DeviceManager::instance();
|
const DeviceManager * const devConfs = DeviceManager::instance();
|
||||||
@@ -88,13 +84,13 @@ LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::dev
|
|||||||
for (int i = 0; i < devConfsCount; ++i) {
|
for (int i = 0; i < devConfsCount; ++i) {
|
||||||
const IDevice::ConstPtr device = devConfs->deviceAt(i);
|
const IDevice::ConstPtr device = devConfs->deviceAt(i);
|
||||||
if (deviceMatches(device) && ++currentRow == idx)
|
if (deviceMatches(device) && ++currentRow == idx)
|
||||||
return device.staticCast<const LinuxDeviceConfiguration>();
|
return device;
|
||||||
}
|
}
|
||||||
QTC_CHECK(false);
|
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 DeviceManager * const deviceManager = DeviceManager::instance();
|
||||||
const int deviceCount = deviceManager->deviceCount();
|
const int deviceCount = deviceManager->deviceCount();
|
||||||
@@ -102,17 +98,17 @@ LinuxDeviceConfiguration::ConstPtr TypeSpecificDeviceConfigurationListModel::def
|
|||||||
const IDevice::ConstPtr device = deviceManager->deviceAt(i);
|
const IDevice::ConstPtr device = deviceManager->deviceAt(i);
|
||||||
if (deviceMatches(device)
|
if (deviceMatches(device)
|
||||||
&& deviceManager->defaultDevice(device->type()) == 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);
|
const IDevice::ConstPtr &devConf = DeviceManager::instance()->find(id);
|
||||||
if (deviceMatches(devConf))
|
if (deviceMatches(devConf))
|
||||||
return devConf.staticCast<const LinuxDeviceConfiguration>();
|
return devConf;
|
||||||
return defaultDeviceConfig();
|
return defaultDeviceConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,12 +122,12 @@ int TypeSpecificDeviceConfigurationListModel::indexForId(Core::Id id) const
|
|||||||
return -1;
|
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())
|
if (dev.isNull())
|
||||||
return false;
|
return false;
|
||||||
|
@@ -30,10 +30,9 @@
|
|||||||
#ifndef TYPESPECIFICDEVICECONFIGURATIONLISTMODEL_H
|
#ifndef TYPESPECIFICDEVICECONFIGURATIONLISTMODEL_H
|
||||||
#define TYPESPECIFICDEVICECONFIGURATIONLISTMODEL_H
|
#define TYPESPECIFICDEVICECONFIGURATIONLISTMODEL_H
|
||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
namespace ProjectExplorer { class Target; }
|
namespace ProjectExplorer { class Target; }
|
||||||
|
|
||||||
@@ -43,20 +42,18 @@ namespace Internal {
|
|||||||
class TypeSpecificDeviceConfigurationListModel : public QAbstractListModel
|
class TypeSpecificDeviceConfigurationListModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TypeSpecificDeviceConfigurationListModel(ProjectExplorer::Target *target);
|
explicit TypeSpecificDeviceConfigurationListModel(ProjectExplorer::Target *target);
|
||||||
~TypeSpecificDeviceConfigurationListModel();
|
|
||||||
|
|
||||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
virtual QVariant data(const QModelIndex &index,
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||||
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;
|
|
||||||
|
|
||||||
private:
|
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;
|
ProjectExplorer::Target *target() const;
|
||||||
bool deviceMatches(ProjectExplorer::IDevice::ConstPtr dev) const;
|
bool deviceMatches(ProjectExplorer::IDevice::ConstPtr dev) const;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user