From dc6874acb80538f77b842730a91a8a609940bca1 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 6 Apr 2011 09:38:13 +0200 Subject: [PATCH] SSH: Adapt tests to API change. --- tests/manual/ssh/errorhandling/main.cpp | 6 +++--- tests/manual/ssh/sftp/sftptest.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/manual/ssh/errorhandling/main.cpp b/tests/manual/ssh/errorhandling/main.cpp index 3900ab43c24..c3f9d8ee5d4 100644 --- a/tests/manual/ssh/errorhandling/main.cpp +++ b/tests/manual/ssh/errorhandling/main.cpp @@ -49,7 +49,7 @@ public: Test() { m_timeoutTimer.setSingleShot(true); - m_connection = SshConnection::create(); + m_connection = SshConnection::create(SshConnectionParameters(SshConnectionParameters::DefaultProxy)); if (m_connection->state() != SshConnection::Unconnected) { qDebug("Error: Newly created SSH connection has state %d.", m_connection->state()); @@ -166,7 +166,7 @@ private: { if (m_connection) disconnect(m_connection.data(), 0, this, 0); - m_connection = SshConnection::create(); + m_connection = SshConnection::create(m_testSet.first().params); connect(m_connection.data(), SIGNAL(connected()), this, SLOT(handleConnected())); connect(m_connection.data(), SIGNAL(disconnected()), this, @@ -179,7 +179,7 @@ private: m_timeoutTimer.stop(); m_timeoutTimer.setInterval(qMax(10000, nextItem.params.timeout * 1000)); qDebug("Testing: %s", nextItem.description); - m_connection->connectToHost(m_testSet.first().params); + m_connection->connectToHost(); } SshConnection::Ptr m_connection; diff --git a/tests/manual/ssh/sftp/sftptest.cpp b/tests/manual/ssh/sftp/sftptest.cpp index 8e795eea433..d9f01f5b1dc 100644 --- a/tests/manual/ssh/sftp/sftptest.cpp +++ b/tests/manual/ssh/sftp/sftptest.cpp @@ -58,7 +58,7 @@ SftpTest::~SftpTest() void SftpTest::run() { - m_connection = SshConnection::create(); + m_connection = SshConnection::create(m_parameters.sshParams); connect(m_connection.data(), SIGNAL(connected()), this, SLOT(handleConnected())); connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this, @@ -68,7 +68,7 @@ void SftpTest::run() std::cout << "Connecting to host '" << qPrintable(m_parameters.sshParams.host) << "'..." << std::endl; m_state = Connecting; - m_connection->connectToHost(m_parameters.sshParams); + m_connection->connectToHost(); } void SftpTest::handleConnected()