diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-05-05 17:42:38 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-05-05 16:10:15 +0000 |
commit | 74066f25b404ea32fd7d050e015134a7c1a57ce3 (patch) | |
tree | 710bd921b994b714132f617ab7f4bed4065fa1be /src | |
parent | c7b11e59906cc2853d07884182e985ac4804c9a6 (diff) |
Device support: Only restore SSH options if we really saved them.
As the default-constructed value is not zero. This was not considered in
7aa8ae54ae.
Change-Id: I1f32b1c317e0de34b48dbe003c3968f66133a64d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/projectexplorer/devicesupport/idevice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 9503c2db23..38935000bb 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -329,8 +329,9 @@ void IDevice::fromMap(const QVariantMap &map) d->sshParameters.timeout = map.value(QLatin1String(TimeoutKey), DefaultTimeout).toInt(); d->sshParameters.hostKeyCheckingMode = static_cast<QSsh::SshHostKeyCheckingMode> (map.value(QLatin1String(HostKeyCheckingKey), QSsh::SshHostKeyCheckingNone).toInt()); - d->sshParameters.options - = QSsh::SshConnectionOptions(map.value(QLatin1String(SshOptionsKey)).toInt()); + const QVariant optionsVariant = map.value(QLatin1String(SshOptionsKey)); + if (optionsVariant.isValid()) // false for QtC < 3.4 + d->sshParameters.options = QSsh::SshConnectionOptions(optionsVariant.toInt()); d->freePorts = Utils::PortList::fromString(map.value(QLatin1String(PortsSpecKey), QLatin1String("10000-10100")).toString()); |