diff options
author | Christian Kandeler <[email protected]> | 2018-12-21 14:01:17 +0100 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2019-01-08 13:58:34 +0000 |
commit | abb4aea1718e31406303033e735f529ab8ac81e6 (patch) | |
tree | 5b6e964d7ef4f15d60b58fb6d120e4d6744a23d3 /src/plugins/qnx/qnxdevicewizard.cpp | |
parent | 9332828d0c16fdb48b024b54358dec54355f4998 (diff) |
RemoteLinux: Improve device wizard
We add a new wizard page for deploying a public key. This way,
the user has to enter the password only once during initial device
setup, just as it used to be before we switched the SSH backend.
Change-Id: Ic30e830a839033e7e7664c2713d3b74b5472e969
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/qnx/qnxdevicewizard.cpp')
-rw-r--r-- | src/plugins/qnx/qnxdevicewizard.cpp | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/src/plugins/qnx/qnxdevicewizard.cpp b/src/plugins/qnx/qnxdevicewizard.cpp index 2ca8968388b..43208dd5480 100644 --- a/src/plugins/qnx/qnxdevicewizard.cpp +++ b/src/plugins/qnx/qnxdevicewizard.cpp @@ -26,7 +26,6 @@ #include "qnxdevicewizard.h" #include "qnxconstants.h" -#include "qnxdevice.h" #include <projectexplorer/devicesupport/deviceusedportsgatherer.h> #include <remotelinux/genericlinuxdeviceconfigurationwizardpages.h> @@ -37,44 +36,33 @@ using namespace ProjectExplorer; namespace Qnx { namespace Internal { -class QnxDeviceWizardSetupPage : public RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage -{ -public: - QnxDeviceWizardSetupPage(QWidget *parent) : - RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage(parent) - {} - - QString defaultConfigurationName() const override { return QnxDeviceWizard::tr("QNX Device"); } -}; - QnxDeviceWizard::QnxDeviceWizard(QWidget *parent) : Utils::Wizard(parent) { setWindowTitle(tr("New QNX Device Configuration Setup")); - m_setupPage = new QnxDeviceWizardSetupPage(this); + m_setupPage = new RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage(this); + m_keyDeploymentPage + = new RemoteLinux::GenericLinuxDeviceConfigurationWizardKeyDeploymentPage(this); m_finalPage = new RemoteLinux::GenericLinuxDeviceConfigurationWizardFinalPage(this); setPage(SetupPageId, m_setupPage); + setPage(KeyDeploymenPageId, m_keyDeploymentPage); setPage(FinalPageId, m_finalPage); m_finalPage->setCommitPage(true); + QSsh::SshConnectionParameters sshParams; + sshParams.timeout = 10; + m_device = QnxDevice::create(tr("QNX Device"), Core::Id(Constants::QNX_QNX_OS_TYPE), + IDevice::Hardware); + m_device->setSshParameters(sshParams); + m_device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100"))); + m_setupPage->setDevice(m_device); + m_keyDeploymentPage->setDevice(m_device); } IDevice::Ptr QnxDeviceWizard::device() { - QSsh::SshConnectionParameters sshParams; - sshParams.url = m_setupPage->url(); - sshParams.timeout = 10; - sshParams.authenticationType = m_setupPage->authenticationType(); - if (sshParams.authenticationType == QSsh::SshConnectionParameters::AuthenticationTypeSpecificKey) - sshParams.privateKeyFile = m_setupPage->privateKeyFilePath(); - - QnxDevice::Ptr device = QnxDevice::create(m_setupPage->configurationName(), - Core::Id(Constants::QNX_QNX_OS_TYPE), IDevice::Hardware); - device->setSshParameters(sshParams); - device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100"))); - - return device; + return m_device; } } // namespace Internal |