ProjectExplorer: Allow Devices to be added without using the wizard

This re-organizes the buttons on the main device page a bit: The
topmost one still starts the wizard selection, below that are direct
individual buttons to add specific devices.

Change-Id: I52b2803febf658259dde9589544656fd4c8fc889
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2023-03-23 15:32:42 +01:00
parent 17a482bebe
commit 5996e58ffa
10 changed files with 80 additions and 25 deletions

View File

@@ -383,7 +383,9 @@ DockerDevice::DockerDevice(DockerSettings *settings, const DockerDeviceData &dat
setDisplayType(Tr::tr("Docker"));
setOsType(OsTypeOtherUnix);
setDefaultDisplayName(Tr::tr("Docker Image"));
setupId(IDevice::ManuallyAdded);
setType(Constants::DOCKER_DEVICE_TYPE);
setMachineType(IDevice::Hardware);
setDisplayName(Tr::tr("Docker Image \"%1\" (%2)").arg(data.repoAndTag()).arg(data.imageId));
setAllowEmptyCommand(true);
@@ -1095,9 +1097,6 @@ public:
QTC_ASSERT(item, return {});
auto device = DockerDevice::create(m_settings, *item);
device->setupId(IDevice::ManuallyAdded);
device->setType(Constants::DOCKER_DEVICE_TYPE);
device->setMachineType(IDevice::Hardware);
return device;
}