forked from qt-creator/qt-creator
RemoteLinux: Streamline device construction
Remove create() and init() functions and ctors except default constructor. Change-Id: Ib59606361e9000cf51df6eb69252cc00d9bd1684 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -166,15 +166,6 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
LinuxDevice::Ptr LinuxDevice::create(const QString &name, Origin origin, Core::Id id)
|
||||
{
|
||||
auto device = new LinuxDevice;
|
||||
device->setupId(origin, id);
|
||||
device->setDisplayName(name);
|
||||
return Ptr(device);
|
||||
}
|
||||
|
||||
QString LinuxDevice::displayType() const
|
||||
{
|
||||
return tr("Generic Linux");
|
||||
@@ -190,10 +181,7 @@ Utils::OsType LinuxDevice::osType() const
|
||||
return Utils::OsTypeLinux;
|
||||
}
|
||||
|
||||
|
||||
LinuxDevice::LinuxDevice(const LinuxDevice &other) = default;
|
||||
|
||||
void LinuxDevice::init()
|
||||
LinuxDevice::LinuxDevice()
|
||||
{
|
||||
addDeviceAction({tr("Deploy Public Key..."), [](const IDevice::Ptr &device, QWidget *parent) {
|
||||
if (auto d = PublicKeyDeploymentDialog::createDialog(device, parent)) {
|
||||
@@ -226,11 +214,6 @@ void LinuxDevice::init()
|
||||
}
|
||||
}
|
||||
|
||||
LinuxDevice::Ptr LinuxDevice::create()
|
||||
{
|
||||
return Ptr(new LinuxDevice);
|
||||
}
|
||||
|
||||
IDevice::Ptr LinuxDevice::clone() const
|
||||
{
|
||||
return Ptr(new LinuxDevice(*this));
|
||||
|
||||
Reference in New Issue
Block a user