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;
|
DockerDeviceSetupWizard wizard;
|
||||||
if (wizard.exec() != QDialog::Accepted)
|
if (wizard.exec() != QDialog::Accepted)
|
||||||
return IDevice::Ptr();
|
return IDevice::Ptr();
|
||||||
m_existingDevices.writeLocked()->push_back(
|
auto device = std::static_pointer_cast<DockerDevice>(wizard.device());
|
||||||
std::static_pointer_cast<DockerDevice>(wizard.device()));
|
m_existingDevices.writeLocked()->push_back(device);
|
||||||
return wizard.device();
|
return std::static_pointer_cast<IDevice>(device);
|
||||||
});
|
});
|
||||||
setConstructionFunction([this] {
|
setConstructionFunction([this] {
|
||||||
auto device = DockerDevice::create();
|
auto device = DockerDevice::create();
|
||||||
|
Reference in New Issue
Block a user