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

@@ -152,9 +152,10 @@ void MaemoSshRunner::handleConnectionFailure()
if (m_state == Inactive)
qWarning("Unexpected state %d in %s.", m_state, Q_FUNC_INFO);
const QString errorTemplate = m_state == Connecting
? tr("Could not connect to host: %1") : tr("Connection failed: %1");
emitError(errorTemplate.arg(m_connection->errorString()));
const QString errorMsg = m_state == Connecting
? MaemoGlobal::failedToConnectToServerMessage(m_connection, m_devConfig)
: tr("Connection error: %1").arg(m_connection->errorString());
emitError(errorMsg);
}
void MaemoSshRunner::cleanup()