forked from qt-creator/qt-creator
ProjectExplorer: Dissolve one of the LinuxDevice constructors
Use the remaining one plus setters. Change-Id: I21b11d6ace1c7e1e7a3e8691e22b43931137e9e9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -83,8 +83,9 @@ QnxDevice::QnxDevice()
|
||||
}
|
||||
|
||||
QnxDevice::QnxDevice(const QString &name, Origin origin, Core::Id id)
|
||||
: RemoteLinux::LinuxDevice(name, origin, id)
|
||||
{
|
||||
setupId(origin, id);
|
||||
setDisplayName(name);
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,10 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod
|
||||
|
||||
LinuxDevice::Ptr LinuxDevice::create(const QString &name, Origin origin, Core::Id id)
|
||||
{
|
||||
return Ptr(new LinuxDevice(name, origin, id));
|
||||
auto device = new LinuxDevice;
|
||||
device->setupId(origin, id);
|
||||
device->setDisplayName(name);
|
||||
return Ptr(device);
|
||||
}
|
||||
|
||||
QString LinuxDevice::displayType() const
|
||||
@@ -186,12 +189,6 @@ Utils::OsType LinuxDevice::osType() const
|
||||
return Utils::OsTypeLinux;
|
||||
}
|
||||
|
||||
LinuxDevice::LinuxDevice(const QString &name, Origin origin, Core::Id id)
|
||||
{
|
||||
setupId(origin, id);
|
||||
setDisplayName(name);
|
||||
init();
|
||||
}
|
||||
|
||||
LinuxDevice::LinuxDevice(const LinuxDevice &other) = default;
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
|
||||
protected:
|
||||
LinuxDevice() { init(); }
|
||||
LinuxDevice(const QString &name, Origin origin, Core::Id id);
|
||||
LinuxDevice(const LinuxDevice &other);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user