Maemo: Make SSH connection error messages a bit more helpful.

Task-number: QTCREATORBUG-3225
This commit is contained in:
Christian Kandeler
2010-11-30 10:55:44 +01:00
parent 80f640fbb3
commit 8a89a8bd8e
4 changed files with 38 additions and 8 deletions

View File

@@ -335,11 +335,14 @@ void MaemoDeployStep::start()
void MaemoDeployStep::handleConnectionFailure()
{
if (m_state != Inactive) {
raiseError(tr("Could not connect to host: %1")
.arg(m_connection->errorString()));
setState(Inactive);
}
if (m_state == Inactive)
return;
const QString errorMsg = m_state == Connecting
? MaemoGlobal::failedToConnectToServerMessage(m_connection, deviceConfig())
: tr("Connection error: %1").arg(m_connection->errorString());
raiseError(errorMsg);
setState(Inactive);
}
void MaemoDeployStep::handleSftpChannelInitialized()