From d24ebfed3db6a7053d8c4cde9dd83164d62a18d4 Mon Sep 17 00:00:00 2001
From: Christian Kandeler <christian.kandeler@nokia.com>
Date: Mon, 28 Feb 2011 17:01:53 +0100
Subject: [PATCH] SSH: Fix misnomers.

---
 src/libs/utils/ssh/sshconnection.cpp                 | 12 ++++++------
 src/libs/utils/ssh/sshconnection.h                   |  4 ++--
 src/plugins/debugger/debuggerplugin.cpp              |  2 +-
 .../qt-maemo/maemodeviceconfigurations.cpp           | 12 ++++++------
 .../maemodeviceconfigurationssettingswidget.cpp      |  8 ++++----
 .../qt-maemo/maemodeviceconfigwizard.cpp             |  2 +-
 .../qt-maemo/maemopublisherfremantlefree.cpp         |  2 +-
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/libs/utils/ssh/sshconnection.cpp b/src/libs/utils/ssh/sshconnection.cpp
index e04f84fa3fc..d765a379b9a 100644
--- a/src/libs/utils/ssh/sshconnection.cpp
+++ b/src/libs/utils/ssh/sshconnection.cpp
@@ -76,15 +76,15 @@ namespace {
 
 
 SshConnectionParameters::SshConnectionParameters(ProxyType proxyType) :
-    timeout(0),  authorizationType(AuthorizationByKey), port(0), proxyType(proxyType)
+    timeout(0),  authenticationType(AuthenticationByKey), port(0), proxyType(proxyType)
 {
 }
 
 static inline bool equals(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
 {
     return p1.host == p2.host && p1.userName == p2.userName
-            && p1.authorizationType == p2.authorizationType
-            && (p1.authorizationType == SshConnectionParameters::AuthorizationByPassword ?
+            && p1.authenticationType == p2.authenticationType
+            && (p1.authenticationType == SshConnectionParameters::AuthenticationByPassword ?
                     p1.password == p2.password : p1.privateKeyFile == p2.privateKeyFile)
             && p1.timeout == p2.timeout && p1.port == p2.port;
 }
@@ -394,7 +394,7 @@ void SshConnectionPrivate::handleNewKeysPacket()
 
 void SshConnectionPrivate::handleServiceAcceptPacket()
 {
-    if (m_connParams.authorizationType == SshConnectionParameters::AuthorizationByPassword) {
+    if (m_connParams.authenticationType == SshConnectionParameters::AuthenticationByPassword) {
         m_sendFacility.sendUserAuthByPwdRequestPacket(m_connParams.userName.toUtf8(),
             SshCapabilities::SshConnectionService, m_connParams.password.toUtf8());
     } else {
@@ -418,7 +418,7 @@ void SshConnectionPrivate::handleServiceAcceptPacket()
 
 void SshConnectionPrivate::handlePasswordExpiredPacket()
 {
-    if (m_connParams.authorizationType == SshConnectionParameters::AuthorizationByKey) {
+    if (m_connParams.authenticationType == SshConnectionParameters::AuthenticationByKey) {
         throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR,
             "Got SSH_MSG_USERAUTH_PASSWD_CHANGEREQ, but did not use password.");
     }
@@ -449,7 +449,7 @@ void SshConnectionPrivate::handleUserAuthSuccessPacket()
 void SshConnectionPrivate::handleUserAuthFailurePacket()
 {
     m_timeoutTimer.stop();
-    const QString errorMsg = m_connParams.authorizationType == SshConnectionParameters::AuthorizationByPassword
+    const QString errorMsg = m_connParams.authenticationType == SshConnectionParameters::AuthenticationByPassword
         ? tr("Server rejected password.") : tr("Server rejected key.");
     throw SshClientException(SshAuthenticationError, errorMsg);
 }
diff --git a/src/libs/utils/ssh/sshconnection.h b/src/libs/utils/ssh/sshconnection.h
index b93717cb1e0..616498d07af 100644
--- a/src/libs/utils/ssh/sshconnection.h
+++ b/src/libs/utils/ssh/sshconnection.h
@@ -54,7 +54,7 @@ class SshConnectionPrivate;
 struct QTCREATOR_UTILS_EXPORT SshConnectionParameters
 {
     enum ProxyType { DefaultProxy, NoProxy };
-    enum AuthorizationType { AuthorizationByPassword, AuthorizationByKey };
+    enum AuthenticationType { AuthenticationByPassword, AuthenticationByKey };
     SshConnectionParameters(ProxyType proxyType);
 
     QString host;
@@ -62,7 +62,7 @@ struct QTCREATOR_UTILS_EXPORT SshConnectionParameters
     QString password;
     QString privateKeyFile;
     int timeout; // In seconds.
-    AuthorizationType authorizationType;
+    AuthenticationType authenticationType;
     quint16 port;
     ProxyType proxyType;
 };
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 028f7fb74aa..65dd664385d 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1557,7 +1557,7 @@ void DebuggerPluginPrivate::startRemoteEngine()
     sp.connParams.password = dlg.password();
 
     sp.connParams.timeout = 5;
-    sp.connParams.authorizationType = Utils::SshConnectionParameters::AuthorizationByPassword;
+    sp.connParams.authenticationType = Utils::SshConnectionParameters::AuthenticationByPassword;
     sp.connParams.port = 22;
     sp.connParams.proxyType = Utils::SshConnectionParameters::NoProxy;
 
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
index 31b96f11994..eef1ac55f96 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
@@ -43,7 +43,7 @@
 #include <algorithm>
 #include <cctype>
 
-typedef Utils::SshConnectionParameters::AuthorizationType AuthType;
+typedef Utils::SshConnectionParameters::AuthenticationType AuthType;
 
 namespace Qt4ProjectManager {
 namespace Internal {
@@ -73,7 +73,7 @@ namespace {
     const int DefaultGdbServerPortSim(13219);
     const QString DefaultHostNameHW(QLatin1String("192.168.2.15"));
     const QString DefaultHostNameSim(QLatin1String("localhost"));
-    const AuthType DefaultAuthType(Utils::SshConnectionParameters::AuthorizationByKey);
+    const AuthType DefaultAuthType(Utils::SshConnectionParameters::AuthenticationByKey);
     const int DefaultTimeout(30);
     const MaemoDeviceConfig::DeviceType DefaultDeviceType(MaemoDeviceConfig::Physical);
 }
@@ -231,7 +231,7 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createHardwareConfig(const QString &na
     const QString privateKeyFilePath, Id &nextId)
 {
     Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy);
-    sshParams.authorizationType = Utils::SshConnectionParameters::AuthorizationByKey;
+    sshParams.authenticationType = Utils::SshConnectionParameters::AuthenticationByKey;
     sshParams.host = hostName;
     sshParams.privateKeyFile = privateKeyFilePath;
     return Ptr(new MaemoDeviceConfig(name, osVersion, Physical, sshParams, nextId));
@@ -241,7 +241,7 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &na
     MaemoGlobal::MaemoVersion osVersion, Id &nextId)
 {
     Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy);
-    sshParams.authorizationType = Utils::SshConnectionParameters::AuthorizationByPassword;
+    sshParams.authenticationType = Utils::SshConnectionParameters::AuthenticationByPassword;
     sshParams.host = defaultHost(Emulator);
     sshParams.password = defaultQemuPassword(osVersion);
     return Ptr(new MaemoDeviceConfig(name, osVersion, Emulator, sshParams, nextId));
@@ -278,7 +278,7 @@ MaemoDeviceConfig::MaemoDeviceConfig(const QSettings &settings,
     m_sshParameters.host = settings.value(HostKey, defaultHost(m_type)).toString();
     m_sshParameters.port = settings.value(SshPortKey, defaultSshPort(m_type)).toInt();
     m_sshParameters.userName = settings.value(UserNameKey, defaultUser(m_osVersion)).toString();
-    m_sshParameters.authorizationType
+    m_sshParameters.authenticationType
         = static_cast<AuthType>(settings.value(AuthKey, DefaultAuthType).toInt());
     m_sshParameters.password = settings.value(PasswordKey).toString();
     m_sshParameters.privateKeyFile
@@ -372,7 +372,7 @@ void MaemoDeviceConfig::save(QSettings &settings) const
     settings.setValue(SshPortKey, m_sshParameters.port);
     settings.setValue(PortsSpecKey, m_portsSpec);
     settings.setValue(UserNameKey, m_sshParameters.userName);
-    settings.setValue(AuthKey, m_sshParameters.authorizationType);
+    settings.setValue(AuthKey, m_sshParameters.authenticationType);
     settings.setValue(PasswordKey, m_sshParameters.password);
     settings.setValue(KeyFileKey, m_sshParameters.privateKeyFile);
     settings.setValue(TimeoutKey, m_sshParameters.timeout);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp
index de2ceb2c921..b2d1642bdd9 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp
@@ -205,7 +205,7 @@ void MaemoDeviceConfigurationsSettingsWidget::displayCurrent()
         m_ui->deviceTypeValueLabel->setText(tr("Emulator (Qemu)"));
         m_ui->portsLineEdit->setReadOnly(true);
     }
-    if (sshParams.authorizationType == Utils::SshConnectionParameters::AuthorizationByPassword)
+    if (sshParams.authenticationType == Utils::SshConnectionParameters::AuthenticationByPassword)
         m_ui->passwordButton->setChecked(true);
     else
         m_ui->keyButton->setChecked(true);
@@ -265,9 +265,9 @@ void MaemoDeviceConfigurationsSettingsWidget::authenticationTypeChanged()
 {
     SshConnectionParameters sshParams = currentConfig()->sshParameters();
     const bool usePassword = m_ui->passwordButton->isChecked();
-    sshParams.authorizationType = usePassword
-        ? SshConnectionParameters::AuthorizationByPassword
-        : SshConnectionParameters::AuthorizationByKey;
+    sshParams.authenticationType = usePassword
+        ? SshConnectionParameters::AuthenticationByPassword
+        : SshConnectionParameters::AuthenticationByKey;
     m_devConfigs->setSshParameters(currentIndex(), sshParams);
     m_ui->pwdLineEdit->setEnabled(usePassword);
     m_ui->passwordLabel->setEnabled(usePassword);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp
index 3fb7da8e999..188c0413a8b 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp
@@ -407,7 +407,7 @@ private:
         m_ui->passwordLineEdit->setEnabled(false);
         m_ui->deployButton->setEnabled(false);
         Utils::SshConnectionParameters sshParams(SshConnectionParameters::NoProxy);
-        sshParams.authorizationType = SshConnectionParameters::AuthorizationByPassword;
+        sshParams.authenticationType = SshConnectionParameters::AuthenticationByPassword;
         sshParams.host = hostAddress();
         sshParams.port = MaemoDeviceConfig::defaultSshPort(MaemoDeviceConfig::Physical);
         sshParams.password = password();
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
index 8acdcaa78b1..0807abc9455 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
@@ -66,7 +66,7 @@ MaemoPublisherFremantleFree::MaemoPublisherFremantleFree(const ProjectExplorer::
     m_state(Inactive),
     m_sshParams(SshConnectionParameters::DefaultProxy)
 {
-    m_sshParams.authorizationType = SshConnectionParameters::AuthorizationByKey;
+    m_sshParams.authenticationType = SshConnectionParameters::AuthenticationByKey;
     m_sshParams.timeout = 30;
     m_sshParams.port = 22;
     m_process = new QProcess(this);
-- 
GitLab