forked from qt-creator/qt-creator
Docker: Dont create the device twice
wizard.device() should be called wizard.createDevice() Change-Id: I0cfd6a392cb66a07d0b2e1340b06e73be715104f Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1332,9 +1332,9 @@ DockerDeviceFactory::DockerDeviceFactory()
|
||||
DockerDeviceSetupWizard wizard;
|
||||
if (wizard.exec() != QDialog::Accepted)
|
||||
return IDevice::Ptr();
|
||||
m_existingDevices.writeLocked()->push_back(
|
||||
std::static_pointer_cast<DockerDevice>(wizard.device()));
|
||||
return wizard.device();
|
||||
auto device = std::static_pointer_cast<DockerDevice>(wizard.device());
|
||||
m_existingDevices.writeLocked()->push_back(device);
|
||||
return std::static_pointer_cast<IDevice>(device);
|
||||
});
|
||||
setConstructionFunction([this] {
|
||||
auto device = DockerDevice::create();
|
||||
|
Reference in New Issue
Block a user