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

@@ -9,9 +9,12 @@
#include "qnxdevicewizard.h"
#include "qnxtr.h"
#include <projectexplorer/devicesupport/sshparameters.h>
#include <remotelinux/remotelinuxsignaloperation.h>
#include <utils/port.h>
#include <utils/portlist.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
@@ -56,6 +59,13 @@ QnxDevice::QnxDevice()
setDisplayType(Tr::tr("QNX"));
setDefaultDisplayName(Tr::tr("QNX Device"));
setOsType(OsTypeOtherUnix);
setupId(IDevice::ManuallyAdded);
setType(Constants::QNX_QNX_OS_TYPE);
setMachineType(IDevice::Hardware);
SshParameters sshParams;
sshParams.timeout = 10;
setSshParameters(sshParams);
setFreePorts(PortList::fromString("10000-10100"));
addDeviceAction({Tr::tr("Deploy Qt libraries..."), [](const IDevice::Ptr &device, QWidget *parent) {
QnxDeployQtLibrariesDialog dialog(device, parent);
@@ -94,6 +104,7 @@ QnxDeviceFactory::QnxDeviceFactory() : IDeviceFactory(Constants::QNX_QNX_OS_TYPE
setDisplayName(Tr::tr("QNX Device"));
setCombinedIcon(":/qnx/images/qnxdevicesmall.png",
":/qnx/images/qnxdevice.png");
setQuickCreationAllowed(true);
setConstructionFunction(&QnxDevice::create);
setCreator(&runDeviceWizard);
}