forked from qt-creator/qt-creator
ProjectExplorer: Base IDevice::osType on a data member
Change-Id: I969563e6e62895a51fb4692c8eb0bab278f0ecae Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -53,6 +53,8 @@ AndroidDevice::AndroidDevice()
|
|||||||
"Run on Android"));
|
"Run on Android"));
|
||||||
setDisplayType(QCoreApplication::translate("Android::Internal::AndroidDevice", "Android"));
|
setDisplayType(QCoreApplication::translate("Android::Internal::AndroidDevice", "Android"));
|
||||||
setMachineType(IDevice::Hardware);
|
setMachineType(IDevice::Hardware);
|
||||||
|
setOsType(Utils::OsTypeOtherUnix);
|
||||||
|
|
||||||
setDeviceState(DeviceReadyToUse);
|
setDeviceState(DeviceReadyToUse);
|
||||||
QString activityPath;
|
QString activityPath;
|
||||||
const AndroidConfig &config = AndroidConfigurations::currentConfig();
|
const AndroidConfig &config = AndroidConfigurations::currentConfig();
|
||||||
@@ -82,11 +84,6 @@ DeviceProcessSignalOperation::Ptr AndroidDevice::signalOperation() const
|
|||||||
return DeviceProcessSignalOperation::Ptr(new AndroidSignalOperation());
|
return DeviceProcessSignalOperation::Ptr(new AndroidSignalOperation());
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType AndroidDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeOtherUnix;
|
|
||||||
}
|
|
||||||
|
|
||||||
QUrl AndroidDevice::toolControlChannel(const ControlChannelHint &) const
|
QUrl AndroidDevice::toolControlChannel(const ControlChannelHint &) const
|
||||||
{
|
{
|
||||||
QUrl url;
|
QUrl url;
|
||||||
|
@@ -34,7 +34,7 @@ namespace Internal {
|
|||||||
class AndroidDevice : public ProjectExplorer::IDevice
|
class AndroidDevice : public ProjectExplorer::IDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static IDevice::Ptr create() { return IDevice::Ptr(new AndroidDevice); };
|
static IDevice::Ptr create() { return IDevice::Ptr(new AndroidDevice); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AndroidDevice();
|
AndroidDevice();
|
||||||
@@ -44,7 +44,6 @@ private:
|
|||||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||||
bool canAutoDetectPorts() const override;
|
bool canAutoDetectPorts() const override;
|
||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
QUrl toolControlChannel(const ControlChannelHint &) const override;
|
QUrl toolControlChannel(const ControlChannelHint &) const override;
|
||||||
};
|
};
|
||||||
|
@@ -54,6 +54,7 @@ BareMetalDevice::BareMetalDevice()
|
|||||||
{
|
{
|
||||||
setDisplayType(QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", "Bare Metal"));
|
setDisplayType(QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", "Bare Metal"));
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
|
setOsType(Utils::OsTypeOther);
|
||||||
}
|
}
|
||||||
|
|
||||||
BareMetalDevice::~BareMetalDevice()
|
BareMetalDevice::~BareMetalDevice()
|
||||||
@@ -150,11 +151,6 @@ IDeviceWidget *BareMetalDevice::createWidget()
|
|||||||
return new BareMetalDeviceConfigurationWidget(sharedFromThis());
|
return new BareMetalDeviceConfigurationWidget(sharedFromThis());
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType BareMetalDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeOther;
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceProcess *BareMetalDevice::createProcess(QObject *parent) const
|
DeviceProcess *BareMetalDevice::createProcess(QObject *parent) const
|
||||||
{
|
{
|
||||||
return new GdbServerProviderProcess(sharedFromThis(), parent);
|
return new GdbServerProviderProcess(sharedFromThis(), parent);
|
||||||
|
@@ -48,7 +48,6 @@ public:
|
|||||||
static QString defaultDisplayName();
|
static QString defaultDisplayName();
|
||||||
|
|
||||||
ProjectExplorer::IDeviceWidget *createWidget() final;
|
ProjectExplorer::IDeviceWidget *createWidget() final;
|
||||||
Utils::OsType osType() const final;
|
|
||||||
|
|
||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const final;
|
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const final;
|
||||||
|
|
||||||
|
@@ -86,6 +86,7 @@ IosDevice::IosDevice()
|
|||||||
setDefaultDisplayName(IosDevice::name());
|
setDefaultDisplayName(IosDevice::name());
|
||||||
setDisplayType(QCoreApplication::translate("Ios::Internal::IosDevice", "iOS"));
|
setDisplayType(QCoreApplication::translate("Ios::Internal::IosDevice", "iOS"));
|
||||||
setMachineType(IDevice::Hardware);
|
setMachineType(IDevice::Hardware);
|
||||||
|
setOsType(Utils::OsTypeMac);
|
||||||
setDeviceState(DeviceDisconnected);
|
setDeviceState(DeviceDisconnected);
|
||||||
Utils::PortList ports;
|
Utils::PortList ports;
|
||||||
ports.addRange(Utils::Port(Constants::IOS_DEVICE_PORT_START),
|
ports.addRange(Utils::Port(Constants::IOS_DEVICE_PORT_START),
|
||||||
@@ -101,6 +102,7 @@ IosDevice::IosDevice(const QString &uid)
|
|||||||
setDefaultDisplayName(IosDevice::name());
|
setDefaultDisplayName(IosDevice::name());
|
||||||
setDisplayType(QCoreApplication::translate("Ios::Internal::IosDevice", "iOS"));
|
setDisplayType(QCoreApplication::translate("Ios::Internal::IosDevice", "iOS"));
|
||||||
setMachineType(IDevice::Hardware);
|
setMachineType(IDevice::Hardware);
|
||||||
|
setOsType(Utils::OsTypeMac);
|
||||||
setDeviceState(DeviceDisconnected);
|
setDeviceState(DeviceDisconnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,11 +176,6 @@ bool IosDevice::canAutoDetectPorts() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType IosDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeMac;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// IosDeviceManager
|
// IosDeviceManager
|
||||||
|
|
||||||
|
@@ -59,7 +59,6 @@ public:
|
|||||||
QString osVersion() const;
|
QString osVersion() const;
|
||||||
Utils::Port nextPort() const;
|
Utils::Port nextPort() const;
|
||||||
bool canAutoDetectPorts() const override;
|
bool canAutoDetectPorts() const override;
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
static QString name();
|
static QString name();
|
||||||
|
|
||||||
|
@@ -50,6 +50,7 @@ IosSimulator::IosSimulator(Core::Id id)
|
|||||||
setupId(IDevice::AutoDetected, id);
|
setupId(IDevice::AutoDetected, id);
|
||||||
setType(Constants::IOS_SIMULATOR_TYPE);
|
setType(Constants::IOS_SIMULATOR_TYPE);
|
||||||
setMachineType(IDevice::Emulator);
|
setMachineType(IDevice::Emulator);
|
||||||
|
setOsType(Utils::OsTypeMac);
|
||||||
setDefaultDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator",
|
setDefaultDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator",
|
||||||
"iOS Simulator"));
|
"iOS Simulator"));
|
||||||
setDisplayType(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
setDisplayType(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
|
||||||
@@ -102,11 +103,6 @@ bool IosSimulator::canAutoDetectPorts() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType IosSimulator::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeMac;
|
|
||||||
}
|
|
||||||
|
|
||||||
// IosDeviceType
|
// IosDeviceType
|
||||||
|
|
||||||
IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier, const QString &displayName) :
|
IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier, const QString &displayName) :
|
||||||
|
@@ -73,7 +73,6 @@ public:
|
|||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||||
Utils::Port nextPort() const;
|
Utils::Port nextPort() const;
|
||||||
bool canAutoDetectPorts() const override;
|
bool canAutoDetectPorts() const override;
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class IosSimulatorFactory;
|
friend class IosSimulatorFactory;
|
||||||
|
@@ -60,6 +60,8 @@ DesktopDevice::DesktopDevice()
|
|||||||
|
|
||||||
setDeviceState(IDevice::DeviceStateUnknown);
|
setDeviceState(IDevice::DeviceStateUnknown);
|
||||||
setMachineType(IDevice::Hardware);
|
setMachineType(IDevice::Hardware);
|
||||||
|
setOsType(HostOsInfo::hostOs());
|
||||||
|
|
||||||
const QString portRange =
|
const QString portRange =
|
||||||
QString::fromLatin1("%1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END);
|
QString::fromLatin1("%1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END);
|
||||||
setFreePorts(Utils::PortList::fromString(portRange));
|
setFreePorts(Utils::PortList::fromString(portRange));
|
||||||
@@ -173,9 +175,4 @@ QUrl DesktopDevice::toolControlChannel(const ControlChannelHint &) const
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType DesktopDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::HostOsInfo::hostOs();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -50,7 +50,6 @@ public:
|
|||||||
DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||||
DeviceEnvironmentFetcher::Ptr environmentFetcher() const override;
|
DeviceEnvironmentFetcher::Ptr environmentFetcher() const override;
|
||||||
QUrl toolControlChannel(const ControlChannelHint &) const override;
|
QUrl toolControlChannel(const ControlChannelHint &) const override;
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DesktopDevice();
|
DesktopDevice();
|
||||||
|
@@ -47,6 +47,8 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
using namespace Utils;
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -410,6 +412,7 @@ public:
|
|||||||
setupId(AutoDetected, Core::Id::fromString(QUuid::createUuid().toString()));
|
setupId(AutoDetected, Core::Id::fromString(QUuid::createUuid().toString()));
|
||||||
setType(testTypeId());
|
setType(testTypeId());
|
||||||
setMachineType(Hardware);
|
setMachineType(Hardware);
|
||||||
|
setOsType(HostOsInfo::hostOs());
|
||||||
setDisplayType("blubb");
|
setDisplayType("blubb");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,7 +423,6 @@ private:
|
|||||||
{
|
{
|
||||||
return DeviceProcessSignalOperation::Ptr();
|
return DeviceProcessSignalOperation::Ptr();
|
||||||
}
|
}
|
||||||
Utils::OsType osType() const override { return Utils::HostOsInfo::hostOs(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TestDeviceFactory : public IDeviceFactory
|
class TestDeviceFactory : public IDeviceFactory
|
||||||
|
@@ -146,6 +146,7 @@ public:
|
|||||||
Core::Id id;
|
Core::Id id;
|
||||||
IDevice::DeviceState deviceState = IDevice::DeviceStateUnknown;
|
IDevice::DeviceState deviceState = IDevice::DeviceStateUnknown;
|
||||||
IDevice::MachineType machineType = IDevice::Hardware;
|
IDevice::MachineType machineType = IDevice::Hardware;
|
||||||
|
Utils::OsType osType = Utils::OsTypeOther;
|
||||||
int version = 0; // This is used by devices that have been added by the SDK.
|
int version = 0; // This is used by devices that have been added by the SDK.
|
||||||
|
|
||||||
QSsh::SshConnectionParameters sshParameters;
|
QSsh::SshConnectionParameters sshParameters;
|
||||||
@@ -221,6 +222,11 @@ void IDevice::setDisplayType(const QString &type)
|
|||||||
d->displayType = type;
|
d->displayType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IDevice::setOsType(Utils::OsType osType)
|
||||||
|
{
|
||||||
|
d->osType = osType;
|
||||||
|
}
|
||||||
|
|
||||||
IDevice::DeviceInfo IDevice::deviceInformation() const
|
IDevice::DeviceInfo IDevice::deviceInformation() const
|
||||||
{
|
{
|
||||||
const QString key = QCoreApplication::translate("ProjectExplorer::IDevice", "Device");
|
const QString key = QCoreApplication::translate("ProjectExplorer::IDevice", "Device");
|
||||||
@@ -310,7 +316,7 @@ DeviceTester *IDevice::createDeviceTester() const
|
|||||||
|
|
||||||
Utils::OsType IDevice::osType() const
|
Utils::OsType IDevice::osType() const
|
||||||
{
|
{
|
||||||
return Utils::OsTypeOther;
|
return d->osType;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceProcess *IDevice::createProcess(QObject * /* parent */) const
|
DeviceProcess *IDevice::createProcess(QObject * /* parent */) const
|
||||||
@@ -434,6 +440,10 @@ IDevice::Ptr IDevice::clone() const
|
|||||||
device->d->deviceState = d->deviceState;
|
device->d->deviceState = d->deviceState;
|
||||||
device->d->deviceActions = d->deviceActions;
|
device->d->deviceActions = d->deviceActions;
|
||||||
device->d->deviceIcons = d->deviceIcons;
|
device->d->deviceIcons = d->deviceIcons;
|
||||||
|
// Os type is only set in the constructor, always to the same value.
|
||||||
|
// But make sure we notice if that changes in the future (which it shouldn't).
|
||||||
|
QTC_CHECK(device->d->osType == d->osType);
|
||||||
|
device->d->osType = d->osType;
|
||||||
device->fromMap(toMap());
|
device->fromMap(toMap());
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
@@ -157,6 +157,7 @@ public:
|
|||||||
virtual bool isCompatibleWith(const Kit *k) const;
|
virtual bool isCompatibleWith(const Kit *k) const;
|
||||||
|
|
||||||
QString displayType() const;
|
QString displayType() const;
|
||||||
|
Utils::OsType osType() const;
|
||||||
|
|
||||||
virtual IDeviceWidget *createWidget() = 0;
|
virtual IDeviceWidget *createWidget() = 0;
|
||||||
|
|
||||||
@@ -175,7 +176,6 @@ public:
|
|||||||
virtual DeviceProcessList *createProcessListModel(QObject *parent = nullptr) const;
|
virtual DeviceProcessList *createProcessListModel(QObject *parent = nullptr) const;
|
||||||
virtual bool hasDeviceTester() const { return false; }
|
virtual bool hasDeviceTester() const { return false; }
|
||||||
virtual DeviceTester *createDeviceTester() const;
|
virtual DeviceTester *createDeviceTester() const;
|
||||||
virtual Utils::OsType osType() const;
|
|
||||||
|
|
||||||
virtual bool canCreateProcess() const { return false; }
|
virtual bool canCreateProcess() const { return false; }
|
||||||
virtual DeviceProcess *createProcess(QObject *parent) const;
|
virtual DeviceProcess *createProcess(QObject *parent) const;
|
||||||
@@ -233,6 +233,7 @@ protected:
|
|||||||
using OpenTerminal = std::function<void(const Utils::Environment &, const QString &)>;
|
using OpenTerminal = std::function<void(const Utils::Environment &, const QString &)>;
|
||||||
void setOpenTerminal(const OpenTerminal &openTerminal);
|
void setOpenTerminal(const OpenTerminal &openTerminal);
|
||||||
void setDisplayType(const QString &type);
|
void setDisplayType(const QString &type);
|
||||||
|
void setOsType(Utils::OsType osType);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDevice(const IDevice &) = delete;
|
IDevice(const IDevice &) = delete;
|
||||||
|
@@ -84,17 +84,14 @@ QnxDevice::QnxDevice()
|
|||||||
{
|
{
|
||||||
setDisplayType(tr("QNX"));
|
setDisplayType(tr("QNX"));
|
||||||
setDefaultDisplayName(tr("QNX Device"));
|
setDefaultDisplayName(tr("QNX Device"));
|
||||||
|
setOsType(OsTypeOtherUnix);
|
||||||
|
|
||||||
addDeviceAction({tr("Deploy Qt libraries..."), [](const IDevice::Ptr &device, QWidget *parent) {
|
addDeviceAction({tr("Deploy Qt libraries..."), [](const IDevice::Ptr &device, QWidget *parent) {
|
||||||
QnxDeployQtLibrariesDialog dialog(device, parent);
|
QnxDeployQtLibrariesDialog dialog(device, parent);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
OsType QnxDevice::osType() const
|
|
||||||
{
|
|
||||||
return OsTypeOtherUnix;
|
|
||||||
}
|
|
||||||
|
|
||||||
int QnxDevice::qnxVersion() const
|
int QnxDevice::qnxVersion() const
|
||||||
{
|
{
|
||||||
if (m_versionNumber == 0)
|
if (m_versionNumber == 0)
|
||||||
|
@@ -49,8 +49,6 @@ public:
|
|||||||
ProjectExplorer::DeviceTester *createDeviceTester() const override;
|
ProjectExplorer::DeviceTester *createDeviceTester() const override;
|
||||||
ProjectExplorer::DeviceProcess *createProcess(QObject *parent) const override;
|
ProjectExplorer::DeviceProcess *createProcess(QObject *parent) const override;
|
||||||
|
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
int qnxVersion() const;
|
int qnxVersion() const;
|
||||||
|
|
||||||
void fromMap(const QVariantMap &map) override;
|
void fromMap(const QVariantMap &map) override;
|
||||||
|
@@ -178,15 +178,12 @@ IDeviceWidget *LinuxDevice::createWidget()
|
|||||||
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType LinuxDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeLinux;
|
|
||||||
}
|
|
||||||
|
|
||||||
LinuxDevice::LinuxDevice()
|
LinuxDevice::LinuxDevice()
|
||||||
{
|
{
|
||||||
setDisplayType(tr("Generic Linux"));
|
setDisplayType(tr("Generic Linux"));
|
||||||
setDefaultDisplayName(tr("Generic Linux Device"));
|
setDefaultDisplayName(tr("Generic Linux Device"));
|
||||||
|
setOsType(OsTypeLinux);
|
||||||
|
|
||||||
addDeviceAction({tr("Deploy Public Key..."), [](const IDevice::Ptr &device, QWidget *parent) {
|
addDeviceAction({tr("Deploy Public Key..."), [](const IDevice::Ptr &device, QWidget *parent) {
|
||||||
if (auto d = PublicKeyDeploymentDialog::createDialog(device, parent)) {
|
if (auto d = PublicKeyDeploymentDialog::createDialog(device, parent)) {
|
||||||
d->exec();
|
d->exec();
|
||||||
|
@@ -45,7 +45,6 @@ public:
|
|||||||
static Ptr create() { return Ptr(new LinuxDevice); }
|
static Ptr create() { return Ptr(new LinuxDevice); }
|
||||||
|
|
||||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
bool canCreateProcess() const override { return true; }
|
bool canCreateProcess() const override { return true; }
|
||||||
ProjectExplorer::DeviceProcess *createProcess(QObject *parent) const override;
|
ProjectExplorer::DeviceProcess *createProcess(QObject *parent) const override;
|
||||||
|
@@ -44,6 +44,7 @@ WebAssemblyDevice::WebAssemblyDevice()
|
|||||||
setDisplayType(displayNameAndType);
|
setDisplayType(displayNameAndType);
|
||||||
setDeviceState(IDevice::DeviceStateUnknown);
|
setDeviceState(IDevice::DeviceStateUnknown);
|
||||||
setMachineType(IDevice::Hardware);
|
setMachineType(IDevice::Hardware);
|
||||||
|
setOsType(OsTypeOther);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDevice::Ptr WebAssemblyDevice::create()
|
ProjectExplorer::IDevice::Ptr WebAssemblyDevice::create()
|
||||||
@@ -52,12 +53,6 @@ ProjectExplorer::IDevice::Ptr WebAssemblyDevice::create()
|
|||||||
return ProjectExplorer::IDevice::Ptr(device);
|
return ProjectExplorer::IDevice::Ptr(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType WebAssemblyDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeOther;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
WebAssemblyDeviceFactory::WebAssemblyDeviceFactory()
|
WebAssemblyDeviceFactory::WebAssemblyDeviceFactory()
|
||||||
: ProjectExplorer::IDeviceFactory(Constants::WEBASSEMBLY_DEVICE_TYPE)
|
: ProjectExplorer::IDeviceFactory(Constants::WEBASSEMBLY_DEVICE_TYPE)
|
||||||
{
|
{
|
||||||
|
@@ -39,8 +39,6 @@ class WebAssemblyDevice : public ProjectExplorer::DesktopDevice
|
|||||||
public:
|
public:
|
||||||
static ProjectExplorer::IDevice::Ptr create();
|
static ProjectExplorer::IDevice::Ptr create();
|
||||||
|
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WebAssemblyDevice();
|
WebAssemblyDevice();
|
||||||
};
|
};
|
||||||
|
@@ -61,6 +61,8 @@ Q_LOGGING_CATEGORY(winrtDeviceLog, "qtc.winrt.deviceParser", QtWarningMsg)
|
|||||||
WinRtDevice::WinRtDevice()
|
WinRtDevice::WinRtDevice()
|
||||||
{
|
{
|
||||||
setDisplayType(displayNameForType(type()));
|
setDisplayType(displayNameForType(type()));
|
||||||
|
setOsType(OsTypeWindows);
|
||||||
|
|
||||||
Utils::PortList portList;
|
Utils::PortList portList;
|
||||||
portList.addRange(Utils::Port(ProjectExplorer::Constants::DESKTOP_PORT_START),
|
portList.addRange(Utils::Port(ProjectExplorer::Constants::DESKTOP_PORT_START),
|
||||||
Utils::Port(ProjectExplorer::Constants::DESKTOP_PORT_END));
|
Utils::Port(ProjectExplorer::Constants::DESKTOP_PORT_END));
|
||||||
@@ -97,11 +99,6 @@ QVariantMap WinRtDevice::toMap() const
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::OsType WinRtDevice::osType() const
|
|
||||||
{
|
|
||||||
return Utils::OsTypeWindows;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString WinRtDevice::displayNameForType(Core::Id type)
|
QString WinRtDevice::displayNameForType(Core::Id type)
|
||||||
{
|
{
|
||||||
if (type == Constants::WINRT_DEVICE_TYPE_LOCAL)
|
if (type == Constants::WINRT_DEVICE_TYPE_LOCAL)
|
||||||
|
@@ -45,7 +45,6 @@ public:
|
|||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||||
void fromMap(const QVariantMap &map) override;
|
void fromMap(const QVariantMap &map) override;
|
||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
Utils::OsType osType() const override;
|
|
||||||
|
|
||||||
static QString displayNameForType(Core::Id type);
|
static QString displayNameForType(Core::Id type);
|
||||||
int deviceId() const { return m_deviceId; }
|
int deviceId() const { return m_deviceId; }
|
||||||
|
Reference in New Issue
Block a user