forked from qt-creator/qt-creator
Qnx: Rename qnxdeviceconfiguration* to qnxdevice*
All other targets call their devices "Device", not "DeviceConfiguration". Also, add a few namespaces and inline the trivial QnxDeviceConfigurationWizardSetupPage files. Change-Id: I26168d1b676f6a646b11b61d4cdb7d0f30e18242 Reviewed-by: Anton Kreuzkamp <anton.kreuzkamp@kdab.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -5,9 +5,8 @@ include(../../qtcreatorplugin.pri)
|
||||
SOURCES += qnxplugin.cpp \
|
||||
qnxbaseqtconfigwidget.cpp \
|
||||
qnxutils.cpp \
|
||||
qnxdeviceconfigurationfactory.cpp \
|
||||
qnxdeviceconfigurationwizard.cpp \
|
||||
qnxdeviceconfigurationwizardpages.cpp \
|
||||
qnxdevicefactory.cpp \
|
||||
qnxdevicewizard.cpp \
|
||||
qnxrunconfiguration.cpp \
|
||||
qnxruncontrolfactory.cpp \
|
||||
qnxabstractrunsupport.cpp \
|
||||
@@ -20,7 +19,7 @@ SOURCES += qnxplugin.cpp \
|
||||
qnxqtversionfactory.cpp \
|
||||
qnxqtversion.cpp \
|
||||
qnxdeployconfiguration.cpp \
|
||||
qnxdeviceconfiguration.cpp \
|
||||
qnxdevice.cpp \
|
||||
pathchooserdelegate.cpp \
|
||||
qnxdevicetester.cpp \
|
||||
qnxdeviceprocesssignaloperation.cpp \
|
||||
@@ -41,9 +40,8 @@ HEADERS += qnxplugin.h\
|
||||
qnxconstants.h \
|
||||
qnxbaseqtconfigwidget.h \
|
||||
qnxutils.h \
|
||||
qnxdeviceconfigurationfactory.h \
|
||||
qnxdeviceconfigurationwizard.h \
|
||||
qnxdeviceconfigurationwizardpages.h \
|
||||
qnxdevicefactory.h \
|
||||
qnxdevicewizard.h \
|
||||
qnxrunconfiguration.h \
|
||||
qnxruncontrolfactory.h \
|
||||
qnxabstractrunsupport.h \
|
||||
@@ -56,7 +54,7 @@ HEADERS += qnxplugin.h\
|
||||
qnxqtversionfactory.h \
|
||||
qnxqtversion.h \
|
||||
qnxdeployconfiguration.h \
|
||||
qnxdeviceconfiguration.h \
|
||||
qnxdevice.h \
|
||||
pathchooserdelegate.h \
|
||||
qnxdevicetester.h \
|
||||
qnxdeviceprocesssignaloperation.h \
|
||||
|
||||
@@ -45,14 +45,12 @@ QtcPlugin {
|
||||
"qnxdeployconfigurationfactory.h",
|
||||
"qnxdeploystepfactory.cpp",
|
||||
"qnxdeploystepfactory.h",
|
||||
"qnxdeviceconfiguration.cpp",
|
||||
"qnxdeviceconfiguration.h",
|
||||
"qnxdeviceconfigurationfactory.cpp",
|
||||
"qnxdeviceconfigurationfactory.h",
|
||||
"qnxdeviceconfigurationwizard.cpp",
|
||||
"qnxdeviceconfigurationwizard.h",
|
||||
"qnxdeviceconfigurationwizardpages.cpp",
|
||||
"qnxdeviceconfigurationwizardpages.h",
|
||||
"qnxdevice.cpp",
|
||||
"qnxdevice.h",
|
||||
"qnxdevicefactory.cpp",
|
||||
"qnxdevicefactory.h",
|
||||
"qnxdevicewizard.cpp",
|
||||
"qnxdevicewizard.h",
|
||||
"qnxdeviceprocesslist.cpp",
|
||||
"qnxdeviceprocesslist.h",
|
||||
"qnxdeviceprocesssignaloperation.cpp",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "qnxanalyzesupport.h"
|
||||
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevice.h"
|
||||
#include "qnxrunconfiguration.h"
|
||||
#include "slog2inforunner.h"
|
||||
|
||||
@@ -71,7 +71,7 @@ QnxAnalyzeSupport::QnxAnalyzeSupport(QnxRunConfiguration *runConfig,
|
||||
this, &QnxAnalyzeSupport::remoteIsRunning);
|
||||
|
||||
IDevice::ConstPtr dev = DeviceKitInformation::device(runConfig->target()->kit());
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
QnxDevice::ConstPtr qnxDevice = dev.dynamicCast<const QnxDevice>();
|
||||
|
||||
const QString applicationId = FileName::fromString(runConfig->remoteExecutableFilePath()).fileName();
|
||||
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "qnxdebugsupport.h"
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevice.h"
|
||||
#include "qnxrunconfiguration.h"
|
||||
#include "slog2inforunner.h"
|
||||
|
||||
@@ -69,7 +69,7 @@ QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::Debug
|
||||
|
||||
const QString applicationId = Utils::FileName::fromString(runConfig->remoteExecutableFilePath()).fileName();
|
||||
IDevice::ConstPtr dev = DeviceKitInformation::device(runConfig->target()->kit());
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
QnxDevice::ConstPtr qnxDevice = dev.dynamicCast<const QnxDevice>();
|
||||
|
||||
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
|
||||
connect(m_slog2Info, &Slog2InfoRunner::output, this, &QnxDebugSupport::handleApplicationOutput);
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxdeployconfiguration.h"
|
||||
#include "qnxdeviceconfigurationfactory.h"
|
||||
#include "qnxdevicefactory.h"
|
||||
|
||||
#include <projectexplorer/devicesupport/devicecheckbuildstep.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <remotelinux/genericdirectuploadstep.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory(QObject *parent)
|
||||
: ProjectExplorer::DeployConfigurationFactory(parent)
|
||||
@@ -112,8 +112,11 @@ ProjectExplorer::DeployConfiguration *QnxDeployConfigurationFactory::clone(Proje
|
||||
bool QnxDeployConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
|
||||
{
|
||||
Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
|
||||
if (deviceType != QnxDeviceConfigurationFactory::deviceType())
|
||||
if (deviceType != QnxDeviceFactory::deviceType())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "qnxdeploystepfactory.h"
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxdeviceconfigurationfactory.h"
|
||||
#include "qnxdevicefactory.h"
|
||||
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/devicesupport/devicecheckbuildstep.h>
|
||||
@@ -34,8 +34,8 @@
|
||||
#include <projectexplorer/target.h>
|
||||
#include <remotelinux/genericdirectuploadstep.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDeployStepFactory::QnxDeployStepFactory()
|
||||
: ProjectExplorer::IBuildStepFactory()
|
||||
@@ -48,7 +48,7 @@ QList<Core::Id> QnxDeployStepFactory::availableCreationIds(ProjectExplorer::Buil
|
||||
return QList<Core::Id>();
|
||||
|
||||
Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
|
||||
if (deviceType != QnxDeviceConfigurationFactory::deviceType())
|
||||
if (deviceType != QnxDeviceFactory::deviceType())
|
||||
return QList<Core::Id>();
|
||||
|
||||
return QList<Core::Id>() << RemoteLinux::GenericDirectUploadStep::stepId()
|
||||
@@ -115,3 +115,6 @@ ProjectExplorer::BuildStep *QnxDeployStepFactory::clone(ProjectExplorer::BuildSt
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevice.h"
|
||||
#include "qnxdevicetester.h"
|
||||
#include "qnxdeviceprocesslist.h"
|
||||
#include "qnxdeviceprocesssignaloperation.h"
|
||||
@@ -89,40 +89,40 @@ class QnxPortsGatheringMethod : public PortsGatheringMethod
|
||||
}
|
||||
};
|
||||
|
||||
QnxDeviceConfiguration::QnxDeviceConfiguration()
|
||||
QnxDevice::QnxDevice()
|
||||
: RemoteLinux::LinuxDevice()
|
||||
, m_versionNumber(0)
|
||||
{
|
||||
}
|
||||
|
||||
QnxDeviceConfiguration::QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
||||
QnxDevice::QnxDevice(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
||||
: RemoteLinux::LinuxDevice(name, type, machineType, origin, id)
|
||||
, m_versionNumber(0)
|
||||
{
|
||||
}
|
||||
|
||||
QnxDeviceConfiguration::QnxDeviceConfiguration(const QnxDeviceConfiguration &other)
|
||||
QnxDevice::QnxDevice(const QnxDevice &other)
|
||||
: RemoteLinux::LinuxDevice(other)
|
||||
, m_versionNumber(other.m_versionNumber)
|
||||
{
|
||||
}
|
||||
|
||||
QnxDeviceConfiguration::Ptr QnxDeviceConfiguration::create()
|
||||
QnxDevice::Ptr QnxDevice::create()
|
||||
{
|
||||
return Ptr(new QnxDeviceConfiguration);
|
||||
return Ptr(new QnxDevice);
|
||||
}
|
||||
|
||||
QnxDeviceConfiguration::Ptr QnxDeviceConfiguration::create(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
||||
QnxDevice::Ptr QnxDevice::create(const QString &name, Core::Id type, MachineType machineType, Origin origin, Core::Id id)
|
||||
{
|
||||
return Ptr(new QnxDeviceConfiguration(name, type, machineType, origin, id));
|
||||
return Ptr(new QnxDevice(name, type, machineType, origin, id));
|
||||
}
|
||||
|
||||
QString QnxDeviceConfiguration::displayType() const
|
||||
QString QnxDevice::displayType() const
|
||||
{
|
||||
return tr("QNX");
|
||||
}
|
||||
|
||||
int QnxDeviceConfiguration::qnxVersion() const
|
||||
int QnxDevice::qnxVersion() const
|
||||
{
|
||||
if (m_versionNumber == 0)
|
||||
updateVersionNumber();
|
||||
@@ -130,7 +130,7 @@ int QnxDeviceConfiguration::qnxVersion() const
|
||||
return m_versionNumber;
|
||||
}
|
||||
|
||||
void QnxDeviceConfiguration::updateVersionNumber() const
|
||||
void QnxDevice::updateVersionNumber() const
|
||||
{
|
||||
QEventLoop eventLoop;
|
||||
SshDeviceProcess versionNumberProcess(sharedFromThis());
|
||||
@@ -162,52 +162,52 @@ void QnxDeviceConfiguration::updateVersionNumber() const
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void QnxDeviceConfiguration::fromMap(const QVariantMap &map)
|
||||
void QnxDevice::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_versionNumber = map.value(QLatin1String(QnxVersionKey), 0).toInt();
|
||||
RemoteLinux::LinuxDevice::fromMap(map);
|
||||
}
|
||||
|
||||
QVariantMap QnxDeviceConfiguration::toMap() const
|
||||
QVariantMap QnxDevice::toMap() const
|
||||
{
|
||||
QVariantMap map(RemoteLinux::LinuxDevice::toMap());
|
||||
map.insert(QLatin1String(QnxVersionKey), m_versionNumber);
|
||||
return map;
|
||||
}
|
||||
|
||||
IDevice::Ptr QnxDeviceConfiguration::clone() const
|
||||
IDevice::Ptr QnxDevice::clone() const
|
||||
{
|
||||
return Ptr(new QnxDeviceConfiguration(*this));
|
||||
return Ptr(new QnxDevice(*this));
|
||||
}
|
||||
|
||||
PortsGatheringMethod::Ptr QnxDeviceConfiguration::portsGatheringMethod() const
|
||||
PortsGatheringMethod::Ptr QnxDevice::portsGatheringMethod() const
|
||||
{
|
||||
return PortsGatheringMethod::Ptr(new QnxPortsGatheringMethod);
|
||||
}
|
||||
|
||||
DeviceProcessList *QnxDeviceConfiguration::createProcessListModel(QObject *parent) const
|
||||
DeviceProcessList *QnxDevice::createProcessListModel(QObject *parent) const
|
||||
{
|
||||
return new QnxDeviceProcessList(sharedFromThis(), parent);
|
||||
}
|
||||
|
||||
DeviceTester *QnxDeviceConfiguration::createDeviceTester() const
|
||||
DeviceTester *QnxDevice::createDeviceTester() const
|
||||
{
|
||||
return new QnxDeviceTester;
|
||||
}
|
||||
|
||||
DeviceProcess *QnxDeviceConfiguration::createProcess(QObject *parent) const
|
||||
DeviceProcess *QnxDevice::createProcess(QObject *parent) const
|
||||
{
|
||||
return new QnxDeviceProcess(sharedFromThis(), parent);
|
||||
}
|
||||
|
||||
QList<Core::Id> QnxDeviceConfiguration::actionIds() const
|
||||
QList<Core::Id> QnxDevice::actionIds() const
|
||||
{
|
||||
QList<Core::Id> actions = RemoteLinux::LinuxDevice::actionIds();
|
||||
actions << Core::Id(DeployQtLibrariesActionId);
|
||||
return actions;
|
||||
}
|
||||
|
||||
QString QnxDeviceConfiguration::displayNameForActionId(Core::Id actionId) const
|
||||
QString QnxDevice::displayNameForActionId(Core::Id actionId) const
|
||||
{
|
||||
if (actionId == Core::Id(DeployQtLibrariesActionId))
|
||||
return tr("Deploy Qt libraries...");
|
||||
@@ -215,10 +215,10 @@ QString QnxDeviceConfiguration::displayNameForActionId(Core::Id actionId) const
|
||||
return RemoteLinux::LinuxDevice::displayNameForActionId(actionId);
|
||||
}
|
||||
|
||||
void QnxDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent)
|
||||
void QnxDevice::executeAction(Core::Id actionId, QWidget *parent)
|
||||
{
|
||||
const QnxDeviceConfiguration::ConstPtr device =
|
||||
sharedFromThis().staticCast<const QnxDeviceConfiguration>();
|
||||
const QnxDevice::ConstPtr device =
|
||||
sharedFromThis().staticCast<const QnxDevice>();
|
||||
if (actionId == Core::Id(DeployQtLibrariesActionId)) {
|
||||
QnxDeployQtLibrariesDialog dialog(device, parent);
|
||||
dialog.exec();
|
||||
@@ -227,7 +227,7 @@ void QnxDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent)
|
||||
}
|
||||
}
|
||||
|
||||
DeviceProcessSignalOperation::Ptr QnxDeviceConfiguration::signalOperation() const
|
||||
DeviceProcessSignalOperation::Ptr QnxDevice::signalOperation() const
|
||||
{
|
||||
return DeviceProcessSignalOperation::Ptr(
|
||||
new QnxDeviceProcessSignalOperation(sshParameters()));
|
||||
@@ -31,13 +31,13 @@
|
||||
|
||||
namespace Qnx {
|
||||
|
||||
class QNX_EXPORT QnxDeviceConfiguration : public RemoteLinux::LinuxDevice
|
||||
class QNX_EXPORT QnxDevice : public RemoteLinux::LinuxDevice
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDeviceConfiguration)
|
||||
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxDevice)
|
||||
|
||||
public:
|
||||
typedef QSharedPointer<QnxDeviceConfiguration> Ptr;
|
||||
typedef QSharedPointer<const QnxDeviceConfiguration> ConstPtr;
|
||||
typedef QSharedPointer<QnxDevice> Ptr;
|
||||
typedef QSharedPointer<const QnxDevice> ConstPtr;
|
||||
|
||||
static Ptr create();
|
||||
static Ptr create(const QString &name, Core::Id type, MachineType machineType,
|
||||
@@ -63,10 +63,10 @@ public:
|
||||
QVariantMap toMap() const override;
|
||||
|
||||
protected:
|
||||
QnxDeviceConfiguration();
|
||||
QnxDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
|
||||
QnxDevice();
|
||||
QnxDevice(const QString &name, Core::Id type, MachineType machineType,
|
||||
Origin origin, Core::Id id);
|
||||
QnxDeviceConfiguration(const QnxDeviceConfiguration &other);
|
||||
QnxDevice(const QnxDevice &other);
|
||||
|
||||
QString interruptProcessByNameCommandLine(const QString &filePath) const;
|
||||
QString killProcessByNameCommandLine(const QString &filePath) const;
|
||||
@@ -1,42 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
||||
** Contact: KDAB (info@kdab.com)
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qnxdeviceconfigurationwizardpages.h"
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDeviceConfigurationWizardSetupPage::QnxDeviceConfigurationWizardSetupPage(QWidget *parent) :
|
||||
RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString QnxDeviceConfigurationWizardSetupPage::defaultConfigurationName() const
|
||||
{
|
||||
return tr("QNX Device");
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
@@ -1,43 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
||||
** Contact: KDAB (info@kdab.com)
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <remotelinux/genericlinuxdeviceconfigurationwizardpages.h>
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
class QnxDeviceConfigurationWizardSetupPage : public RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QnxDeviceConfigurationWizardSetupPage(QWidget *parent = 0);
|
||||
|
||||
QString defaultConfigurationName() const;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
@@ -23,61 +23,64 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qnxdeviceconfigurationfactory.h"
|
||||
#include "qnxdevicefactory.h"
|
||||
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxdeviceconfigurationwizard.h"
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevicewizard.h"
|
||||
#include "qnxdevice.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDeviceConfigurationFactory::QnxDeviceConfigurationFactory(QObject *parent) :
|
||||
QnxDeviceFactory::QnxDeviceFactory(QObject *parent) :
|
||||
ProjectExplorer::IDeviceFactory(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString QnxDeviceConfigurationFactory::displayNameForId(Core::Id type) const
|
||||
QString QnxDeviceFactory::displayNameForId(Core::Id type) const
|
||||
{
|
||||
Q_UNUSED(type);
|
||||
return tr("QNX Device");
|
||||
}
|
||||
|
||||
QList<Core::Id> QnxDeviceConfigurationFactory::availableCreationIds() const
|
||||
QList<Core::Id> QnxDeviceFactory::availableCreationIds() const
|
||||
{
|
||||
return { Constants::QNX_QNX_OS_TYPE };
|
||||
}
|
||||
|
||||
bool QnxDeviceConfigurationFactory::canCreate() const
|
||||
bool QnxDeviceFactory::canCreate() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationFactory::create(Core::Id id) const
|
||||
ProjectExplorer::IDevice::Ptr QnxDeviceFactory::create(Core::Id id) const
|
||||
{
|
||||
Q_UNUSED(id);
|
||||
QnxDeviceConfigurationWizard wizard;
|
||||
QnxDeviceWizard wizard;
|
||||
if (wizard.exec() != QDialog::Accepted)
|
||||
return ProjectExplorer::IDevice::Ptr();
|
||||
return wizard.device();
|
||||
}
|
||||
|
||||
bool QnxDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
|
||||
bool QnxDeviceFactory::canRestore(const QVariantMap &map) const
|
||||
{
|
||||
return ProjectExplorer::IDevice::typeFromMap(map) == Constants::QNX_QNX_OS_TYPE;
|
||||
}
|
||||
|
||||
ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationFactory::restore(const QVariantMap &map) const
|
||||
ProjectExplorer::IDevice::Ptr QnxDeviceFactory::restore(const QVariantMap &map) const
|
||||
{
|
||||
QTC_ASSERT(canRestore(map), return QnxDeviceConfiguration::Ptr());
|
||||
const QnxDeviceConfiguration::Ptr device = QnxDeviceConfiguration::create();
|
||||
QTC_ASSERT(canRestore(map), return QnxDevice::Ptr());
|
||||
const QnxDevice::Ptr device = QnxDevice::create();
|
||||
device->fromMap(map);
|
||||
return device;
|
||||
}
|
||||
|
||||
Core::Id QnxDeviceConfigurationFactory::deviceType()
|
||||
Core::Id QnxDeviceFactory::deviceType()
|
||||
{
|
||||
return Core::Id(Constants::QNX_QNX_OS_TYPE);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
@@ -30,11 +30,12 @@
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
class QnxDeviceConfigurationFactory : public ProjectExplorer::IDeviceFactory
|
||||
class QnxDeviceFactory : public ProjectExplorer::IDeviceFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QnxDeviceConfigurationFactory(QObject *parent = 0);
|
||||
explicit QnxDeviceFactory(QObject *parent = 0);
|
||||
|
||||
QString displayNameForId(Core::Id type) const;
|
||||
QList<Core::Id> availableCreationIds() const;
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <remotelinux/remotelinuxsignaloperation.h>
|
||||
|
||||
namespace Qnx {
|
||||
class QnxDeviceConfiguration;
|
||||
class QnxDevice;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
@@ -42,7 +42,7 @@ private:
|
||||
QString killProcessByNameCommandLine(const QString &filePath) const;
|
||||
QString interruptProcessByNameCommandLine(const QString &filePath) const;
|
||||
|
||||
friend class Qnx::QnxDeviceConfiguration;
|
||||
friend class Qnx::QnxDevice;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qnxdevicetester.h"
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevice.h"
|
||||
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -106,7 +106,7 @@ void QnxDeviceTester::handleGenericTestFinished(TestResult result)
|
||||
|
||||
m_state = CommandsTest;
|
||||
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = m_deviceConfiguration.dynamicCast<const QnxDeviceConfiguration>();
|
||||
QnxDevice::ConstPtr qnxDevice = m_deviceConfiguration.dynamicCast<const QnxDevice>();
|
||||
m_commandsToTest.append(versionSpecificCommandsToTest(qnxDevice->qnxVersion()));
|
||||
|
||||
testNextCommand();
|
||||
|
||||
@@ -23,26 +23,36 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qnxdeviceconfigurationwizard.h"
|
||||
#include "qnxdevicewizard.h"
|
||||
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxdeviceconfigurationwizardpages.h"
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevice.h"
|
||||
|
||||
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||
#include <remotelinux/genericlinuxdeviceconfigurationwizardpages.h>
|
||||
#include <utils/portlist.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
|
||||
QnxDeviceConfigurationWizard::QnxDeviceConfigurationWizard(QWidget *parent) :
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
class QnxDeviceWizardSetupPage : public RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage
|
||||
{
|
||||
public:
|
||||
QnxDeviceWizardSetupPage(QWidget *parent) :
|
||||
RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage(parent)
|
||||
{}
|
||||
|
||||
QString defaultConfigurationName() const { return QnxDeviceWizard::tr("QNX Device"); }
|
||||
};
|
||||
|
||||
QnxDeviceWizard::QnxDeviceWizard(QWidget *parent) :
|
||||
Utils::Wizard(parent)
|
||||
{
|
||||
setWindowTitle(tr("New QNX Device Configuration Setup"));
|
||||
|
||||
m_setupPage = new QnxDeviceConfigurationWizardSetupPage(this);
|
||||
m_setupPage = new QnxDeviceWizardSetupPage(this);
|
||||
m_finalPage = new RemoteLinux::GenericLinuxDeviceConfigurationWizardFinalPage(this);
|
||||
|
||||
setPage(SetupPageId, m_setupPage);
|
||||
@@ -50,7 +60,7 @@ QnxDeviceConfigurationWizard::QnxDeviceConfigurationWizard(QWidget *parent) :
|
||||
m_finalPage->setCommitPage(true);
|
||||
}
|
||||
|
||||
IDevice::Ptr QnxDeviceConfigurationWizard::device()
|
||||
IDevice::Ptr QnxDeviceWizard::device()
|
||||
{
|
||||
QSsh::SshConnectionParameters sshParams;
|
||||
sshParams.options = QSsh::SshIgnoreDefaultProxy;
|
||||
@@ -65,10 +75,13 @@ IDevice::Ptr QnxDeviceConfigurationWizard::device()
|
||||
else
|
||||
sshParams.privateKeyFile = m_setupPage->privateKeyFilePath();
|
||||
|
||||
QnxDeviceConfiguration::Ptr device = QnxDeviceConfiguration::create(m_setupPage->configurationName(),
|
||||
QnxDevice::Ptr device = QnxDevice::create(m_setupPage->configurationName(),
|
||||
Core::Id(Constants::QNX_QNX_OS_TYPE), IDevice::Hardware);
|
||||
device->setSshParameters(sshParams);
|
||||
device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
@@ -36,11 +36,12 @@ class GenericLinuxDeviceConfigurationWizardFinalPage;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
class QnxDeviceConfigurationWizard : public Utils::Wizard
|
||||
class QnxDeviceWizard : public Utils::Wizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QnxDeviceConfigurationWizard(QWidget *parent = 0);
|
||||
explicit QnxDeviceWizard(QWidget *parent = 0);
|
||||
|
||||
ProjectExplorer::IDevice::Ptr device();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxattachdebugsupport.h"
|
||||
#include "qnxdeviceconfigurationfactory.h"
|
||||
#include "qnxdevicefactory.h"
|
||||
#include "qnxruncontrolfactory.h"
|
||||
#include "qnxdeploystepfactory.h"
|
||||
#include "qnxdeployconfigurationfactory.h"
|
||||
@@ -66,7 +66,7 @@ bool QnxPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
// Handles QNX
|
||||
addAutoReleasedObject(new QnxConfigurationManager);
|
||||
addAutoReleasedObject(new QnxQtVersionFactory);
|
||||
addAutoReleasedObject(new QnxDeviceConfigurationFactory);
|
||||
addAutoReleasedObject(new QnxDeviceFactory);
|
||||
addAutoReleasedObject(new QnxRunControlFactory);
|
||||
addAutoReleasedObject(new QnxDeployStepFactory);
|
||||
addAutoReleasedObject(new QnxDeployConfigurationFactory);
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxrunconfiguration.h"
|
||||
#include "qnxdeviceconfigurationfactory.h"
|
||||
#include "qnxdevicefactory.h"
|
||||
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qmakeprojectmanager/qmakeproject.h>
|
||||
#include <qmakeprojectmanager/qmakenodes.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
static Utils::FileName pathFromId(Core::Id id)
|
||||
{
|
||||
@@ -134,8 +134,11 @@ ProjectExplorer::RunConfiguration *QnxRunConfigurationFactory::clone(ProjectExpl
|
||||
bool QnxRunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
|
||||
{
|
||||
Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
|
||||
if (deviceType != QnxDeviceConfigurationFactory::deviceType())
|
||||
if (deviceType != QnxDeviceFactory::deviceType())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qnxruncontrol.h"
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
#include "qnxdevice.h"
|
||||
#include "qnxrunconfiguration.h"
|
||||
#include "slog2inforunner.h"
|
||||
|
||||
@@ -44,7 +44,7 @@ QnxRunControl::QnxRunControl(RunConfiguration *runConfig)
|
||||
, m_slog2Info(0)
|
||||
{
|
||||
IDevice::ConstPtr dev = DeviceKitInformation::device(runConfig->target()->kit());
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
QnxDevice::ConstPtr qnxDevice = dev.dynamicCast<const QnxDevice>();
|
||||
|
||||
QnxRunConfiguration *qnxRunConfig = qobject_cast<QnxRunConfiguration *>(runConfig);
|
||||
QTC_CHECK(qnxRunConfig);
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxrunconfiguration.h"
|
||||
#include "qnxdebugsupport.h"
|
||||
#include "qnxdevice.h"
|
||||
#include "qnxanalyzesupport.h"
|
||||
#include "qnxqtversion.h"
|
||||
#include "qnxruncontrol.h"
|
||||
#include "qnxutils.h"
|
||||
#include "qnxdeviceconfiguration.h"
|
||||
|
||||
#include <debugger/debuggerruncontrol.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
@@ -50,8 +50,9 @@
|
||||
|
||||
using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
static DebuggerStartParameters createDebuggerStartParameters(QnxRunConfiguration *runConfig)
|
||||
{
|
||||
@@ -103,8 +104,8 @@ bool QnxRunControlFactory::canRun(RunConfiguration *runConfiguration, Core::Id m
|
||||
return false;
|
||||
}
|
||||
|
||||
const QnxDeviceConfiguration::ConstPtr dev = DeviceKitInformation::device(runConfiguration->target()->kit())
|
||||
.dynamicCast<const QnxDeviceConfiguration>();
|
||||
const QnxDevice::ConstPtr dev = DeviceKitInformation::device(runConfiguration->target()->kit())
|
||||
.dynamicCast<const QnxDevice>();
|
||||
if (dev.isNull())
|
||||
return false;
|
||||
|
||||
@@ -157,3 +158,6 @@ RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, Core::Id m
|
||||
QTC_CHECK(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
Reference in New Issue
Block a user