Merge remote-tracking branch 'origin/2.6'

This commit is contained in:
Eike Ziller
2012-07-26 19:54:03 +02:00
101 changed files with 469 additions and 650 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -117,7 +117,7 @@ def dynamicTypeName(value):
pass
return str(value.type)
def upcast(value):
def downcast(value):
try:
return value.cast(value.dynamic_type)
except:
@@ -128,7 +128,7 @@ def upcast(value):
# pass
return value
def expensiveUpcast(value):
def expensiveDowncast(value):
try:
return value.cast(value.dynamic_type)
except:
@@ -1054,7 +1054,7 @@ class Dumper:
pass
for item in locals:
value = upcast(item.value)
value = downcast(item.value)
with OutputSafer(self):
self.anonNumber = -1
@@ -1639,7 +1639,7 @@ class Dumper:
if self.useDynamicType and tryDynamic:
self.putItem(expensiveUpcast(value), False)
self.putItem(expensiveDowncast(value), False)
return
format = self.formats.get(self.currentIName)
@@ -1669,7 +1669,7 @@ class Dumper:
dumper = qqDumpers.get(nsStrippedType, None)
if not dumper is None:
if tryDynamic:
dumper(self, expensiveUpcast(value))
dumper(self, expensiveDowncast(value))
else:
dumper(self, value)
return
@@ -1789,7 +1789,7 @@ class Dumper:
#if not bitsize is None:
# self.put("bitsize=\"%s\",bitpos=\"%s\","
# % (bitsize, bitpos))
self.putItem(upcast(value[field.name]))
self.putItem(downcast(value[field.name]))
def listAnonymous(self, value, name, type):

View File

@@ -2003,7 +2003,7 @@ def qdump__std__shared_ptr(d, value):
if isSimpleType(templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference(), long(i)))
else:
i = expensiveUpcast(i)
i = expensiveDowncast(i)
d.putValue("@0x%x" % long(i))
d.putNumChild(3)
@@ -2024,7 +2024,7 @@ def qdump__std__unique_ptr(d, value):
if isSimpleType(templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference(), long(i)))
else:
i = expensiveUpcast(i)
i = expensiveDowncast(i)
d.putValue("@0x%x" % long(i))
d.putNumChild(1)

View File

@@ -14,8 +14,8 @@ int main( int argc, char** argv )
view->setSource( QUrl( "app/native/qml/main.qml" ) );
QDeclarativeEngine* engine = view->engine();
QObject::connect( engine, SIGNAL( quit() ),
QCoreApplication::instance(), SLOT( quit() ) );
QObject::connect( engine, SIGNAL(quit()),
QCoreApplication::instance(), SLOT(quit()) );
window = view;
window->showMaximized();

View File

@@ -124,8 +124,8 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig,
connect(m_runner, SIGNAL(remoteProcessStarted(int,int)),
SLOT(handleRemoteProcessStarted(int,int)));
connect(m_runner, SIGNAL(remoteProcessFinished(const QString &)),
SLOT(handleRemoteProcessFinished(const QString &)));
connect(m_runner, SIGNAL(remoteProcessFinished(QString)),
SLOT(handleRemoteProcessFinished(QString)));
connect(m_runner, SIGNAL(remoteErrorOutput(QByteArray)),
SLOT(handleRemoteErrorOutput(QByteArray)));
@@ -146,8 +146,8 @@ void AndroidDebugSupport::handleRemoteProcessStarted(int gdbServerPort, int qmlP
void AndroidDebugSupport::handleRemoteProcessFinished(const QString &errorMsg)
{
disconnect(m_runner, SIGNAL(remoteProcessFinished(const QString &)),
this,SLOT(handleRemoteProcessFinished(const QString &)));
disconnect(m_runner, SIGNAL(remoteProcessFinished(QString)),
this,SLOT(handleRemoteProcessFinished(QString)));
m_runControl->engine()->notifyEngineRemoteSetupFailed(errorMsg);
}

View File

@@ -37,7 +37,9 @@ namespace Android {
namespace Internal {
AndroidDevice::AndroidDevice():
ProjectExplorer::IDevice(Core::Id(Constants::ANDROID_DEVICE_TYPE), IDevice::AutoDetected,
ProjectExplorer::IDevice(Core::Id(Constants::ANDROID_DEVICE_TYPE),
IDevice::AutoDetected,
IDevice::Hardware,
Core::Id(Constants::ANDROID_DEVICE_ID))
{
setDisplayName(QCoreApplication::translate("ProjectExplorer::AndroidDevice", "Run on Android"));

View File

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

View File

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

View File

@@ -67,8 +67,8 @@ void AndroidRunControl::start()
SLOT(handleRemoteErrorOutput(QByteArray)));
connect(m_runner, SIGNAL(remoteOutput(QByteArray)),
SLOT(handleRemoteOutput(QByteArray)));
connect(m_runner, SIGNAL(remoteProcessFinished(const QString &)),
SLOT(handleRemoteProcessFinished(const QString &)));
connect(m_runner, SIGNAL(remoteProcessFinished(QString)),
SLOT(handleRemoteProcessFinished(QString)));
appendMessage(tr("Starting remote process ..."), Utils::NormalMessageFormat);
m_runner->start();
}

View File

@@ -292,7 +292,7 @@ void DocumentManager::addDocuments(const QList<IDocument *> &documents, bool add
foreach (IDocument *document, documents) {
if (document && !d->m_documentsWithoutWatch.contains(document)) {
connect(document, SIGNAL(destroyed(QObject*)), m_instance, SLOT(documentDestroyed(QObject*)));
connect(document, SIGNAL(fileNameChanged(QString,QString)), m_instance, SLOT(fileNameChanged(QString, QString)));
connect(document, SIGNAL(fileNameChanged(QString,QString)), m_instance, SLOT(fileNameChanged(QString,QString)));
d->m_documentsWithoutWatch.append(document);
}
}
@@ -303,7 +303,7 @@ void DocumentManager::addDocuments(const QList<IDocument *> &documents, bool add
if (document && !d->m_documentsWithWatch.contains(document)) {
connect(document, SIGNAL(changed()), m_instance, SLOT(checkForNewFileName()));
connect(document, SIGNAL(destroyed(QObject*)), m_instance, SLOT(documentDestroyed(QObject*)));
connect(document, SIGNAL(fileNameChanged(QString,QString)), m_instance, SLOT(fileNameChanged(QString, QString)));
connect(document, SIGNAL(fileNameChanged(QString,QString)), m_instance, SLOT(fileNameChanged(QString,QString)));
addFileInfo(document);
}
}

View File

@@ -154,8 +154,8 @@ void MemoryAgent::connectBinEditorWidget(QWidget *w)
SIGNAL(dataChanged(Core::IEditor*,quint64,QByteArray)),
SLOT(handleDataChanged(Core::IEditor*,quint64,QByteArray)));
connect(w,
SIGNAL(addWatchpointRequested(quint64, uint)),
SLOT(handleWatchpointRequest(quint64, uint)));
SIGNAL(addWatchpointRequested(quint64,uint)),
SLOT(handleWatchpointRequest(quint64,uint)));
}
bool MemoryAgent::doCreateBinEditor(quint64 addr, unsigned flags,

View File

@@ -285,7 +285,7 @@ void QmlInspectorAdapter::createPreviewForEditor(Core::IEditor *newEditor)
if (!m_engineClientConnected)
return;
if (newEditor && newEditor->id()
if (!newEditor || newEditor->id()
!= QmlJSEditor::Constants::C_QMLJSEDITOR_ID)
return;

View File

@@ -3920,11 +3920,6 @@ static QRegExp vimPatternToQtPattern(QString needle, QTextDocument::FindFlags *f
// FIXME: Rough mapping of a common case.
if (needle.startsWith(_("\\<")) && needle.endsWith(_("\\>")))
(*flags) |= QTextDocument::FindWholeWords;
// Half-hearted attempt at removing pitfalls.
if (needle.startsWith(_(".*")))
needle = needle.mid(2);
if (needle.endsWith(_(".*")))
needle = needle.left(needle.size() - 2);
needle.remove(_("\\<")); // start of word
needle.remove(_("\\>")); // end of word
@@ -4046,6 +4041,8 @@ void FakeVimHandler::Private::highlightMatches(const QString &needle)
tc = tc.document()->find(needleExp, tc.position(), flags);
if (tc.isNull())
break;
if (!tc.hasSelection())
tc.movePosition(Right, KeepAnchor, 1);
QTextEdit::ExtraSelection sel;
sel.cursor = tc;
sel.format = tc.blockCharFormat();

View File

@@ -925,7 +925,7 @@ void HelpPlugin::activateContext()
QUrl source = *links.begin();
const QLatin1String qtRefDoc = QLatin1String("com.trolltech.qt");
// workaround to show the latest qt version
// workaround to show the latest Qt version
foreach (const QUrl &tmp, links) {
const QString &authority = tmp.authority();
if (authority.startsWith(qtRefDoc)) {

View File

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

View File

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

View File

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

View File

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

View File

@@ -34,14 +34,12 @@
#include "maemoremotemounter.h"
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <projectexplorer/profileinformation.h>
#include <remotelinux/remotelinuxusedportsgatherer.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
using namespace Qt4ProjectManager;
using namespace ProjectExplorer;
using namespace RemoteLinux;
using namespace QSsh;
@@ -71,17 +69,16 @@ MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
const LinuxDeviceConfiguration::ConstPtr &devConf,
const QList<MaemoMountSpecification> &mountSpecs,
const Qt4BuildConfiguration *bc)
const Profile *profile)
{
QTC_ASSERT(m_state == Inactive, return);
m_mountSpecs = mountSpecs;
m_connection = connection;
m_devConf = devConf;
m_profile = profile;
m_devConf = DeviceProfileInformation::device(profile);
m_mounter->setConnection(m_connection, m_devConf);
m_buildConfig = bc;
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
setState(UnmountingOldDirs);
unmount();
@@ -102,7 +99,7 @@ void MaemoDeploymentMounter::setupMounter()
setState(UnmountingCurrentDirs);
m_mounter->resetMountSpecifications();
m_mounter->setBuildConfiguration(m_buildConfig);
m_mounter->setProfile(m_profile);
foreach (const MaemoMountSpecification &mountSpec, m_mountSpecs)
m_mounter->addMountSpecification(mountSpec, true);
unmount();
@@ -173,7 +170,7 @@ void MaemoDeploymentMounter::handlePortListReady()
return;
setState(Mounting);
m_freePorts = MaemoGlobal::freePorts(m_devConf, QtSupport::QtProfileInformation::qtVersion(m_buildConfig->target()->profile()));
m_freePorts = MaemoGlobal::freePorts(m_profile);
m_mounter->mount(&m_freePorts, m_portsGatherer);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -50,8 +50,6 @@
#include <projectexplorer/target.h>
#include <qtsupport/qtprofileinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <utils/filesystemwatcher.h>
@@ -68,7 +66,6 @@
#include <limits.h>
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
namespace Madde {
@@ -105,7 +102,7 @@ MaemoQemuManager::MaemoQemuManager(QObject *parent)
m_qemuAction->setEnabled(false);
m_qemuAction->setVisible(false);
// listen to qt version changes to update the start button
// listen to Qt version changes to update the start button
connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)),
this, SLOT(qtVersionsChanged(QList<int>,QList<int>,QList<int>)));
@@ -198,7 +195,7 @@ void MaemoQemuManager::qtVersionsChanged(const QList<int> &added, const QList<in
}
}
} else {
// this qt version has been removed from the settings
// this Qt version has been removed from the settings
m_runtimes.remove(uniqueId);
if (uniqueId == m_runningQtId) {
terminateRuntime();
@@ -252,7 +249,7 @@ void MaemoQemuManager::targetAdded(ProjectExplorer::Target *target)
if (!target || !MaemoGlobal::hasMaemoDevice(target->profile()))
return;
// handle the qt version changes the build configuration uses
// handle the Qt version changes the build configuration uses
connect(target, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
connect(target, SIGNAL(profileChanged()), this, SLOT(systemChanged()));
@@ -286,7 +283,7 @@ void MaemoQemuManager::systemChanged()
void MaemoQemuManager::environmentChanged()
{
// likely to happen when the qt version changes the build config is using
// likely to happen when the Qt version changes the build config is using
if (ProjectExplorerPlugin *explorer = ProjectExplorerPlugin::instance()) {
if (Project *project = explorer->session()->startupProject())
toggleStarterButton(project->activeTarget());
@@ -516,10 +513,8 @@ bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target,
if (qtVersion)
*qtVersion = version;
const LinuxDeviceConfiguration::ConstPtr &config
= ProjectExplorer::DeviceProfileInformation::device(target->profile())
.dynamicCast<const LinuxDeviceConfiguration>();
return !config.isNull() && config->machineType() == LinuxDeviceConfiguration::Emulator;
const IDevice::ConstPtr config = DeviceProfileInformation::device(target->profile());
return !config.isNull() && config->machineType() == IDevice::Emulator;
}
void MaemoQemuManager::notify(const QList<int> uniqueIds)

View File

@@ -83,7 +83,7 @@ private slots:
void targetChanged(ProjectExplorer::Target *target);
void systemChanged();
void environmentChanged(); // needed to check for qt version
void environmentChanged(); // needed to check for Qt version
void deviceConfigurationChanged(ProjectExplorer::Target *target);
void terminateRuntime();

View File

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

View File

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

View File

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

View File

@@ -37,17 +37,14 @@
#include <projectexplorer/target.h>
#include <ssh/sshconnection.h>
#include <ssh/sshremoteprocess.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/baseqtversion.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/remotelinuxusedportsgatherer.h>
#include <utils/qtcassert.h>
#include <QTimer>
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
using namespace ProjectExplorer;
using namespace QSsh;
using namespace RemoteLinux;
using namespace Utils;
namespace Madde {
@@ -67,7 +64,7 @@ MaemoRemoteMounter::~MaemoRemoteMounter()
}
void MaemoRemoteMounter::setConnection(SshConnection *connection,
const LinuxDeviceConfiguration::ConstPtr &devConf)
const IDevice::ConstPtr &devConf)
{
QTC_ASSERT(m_state == Inactive, return);
@@ -75,13 +72,13 @@ void MaemoRemoteMounter::setConnection(SshConnection *connection,
m_devConf = devConf;
}
void MaemoRemoteMounter::setBuildConfiguration(const Qt4BuildConfiguration *bc)
void MaemoRemoteMounter::setProfile(const Profile *profile)
{
QTC_ASSERT(m_state == Inactive, return);
Core::Id typeId = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(bc->target()->profile());
Core::Id typeId = DeviceTypeProfileInformation::deviceTypeId(profile);
m_remoteMountsAllowed = MaddeDevice::allowsRemoteMounts(typeId);
m_maddeRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(bc->target()->profile());
m_maddeRoot = SysRootProfileInformation::sysRoot(profile);
}
void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mountSpec,

View File

@@ -33,6 +33,7 @@
#include "maemomountspecification.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/fileutils.h>
#include <QList>
@@ -44,18 +45,13 @@
QT_FORWARD_DECLARE_CLASS(QTimer)
namespace QSsh {
class SftpChannel;
class SshConnection;
class SshRemoteProcess;
}
namespace ProjectExplorer { class Profile; }
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
namespace Utils { class PortList; }
namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
namespace RemoteLinux {
class LinuxDeviceConfiguration;
class RemoteLinuxUsedPortsGatherer;
}
namespace Madde {
namespace Internal {
@@ -69,9 +65,9 @@ public:
// Must already be connected.
void setConnection(QSsh::SshConnection *connection,
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf);
const ProjectExplorer::IDevice::ConstPtr &devConf);
void setBuildConfiguration(const Qt4ProjectManager::Qt4BuildConfiguration *bc);
void setProfile(const ProjectExplorer::Profile *profile);
void addMountSpecification(const MaemoMountSpecification &mountSpec,
bool mountAsRoot);
bool hasValidMountSpecifications() const;
@@ -124,7 +120,7 @@ private:
};
QSsh::SshConnection *m_connection;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
ProjectExplorer::IDevice::ConstPtr m_devConf;
QList<MountInfo> m_mountSpecs;
QSharedPointer<QSsh::SshRemoteProcess> m_mountProcess;
QSharedPointer<QSsh::SshRemoteProcess> m_unmountProcess;

View File

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

View File

@@ -33,16 +33,15 @@
#include "maemoremotemountsmodel.h"
#include "maemorunconfiguration.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/qtprofileinformation.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
using namespace ProjectExplorer;
using namespace QSsh;
using namespace RemoteLinux;
namespace Madde {
namespace Internal {
@@ -53,9 +52,10 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig
m_mountSpecs(runConfig->remoteMounts()->mountSpecs()),
m_mountState(InactiveMountState)
{
const Qt4BuildConfiguration * const bc = runConfig->activeQt4BuildConfiguration();
m_qtId = bc ? QtSupport::QtProfileInformation::qtVersionId(bc->target()->profile()) : -1;
m_mounter->setBuildConfiguration(bc);
const BuildConfiguration * const bc = runConfig->target()->activeBuildConfiguration();
Profile *profile = bc ? bc->target()->profile() : 0;
m_qtId = QtSupport::QtProfileInformation::qtVersionId(profile);
m_mounter->setProfile(profile);
connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted()));
connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted()));
connect(m_mounter, SIGNAL(error(QString)), this,
@@ -66,14 +66,12 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig
SIGNAL(mountDebugOutput(QString)));
}
MaemoSshRunner::~MaemoSshRunner() {}
bool MaemoSshRunner::canRun(QString &whyNot) const
{
if (!AbstractRemoteLinuxApplicationRunner::canRun(whyNot))
return false;
if (devConfig()->machineType() == LinuxDeviceConfiguration::Emulator
if (devConfig()->machineType() == IDevice::Emulator
&& !MaemoQemuManager::instance().qemuIsRunning()) {
MaemoQemuRuntime rt;
if (MaemoQemuManager::instance().runtimeForQtVersion(m_qtId, &rt)) {

View File

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

View File

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

View File

@@ -71,7 +71,9 @@ IDevice::Ptr DesktopDevice::clone() const
return Ptr(new DesktopDevice(*this));
}
DesktopDevice::DesktopDevice() : IDevice(Core::Id(Constants::DESKTOP_DEVICE_TYPE), IDevice::AutoDetected,
DesktopDevice::DesktopDevice() : IDevice(Core::Id(Constants::DESKTOP_DEVICE_TYPE),
IDevice::AutoDetected,
IDevice::Hardware,
Core::Id(Constants::DESKTOP_DEVICE_ID))
{
setDisplayName(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Run locally"));

View File

@@ -150,6 +150,7 @@ const char DisplayNameKey[] = "Name";
const char TypeKey[] = "OsType";
const char IdKey[] = "InternalId";
const char OriginKey[] = "Origin";
const char MachineTypeKey[] = "Type";
// Connection
const char HostKey[] = "Host";
@@ -163,6 +164,7 @@ const char TimeoutKey[] = "Timeout";
typedef QSsh::SshConnectionParameters::AuthenticationType AuthType;
const AuthType DefaultAuthType = QSsh::SshConnectionParameters::AuthenticationByKey;
const IDevice::MachineType DefaultMachineType = IDevice::Hardware;
const int DefaultTimeout = 10;
@@ -172,7 +174,8 @@ class IDevicePrivate
public:
IDevicePrivate() :
origin(IDevice::AutoDetected),
deviceState(IDevice::DeviceStateUnknown)
deviceState(IDevice::DeviceStateUnknown),
machineType(IDevice::Hardware)
{ }
QString displayName;
@@ -180,6 +183,7 @@ public:
IDevice::Origin origin;
Core::Id id;
IDevice::DeviceState deviceState;
IDevice::MachineType machineType;
QSsh::SshConnectionParameters sshParameters;
Utils::PortList freePorts;
@@ -189,10 +193,12 @@ public:
IDevice::IDevice() : d(new Internal::IDevicePrivate)
{ }
IDevice::IDevice(Core::Id type, Origin origin, Core::Id id) : d(new Internal::IDevicePrivate)
IDevice::IDevice(Core::Id type, Origin origin, MachineType machineType, Core::Id id)
: d(new Internal::IDevicePrivate)
{
d->type = type;
d->origin = origin;
d->machineType = machineType;
QTC_CHECK(origin == ManuallyAdded || id.isValid());
d->id = id.isValid() ? id : newId();
}
@@ -288,6 +294,7 @@ void IDevice::fromMap(const QVariantMap &map)
d->freePorts = Utils::PortList::fromString(map.value(PortsSpecKey,
QLatin1String("10000-10100")).toString());
d->machineType = static_cast<MachineType>(map.value(MachineTypeKey, DefaultMachineType).toInt());
}
QVariantMap IDevice::toMap() const
@@ -298,6 +305,7 @@ QVariantMap IDevice::toMap() const
map.insert(QLatin1String(IdKey), d->id.name());
map.insert(QLatin1String(OriginKey), d->origin);
map.insert(MachineTypeKey, d->machineType);
map.insert(HostKey, d->sshParameters.host);
map.insert(SshPortKey, d->sshParameters.port);
map.insert(UserNameKey, d->sshParameters.userName);
@@ -353,6 +361,11 @@ Utils::PortList IDevice::freePorts() const
return d->freePorts;
}
IDevice::MachineType IDevice::machineType() const
{
return d->machineType;
}
QString IDevice::defaultPrivateKeyFilePath()
{
return QDesktopServices::storageLocation(QDesktopServices::HomeLocation)

View File

@@ -57,6 +57,7 @@ public:
typedef QSharedPointer<const IDevice> ConstPtr;
enum Origin { ManuallyAdded, AutoDetected };
enum MachineType { Hardware, Emulator };
virtual ~IDevice();
@@ -108,9 +109,11 @@ public:
Utils::PortList freePorts() const;
void setFreePorts(const Utils::PortList &freePorts);
MachineType machineType() const;
protected:
IDevice();
IDevice(Core::Id type, Origin origin, Core::Id id = Core::Id());
IDevice(Core::Id type, Origin origin, MachineType machineType, Core::Id id = Core::Id());
IDevice(const IDevice &other);
Ptr sharedFromThis();

View File

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

View File

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

View File

@@ -143,7 +143,7 @@ void BlackBerryAbstractDeployStep::runCommands()
m_process->setEnvironment(m_environment);
m_process->setWorkingDirectory(m_buildDirectory);
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(handleProcessFinished(int, QProcess::ExitStatus)), Qt::DirectConnection);
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(handleProcessFinished(int,QProcess::ExitStatus)), Qt::DirectConnection);
runNextCommand();
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -51,25 +51,25 @@
#include <QFileInfo>
using ExtensionSystem::PluginManager;
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
namespace {
const char * const MAKESTEP_BS_ID("Qt4ProjectManager.MakeStep");
const char * const MAKE_ARGUMENTS_KEY("Qt4ProjectManager.MakeStep.MakeArguments");
const char * const MAKE_COMMAND_KEY("Qt4ProjectManager.MakeStep.MakeCommand");
const char * const CLEAN_KEY("Qt4ProjectManager.MakeStep.Clean");
const char MAKESTEP_BS_ID[] = "Qt4ProjectManager.MakeStep";
const char MAKE_ARGUMENTS_KEY[] = "Qt4ProjectManager.MakeStep.MakeArguments";
const char MAKE_COMMAND_KEY[] = "Qt4ProjectManager.MakeStep.MakeCommand";
const char CLEAN_KEY[] = "Qt4ProjectManager.MakeStep.Clean";
}
MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl) :
MakeStep::MakeStep(BuildStepList *bsl) :
AbstractProcessStep(bsl, Core::Id(MAKESTEP_BS_ID)),
m_clean(false)
{
ctor();
}
MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs) :
MakeStep::MakeStep(BuildStepList *bsl, MakeStep *bs) :
AbstractProcessStep(bsl, bs),
m_clean(bs->m_clean),
m_userArgs(bs->m_userArgs),
@@ -78,7 +78,7 @@ MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs) :
ctor();
}
MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id) :
MakeStep::MakeStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id),
m_clean(false)
{
@@ -121,7 +121,7 @@ QString MakeStep::makeCommand() const
QVariantMap MakeStep::toMap() const
{
QVariantMap map(ProjectExplorer::AbstractProcessStep::toMap());
QVariantMap map(AbstractProcessStep::toMap());
map.insert(QLatin1String(MAKE_ARGUMENTS_KEY), m_userArgs);
map.insert(QLatin1String(MAKE_COMMAND_KEY), m_makeCmd);
map.insert(QLatin1String(CLEAN_KEY), m_clean);
@@ -134,7 +134,7 @@ bool MakeStep::fromMap(const QVariantMap &map)
m_userArgs = map.value(QLatin1String(MAKE_ARGUMENTS_KEY)).toString();
m_clean = map.value(QLatin1String(CLEAN_KEY)).toBool();
return ProjectExplorer::AbstractProcessStep::fromMap(map);
return AbstractProcessStep::fromMap(map);
}
bool MakeStep::init()
@@ -145,23 +145,21 @@ bool MakeStep::init()
m_tasks.clear();
if (!bc) {
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Qt Creator needs a build configuration set up to build. Configure a tool chain in Project mode."),
m_tasks.append(Task(Task::Error, tr("Qt Creator needs a build configuration set up to build. Configure a tool chain in Project mode."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return false;
}
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
if (!tc) {
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Qt Creator needs a tool chain set up to build. Configure a tool chain the profile options."),
m_tasks.append(Task(Task::Error, tr("Qt Creator needs a tool chain set up to build. Configure a tool chain the target options."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return false;
}
ProjectExplorer::ProcessParameters *pp = processParameters();
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
QString workingDirectory;
@@ -246,10 +244,10 @@ bool MakeStep::init()
// but for now this is the least invasive change
// We also prepend "L" to the MAKEFLAGS, so that nmake / jom are less verbose
if (tc && m_makeCmd.isEmpty()) {
if (tc->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat )
if (tc->targetAbi().binaryFormat() != Abi::PEFormat )
Utils::QtcProcess::addArg(&args, QLatin1String("-w"));
if (tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS
&& tc->targetAbi().osFlavor() != ProjectExplorer::Abi::WindowsMSysFlavor) {
if (tc->targetAbi().os() == Abi::WindowsOS
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
const QString makeFlags = QLatin1String("MAKEFLAGS");
env.set(makeFlags, QLatin1Char('L') + env.value(makeFlags));
}
@@ -258,7 +256,7 @@ bool MakeStep::init()
pp->setEnvironment(env);
pp->setArguments(args);
ProjectExplorer::IOutputParser *parser = 0;
IOutputParser *parser = 0;
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
if (version)
parser = version->createOutputParser();
@@ -294,9 +292,9 @@ void MakeStep::run(QFutureInterface<bool> & fi)
// Warn on common error conditions:
bool canContinue = true;
foreach (const ProjectExplorer::Task &t, m_tasks) {
foreach (const Task &t, m_tasks) {
addTask(t);
if (t.type == ProjectExplorer::Task::Error)
if (t.type == Task::Error)
canContinue = false;
}
if (!canContinue) {
@@ -322,7 +320,7 @@ bool MakeStep::immutable() const
return false;
}
ProjectExplorer::BuildStepConfigWidget *MakeStep::createConfigWidget()
BuildStepConfigWidget *MakeStep::createConfigWidget()
{
return new MakeStepConfigWidget(this);
}
@@ -361,13 +359,13 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
connect(makeStep, SIGNAL(userArgumentsChanged()),
this, SLOT(userArgumentsChanged()));
ProjectExplorer::BuildConfiguration *bc = makeStep->buildConfiguration();
BuildConfiguration *bc = makeStep->buildConfiguration();
if (!bc) {
// That means the step is in the deploylist, so we listen to the active build config
// changed signal and react to the buildDirectoryChanged() signal of the buildconfiguration
bc = makeStep->target()->activeBuildConfiguration();
m_bc = bc;
connect (makeStep->target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
connect (makeStep->target(), SIGNAL(activeBuildConfigurationChanged(BuildConfiguration*)),
this, SLOT(activeBuildConfigurationChanged()));
}
@@ -376,7 +374,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
this, SLOT(updateDetails()));
}
connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateDetails()));
connect(m_makeStep->target(), SIGNAL(profileChanged()), this, SLOT(updateDetails()));
}
@@ -412,15 +410,15 @@ MakeStepConfigWidget::~MakeStepConfigWidget()
void MakeStepConfigWidget::updateDetails()
{
ProjectExplorer::ToolChain *tc
= ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
ToolChain *tc
= ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
if (tc)
m_ui->makeLabel->setText(tr("Override %1:").arg(tc->makeCommand()));
else
m_ui->makeLabel->setText(tr("Make:"));
if (!tc) {
setSummaryText(tr("<b>Make:</b> No tool chain set in profile."));
setSummaryText(tr("<b>Make:</b> No tool chain set in target."));
return;
}
Qt4BuildConfiguration *bc = m_makeStep->qt4BuildConfiguration();
@@ -431,7 +429,7 @@ void MakeStepConfigWidget::updateDetails()
return;
}
ProjectExplorer::ProcessParameters param;
ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
param.setWorkingDirectory(bc->buildDirectory());
QString makeCmd = tc->makeCommand();
@@ -456,10 +454,10 @@ void MakeStepConfigWidget::updateDetails()
// but for now this is the least invasive change
// We also prepend "L" to the MAKEFLAGS, so that nmake / jom are less verbose
if (tc && m_makeStep->makeCommand().isEmpty()) {
if (tc->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat )
if (tc->targetAbi().binaryFormat() != Abi::PEFormat )
Utils::QtcProcess::addArg(&args, QLatin1String("-w"));
if (tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS
&& tc->targetAbi().osFlavor() != ProjectExplorer::Abi::WindowsMSysFlavor) {
if (tc->targetAbi().os() == Abi::WindowsOS
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
const QString makeFlags = QLatin1String("MAKEFLAGS");
env.set(makeFlags, QLatin1Char('L') + env.value(makeFlags));
}
@@ -510,7 +508,7 @@ void MakeStepConfigWidget::makeArgumentsLineEdited()
///
MakeStepFactory::MakeStepFactory(QObject *parent) :
ProjectExplorer::IBuildStepFactory(parent)
IBuildStepFactory(parent)
{
}
@@ -518,14 +516,14 @@ MakeStepFactory::~MakeStepFactory()
{
}
bool MakeStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
if (parent->target()->project()->id() != Core::Id(Constants::QT4PROJECT_ID))
return false;
return (id == Core::Id(MAKESTEP_BS_ID));
}
ProjectExplorer::BuildStep *MakeStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -537,24 +535,24 @@ ProjectExplorer::BuildStep *MakeStepFactory::create(ProjectExplorer::BuildStepLi
return step;
}
bool MakeStepFactory::canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const
bool MakeStepFactory::canClone(BuildStepList *parent, BuildStep *source) const
{
return canCreate(parent, source->id());
}
ProjectExplorer::BuildStep *MakeStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source)
BuildStep *MakeStepFactory::clone(BuildStepList *parent, BuildStep *source)
{
if (!canClone(parent, source))
return 0;
return new MakeStep(parent, static_cast<MakeStep *>(source));
}
bool MakeStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
bool MakeStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
return canCreate(parent, ProjectExplorer::idFromMap(map));
return canCreate(parent, idFromMap(map));
}
ProjectExplorer::BuildStep *MakeStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
{
if (!canRestore(parent, map))
return 0;
@@ -565,7 +563,7 @@ ProjectExplorer::BuildStep *MakeStepFactory::restore(ProjectExplorer::BuildStepL
return 0;
}
QList<Core::Id> MakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
QList<Core::Id> MakeStepFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->target()->project()->id() == Core::Id(Constants::QT4PROJECT_ID))
return QList<Core::Id>() << Core::Id(MAKESTEP_BS_ID);

View File

@@ -39,9 +39,7 @@
namespace ProjectExplorer {
class BuildStep;
class GnuMakeParser;
class IBuildStepFactory;
class Project;
}
namespace Qt4ProjectManager {

View File

@@ -51,6 +51,7 @@ namespace Qt4ProjectManager {
SymbianIDevice::SymbianIDevice() :
ProjectExplorer::IDevice(Internal::SymbianIDeviceFactory::deviceType(),
ProjectExplorer::IDevice::AutoDetected,
ProjectExplorer::IDevice::Hardware,
Core::Id("Symbian Device")),
m_port(QLatin1String(DEFAULT_CODA_TCP_PORT)),
m_communicationChannel(CommunicationCodaSerialConnection)

View File

@@ -151,7 +151,7 @@ void Qt4BuildConfiguration::profileChanged()
void Qt4BuildConfiguration::emitBuildDirectoryChanged()
{
// We also emit buildDirectoryChanged if the the qt version's supportShadowBuild changed
// We also emit buildDirectoryChanged if the the Qt version's supportShadowBuild changed
if (buildDirectory() != m_lastEmmitedBuildDirectory
|| supportsShadowBuilds() != m_qtVersionSupportsShadowBuilds) {
m_lastEmmitedBuildDirectory = buildDirectory();
@@ -442,7 +442,7 @@ Qt4BuildConfiguration::MakefileState Qt4BuildConfiguration::compareToImportFrom(
}
} else {
if (debug)
qDebug()<<"diffrent qt versions, buildconfiguration:"<<version->qmakeCommand().toString()<<" Makefile:"<<qmakePath.toString();
qDebug() << "different Qt versions, buildconfiguration:" << version->qmakeCommand().toString() << " Makefile:"<< qmakePath.toString();
return MakefileForWrongProject;
}
}

View File

@@ -123,14 +123,14 @@ public:
QString additionalArguments,
QString directory,
bool importing);
/// returns whether the qt version in the profile supports shadow building (also true for no qt version)
/// returns whether the Qt version in the profile supports shadow building (also true for no Qt version)
bool supportsShadowBuilds();
public slots:
void emitEvaluateBuildSystem();
signals:
/// emitted for setQMakeBuildConfig, not emitted for qt version changes, even
/// emitted for setQMakeBuildConfig, not emitted for Qt version changes, even
/// if those change the qmakebuildconfig
void qmakeBuildConfigurationChanged();
/// emitted when smart installer property of S60 create package step changes

View File

@@ -111,7 +111,7 @@ Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget()
void Qt4ProjectConfigWidget::updateDetails()
{
m_detailsContainer->setSummaryText(
tr("building in <b>%3</b>")
tr("building in <b>%1</b>")
.arg(QDir::toNativeSeparators(m_buildConfiguration->buildDirectory())));
}
@@ -245,7 +245,7 @@ void Qt4ProjectConfigWidget::updateProblemLabel()
QString shadowBuildWarning;
if (!version->supportsShadowBuilds() && m_buildConfiguration->shadowBuild()) {
shadowBuildWarning =tr("The qt version %1 does not support shadow builds, building might fail.")
shadowBuildWarning =tr("The Qt version %1 does not support shadow builds, building might fail.")
.arg(version->displayName())
+ QLatin1String("<br>");
}

View File

@@ -245,7 +245,7 @@ private:
QString findQtBinary(Binaries binary) const;
void updateMkspec() const;
void setId(int id); // used by the qtversionmanager for legacy restore
// and by the qtoptionspage to replace qt versions
// and by the qtoptionspage to replace Qt versions
QString m_displayName;
int m_id;
bool m_isAutodetected;

View File

@@ -326,7 +326,7 @@ QStringList ExamplesListModel::exampleSources(QString *examplesFallback, QString
return sources;
// try to find a suitable Qt version
m_updateOnQtVersionsChanged = true; // this must be updated when the qt versions change
m_updateOnQtVersionsChanged = true; // this must be updated when the Qt versions change
// fallbacks are passed back if no example manifest is found
// and we fallback to Qt Creator's shipped manifest (e.g. only old Qt Versions found)
QString potentialExamplesFallback;

View File

@@ -700,7 +700,7 @@ void QtOptionsPageWidget::editPath()
if (current->type() != version->type()) {
// not the same type, error out
QMessageBox::critical(this, tr("Qt versions incompatible"),
tr("The qt version selected must be for the same target."),
tr("The Qt version selected must be for the same target."),
QMessageBox::Ok);
delete version;
return;
@@ -911,7 +911,7 @@ void QtOptionsPageWidget::updateDebuggingHelperUi()
}
}
// To be called if a qt version was removed or added
// To be called if a Qt version was removed or added
void QtOptionsPageWidget::updateCleanUpButton()
{
bool hasInvalidVersion = false;
@@ -1057,7 +1057,7 @@ void QtOptionsPageWidget::apply()
this, SLOT(updateQtVersions(QList<int>,QList<int>,QList<int>)));
}
/* Checks that the qt version name is unique
/* Checks that the Qt version name is unique
* and otherwise changes the name
*
*/
@@ -1115,7 +1115,7 @@ QString QtOptionsPageWidget::searchKeywords() const
// Symbian specific, could be factored out to the factory
// checking m_configurationWidget is not enough, we want them to be a keyword
// regardless of which qt versions configuration widget is currently active
// regardless of which Qt versions configuration widget is currently active
ts << sep << tr("S60 SDK:")
<< sep << tr("SBS v2 directory:");

View File

@@ -141,7 +141,7 @@ void QtVersionManager::extensionsInitialized()
if (!success) {
// We did neither restore our settings or upgraded
// in that case figure out if there's a qt in path
// and add it to the qt versions
// and add it to the Qt versions
findSystemQt();
}
@@ -288,7 +288,7 @@ void QtVersionManager::updateFromInstaller()
qDebug("Warning: Unable to find factory for type '%s'", qPrintable(type));
continue;
}
// First try to find a existing qt version to update
// First try to find a existing Qt version to update
bool restored = false;
foreach (BaseQtVersion *v, m_versions) {
if (v->autodetectionSource() == autoDetectionSource) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -45,9 +45,6 @@
namespace RemoteLinux {
const QLatin1String MachineTypeKey("Type");
const LinuxDeviceConfiguration::MachineType DefaultMachineType = LinuxDeviceConfiguration::Hardware;
LinuxDeviceConfiguration::Ptr LinuxDeviceConfiguration::create(const QString &name,
Core::Id type, MachineType machineType, Origin origin, Core::Id id)
{
@@ -102,18 +99,16 @@ void LinuxDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent)
d->exec();
}
LinuxDeviceConfiguration::LinuxDeviceConfiguration(const QString &name, Core::Id type,
MachineType machineType, Origin origin, Core::Id id)
: IDevice(type, origin, id)
LinuxDeviceConfiguration::LinuxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
Origin origin, Core::Id id)
: IDevice(type, origin, machineType, id)
{
setDisplayName(name);
m_machineType = machineType;
}
LinuxDeviceConfiguration::LinuxDeviceConfiguration(const LinuxDeviceConfiguration &other)
: IDevice(other)
{
m_machineType = other.machineType();
}
LinuxDeviceConfiguration::Ptr LinuxDeviceConfiguration::create()
@@ -121,27 +116,9 @@ LinuxDeviceConfiguration::Ptr LinuxDeviceConfiguration::create()
return Ptr(new LinuxDeviceConfiguration);
}
void LinuxDeviceConfiguration::fromMap(const QVariantMap &map)
{
IDevice::fromMap(map);
m_machineType = static_cast<MachineType>(map.value(MachineTypeKey, DefaultMachineType).toInt());
}
QVariantMap LinuxDeviceConfiguration::toMap() const
{
QVariantMap map = IDevice::toMap();
map.insert(MachineTypeKey, m_machineType);
return map;
}
ProjectExplorer::IDevice::Ptr LinuxDeviceConfiguration::clone() const
{
return Ptr(new LinuxDeviceConfiguration(*this));
}
LinuxDeviceConfiguration::MachineType LinuxDeviceConfiguration::machineType() const
{
return m_machineType;
}
} // namespace RemoteLinux

View File

@@ -51,10 +51,6 @@ public:
typedef QSharedPointer<LinuxDeviceConfiguration> Ptr;
typedef QSharedPointer<const LinuxDeviceConfiguration> ConstPtr;
enum MachineType { Hardware, Emulator };
MachineType machineType() const;
static Ptr create();
static Ptr create(const QString &name, Core::Id type, MachineType machineType,
Origin origin = ManuallyAdded, Core::Id id = Core::Id());
@@ -64,20 +60,16 @@ public:
QList<Core::Id> actionIds() const;
QString displayNameForActionId(Core::Id actionId) const;
void executeAction(Core::Id actionId, QWidget *parent) const;
void fromMap(const QVariantMap &map);
ProjectExplorer::IDevice::Ptr clone() const;
protected:
LinuxDeviceConfiguration() {}
LinuxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
Origin origin, Core::Id id);
LinuxDeviceConfiguration(const QString &name, Core::Id type,
MachineType machineType, Origin origin, Core::Id id);
LinuxDeviceConfiguration(const LinuxDeviceConfiguration &other);
QVariantMap toMap() const;
private:
LinuxDeviceConfiguration &operator=(const LinuxDeviceConfiguration &);
LinuxDeviceConfiguration::MachineType m_machineType;
};
} // namespace RemoteLinux

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,16 +26,13 @@
**
**
**************************************************************************/
#include "remotelinuxprocesslist.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxprocesslist.h"
#include <utils/qtcassert.h>
#include <ssh/sshremoteprocessrunner.h>
#include <QByteArray>
#include <QString>
using namespace ProjectExplorer;
using namespace QSsh;
namespace RemoteLinux {
@@ -55,14 +52,14 @@ static QString visualizeNull(QString s)
class AbstractRemoteLinuxProcessListPrivate
{
public:
AbstractRemoteLinuxProcessListPrivate(const LinuxDeviceConfiguration::ConstPtr &devConf)
AbstractRemoteLinuxProcessListPrivate(const IDevice::ConstPtr &devConf)
: deviceConfiguration(devConf),
state(Inactive)
{
}
const LinuxDeviceConfiguration::ConstPtr deviceConfiguration;
const IDevice::ConstPtr deviceConfiguration;
SshRemoteProcessRunner process;
QList<RemoteProcess> remoteProcesses;
QString errorMsg;
@@ -73,17 +70,12 @@ public:
using namespace Internal;
AbstractRemoteLinuxProcessList::AbstractRemoteLinuxProcessList(const LinuxDeviceConfiguration::ConstPtr &devConfig,
AbstractRemoteLinuxProcessList::AbstractRemoteLinuxProcessList(const IDevice::ConstPtr &devConfig,
QObject *parent)
: QAbstractTableModel(parent), d(new AbstractRemoteLinuxProcessListPrivate(devConfig))
{
}
LinuxDeviceConfiguration::ConstPtr AbstractRemoteLinuxProcessList::deviceConfiguration() const
{
return d->deviceConfiguration;
}
AbstractRemoteLinuxProcessList::~AbstractRemoteLinuxProcessList()
{
delete d;
@@ -224,7 +216,7 @@ void AbstractRemoteLinuxProcessList::setFinished()
}
GenericRemoteLinuxProcessList::GenericRemoteLinuxProcessList(const LinuxDeviceConfiguration::ConstPtr &devConfig,
GenericRemoteLinuxProcessList::GenericRemoteLinuxProcessList(const IDevice::ConstPtr &devConfig,
QObject *parent)
: AbstractRemoteLinuxProcessList(devConfig, parent)
{

View File

@@ -31,12 +31,13 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <QAbstractTableModel>
#include <QList>
#include <QSharedPointer>
namespace RemoteLinux {
class LinuxDeviceConfiguration;
namespace Internal {
class AbstractRemoteLinuxProcessListPrivate;
@@ -70,11 +71,9 @@ signals:
void processKilled();
protected:
AbstractRemoteLinuxProcessList(const QSharedPointer<const LinuxDeviceConfiguration> &devConfig,
AbstractRemoteLinuxProcessList(const ProjectExplorer::IDevice::ConstPtr &devConfig,
QObject *parent = 0);
QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const;
private slots:
void handleConnectionError();
void handleRemoteProcessFinished(int exitStatus);
@@ -101,7 +100,7 @@ class REMOTELINUX_EXPORT GenericRemoteLinuxProcessList : public AbstractRemoteLi
{
Q_OBJECT
public:
GenericRemoteLinuxProcessList(const QSharedPointer<const LinuxDeviceConfiguration> &devConfig,
GenericRemoteLinuxProcessList(const ProjectExplorer::IDevice::ConstPtr &devConfig,
QObject *parent = 0);
protected:

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,9 +26,8 @@
**
**
**************************************************************************/
#include "remotelinuxusedportsgatherer.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxusedportsgatherer.h"
#include <utils/portlist.h>
#include <utils/qtcassert.h>
@@ -38,6 +37,7 @@
#include <QString>
using namespace ProjectExplorer;
using namespace QSsh;
using namespace Utils;
@@ -72,7 +72,7 @@ RemoteLinuxUsedPortsGatherer::~RemoteLinuxUsedPortsGatherer()
delete d;
}
void RemoteLinuxUsedPortsGatherer::start(const LinuxDeviceConfiguration::ConstPtr &devConf)
void RemoteLinuxUsedPortsGatherer::start(const IDevice::ConstPtr &devConf)
{
QTC_ASSERT(!d->connection, return);
d->portsToCheck = devConf->freePorts();

View File

@@ -31,6 +31,8 @@
#include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h>
#include <QList>
#include <QObject>
#include <QSharedPointer>
@@ -40,7 +42,6 @@ QT_FORWARD_DECLARE_CLASS(QString)
namespace Utils { class PortList; }
namespace RemoteLinux {
class LinuxDeviceConfiguration;
namespace Internal {
class RemoteLinuxUsedPortsGathererPrivate;
@@ -53,7 +54,7 @@ class REMOTELINUX_EXPORT RemoteLinuxUsedPortsGatherer : public QObject
public:
explicit RemoteLinuxUsedPortsGatherer(QObject *parent = 0);
~RemoteLinuxUsedPortsGatherer();
void start(const QSharedPointer<const LinuxDeviceConfiguration> &devConf);
void start(const ProjectExplorer::IDevice::ConstPtr &devConf);
void stop();
int getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
QList<int> usedPorts() const;

View File

@@ -31,7 +31,6 @@
#include "startgdbserverdialog.h"
#include "remotelinuxprocesslist.h"
#include "linuxdeviceconfiguration.h"
#include "remotelinuxusedportsgatherer.h"
#include <coreplugin/icore.h>
@@ -84,11 +83,10 @@ class StartGdbServerDialogPrivate
public:
StartGdbServerDialogPrivate(StartGdbServerDialog *q);
LinuxDeviceConfiguration::ConstPtr currentDevice() const
IDevice::ConstPtr currentDevice() const
{
Profile *profile = profileChooser->currentProfile();
IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
return device.dynamicCast<const LinuxDeviceConfiguration>();
return DeviceProfileInformation::device(profile);
}
StartGdbServerDialog *q;
@@ -203,7 +201,7 @@ StartGdbServerDialog::~StartGdbServerDialog()
void StartGdbServerDialog::attachToDevice()
{
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
IDevice::ConstPtr device = d->currentDevice();
// TODO: display error on non-matching device.
if (!device)
return;
@@ -248,7 +246,7 @@ void StartGdbServerDialog::attachToProcess()
return;
d->attachProcessButton->setEnabled(false);
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
IDevice::ConstPtr device = d->currentDevice();
if (!device)
return;
PortList ports = device->freePorts();
@@ -352,7 +350,7 @@ void StartGdbServerDialog::handleProcessErrorOutput()
void StartGdbServerDialog::reportOpenPort(int port)
{
logMessage(tr("Port %1 is now accessible.").arg(port));
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
IDevice::ConstPtr device = d->currentDevice();
QString channel = QString("%1:%2").arg(device->sshParameters().host).arg(port);
logMessage(tr("Server started on %1").arg(channel));
@@ -375,7 +373,7 @@ void StartGdbServerDialog::handleProcessClosed(int status)
void StartGdbServerDialog::startGdbServerOnPort(int port, int pid)
{
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
IDevice::ConstPtr device = d->currentDevice();
connect(&d->runner, SIGNAL(connectionError()), SLOT(handleConnectionError()));
connect(&d->runner, SIGNAL(processStarted()), SLOT(handleProcessStarted()));
connect(&d->runner, SIGNAL(readyReadStandardOutput()), SLOT(handleProcessOutputAvailable()));

View File

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

Some files were not shown because too many files have changed in this diff Show More