diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2012-05-18 10:49:35 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@nokia.com> | 2012-05-22 10:51:53 +0200 |
commit | 53a1087d1321758ab1dc0a6ad737c135249bd5e6 (patch) | |
tree | ab0f9596da64a1907690b324bd05416c585eaf8c /tests/manual | |
parent | b9d9bb7ba85e3b3ea0e06f0876272c0e3bebd144 (diff) | |
download | qt-creator-53a1087d1321758ab1dc0a6ad737c135249bd5e6.tar.gz |
Move SSH support into a dedicated library.
It does not belong into libUtils, which is a collection of small
unrelated utility classes.
Task-number: QTCREATORBUG-7218
Change-Id: Id92b9f28678afec93e6f07166adfde6550f38072
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/ssh/errorhandling/main.cpp | 14 | ||||
-rw-r--r-- | tests/manual/ssh/remoteprocess/argumentscollector.cpp | 5 | ||||
-rw-r--r-- | tests/manual/ssh/remoteprocess/argumentscollector.h | 6 | ||||
-rw-r--r-- | tests/manual/ssh/remoteprocess/main.cpp | 6 | ||||
-rw-r--r-- | tests/manual/ssh/remoteprocess/remoteprocesstest.cpp | 14 | ||||
-rw-r--r-- | tests/manual/ssh/remoteprocess/remoteprocesstest.h | 14 | ||||
-rw-r--r-- | tests/manual/ssh/sftp/argumentscollector.cpp | 3 | ||||
-rw-r--r-- | tests/manual/ssh/sftp/argumentscollector.h | 3 | ||||
-rw-r--r-- | tests/manual/ssh/sftp/main.cpp | 9 | ||||
-rw-r--r-- | tests/manual/ssh/sftp/parameters.h | 4 | ||||
-rw-r--r-- | tests/manual/ssh/sftp/sftptest.cpp | 14 | ||||
-rw-r--r-- | tests/manual/ssh/sftp/sftptest.h | 40 | ||||
-rw-r--r-- | tests/manual/ssh/sftpfsmodel/main.cpp | 6 | ||||
-rw-r--r-- | tests/manual/ssh/sftpfsmodel/window.cpp | 10 | ||||
-rw-r--r-- | tests/manual/ssh/sftpfsmodel/window.h | 8 | ||||
-rw-r--r-- | tests/manual/ssh/shell/main.cpp | 6 | ||||
-rw-r--r-- | tests/manual/ssh/shell/shell.cpp | 10 | ||||
-rw-r--r-- | tests/manual/ssh/shell/shell.h | 8 | ||||
-rw-r--r-- | tests/manual/ssh/ssh.pri | 9 |
19 files changed, 89 insertions, 100 deletions
diff --git a/tests/manual/ssh/errorhandling/main.cpp b/tests/manual/ssh/errorhandling/main.cpp index b999877f2c..67f0a4faaa 100644 --- a/tests/manual/ssh/errorhandling/main.cpp +++ b/tests/manual/ssh/errorhandling/main.cpp @@ -30,9 +30,9 @@ ** **************************************************************************/ -#include <utils/ssh/sftpchannel.h> -#include <utils/ssh/sshconnection.h> -#include <utils/ssh/sshremoteprocess.h> +#include <ssh/sftpchannel.h> +#include <ssh/sshconnection.h> +#include <ssh/sshremoteprocess.h> #include <QCoreApplication> #include <QList> @@ -40,7 +40,7 @@ #include <QPair> #include <QTimer> -using namespace Utils; +using namespace QSsh; class Test : public QObject { Q_OBJECT @@ -129,7 +129,7 @@ private slots: qApp->quit(); } - void handleError(Utils::SshError error) + void handleError(QSsh::SshError error) { if (m_testSet.isEmpty()) { qDebug("Error: Received error %d, but no test was running.", error); @@ -173,8 +173,8 @@ private: SLOT(handleDisconnected())); connect(m_connection.data(), SIGNAL(dataAvailable(QString)), this, SLOT(handleDataAvailable(QString))); - connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this, - SLOT(handleError(Utils::SshError))); + connect(m_connection.data(), SIGNAL(error(QSsh::SshError)), this, + SLOT(handleError(QSsh::SshError))); const TestItem &nextItem = m_testSet.first(); m_timeoutTimer.stop(); m_timeoutTimer.setInterval(qMax(10000, nextItem.params.timeout * 1000)); diff --git a/tests/manual/ssh/remoteprocess/argumentscollector.cpp b/tests/manual/ssh/remoteprocess/argumentscollector.cpp index 64cc0ef883..b5acea9968 100644 --- a/tests/manual/ssh/remoteprocess/argumentscollector.cpp +++ b/tests/manual/ssh/remoteprocess/argumentscollector.cpp @@ -36,15 +36,16 @@ #include <iostream> +using namespace QSsh; + using namespace std; -using namespace Utils; ArgumentsCollector::ArgumentsCollector(const QStringList &args) : m_arguments(args) { } -Utils::SshConnectionParameters ArgumentsCollector::collect(bool &success) const +QSsh::SshConnectionParameters ArgumentsCollector::collect(bool &success) const { SshConnectionParameters parameters; try { diff --git a/tests/manual/ssh/remoteprocess/argumentscollector.h b/tests/manual/ssh/remoteprocess/argumentscollector.h index e2dc69e0b3..d7189597f1 100644 --- a/tests/manual/ssh/remoteprocess/argumentscollector.h +++ b/tests/manual/ssh/remoteprocess/argumentscollector.h @@ -33,7 +33,7 @@ #ifndef ARGUMENTSCOLLECTOR_H #define ARGUMENTSCOLLECTOR_H -#include <utils/ssh/sshconnection.h> +#include <ssh/sshconnection.h> #include <QStringList> @@ -41,7 +41,7 @@ class ArgumentsCollector { public: ArgumentsCollector(const QStringList &args); - Utils::SshConnectionParameters collect(bool &success) const; + QSsh::SshConnectionParameters collect(bool &success) const; private: struct ArgumentErrorException { @@ -54,7 +54,7 @@ private: bool checkAndSetIntArg(int &pos, int &val, bool &alreadyGiven, const char *opt) const; bool checkForNoProxy(int &pos, - Utils::SshConnectionParameters::ProxyType &type, + QSsh::SshConnectionParameters::ProxyType &type, bool &alreadyGiven) const; const QStringList m_arguments; diff --git a/tests/manual/ssh/remoteprocess/main.cpp b/tests/manual/ssh/remoteprocess/main.cpp index 01203bd2d0..0fac815a29 100644 --- a/tests/manual/ssh/remoteprocess/main.cpp +++ b/tests/manual/ssh/remoteprocess/main.cpp @@ -33,7 +33,7 @@ #include "argumentscollector.h" #include "remoteprocesstest.h" -#include <utils/ssh/sshconnection.h> +#include <ssh/sshconnection.h> #include <QCoreApplication> #include <QObject> @@ -42,13 +42,11 @@ #include <cstdlib> #include <iostream> -using namespace Utils; - int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); bool parseSuccess; - const Utils::SshConnectionParameters ¶meters + const QSsh::SshConnectionParameters ¶meters = ArgumentsCollector(app.arguments()).collect(parseSuccess); if (!parseSuccess) return EXIT_FAILURE; diff --git a/tests/manual/ssh/remoteprocess/remoteprocesstest.cpp b/tests/manual/ssh/remoteprocess/remoteprocesstest.cpp index 47eaaee77b..2f0557491a 100644 --- a/tests/manual/ssh/remoteprocess/remoteprocesstest.cpp +++ b/tests/manual/ssh/remoteprocess/remoteprocesstest.cpp @@ -32,7 +32,7 @@ #include "remoteprocesstest.h" -#include <utils/ssh/sshpseudoterminal.h> +#include <ssh/sshpseudoterminal.h> #include <QCoreApplication> #include <QTextStream> @@ -40,7 +40,7 @@ #include <iostream> -using namespace Utils; +using namespace QSsh; const QByteArray StderrOutput("ChannelTest"); @@ -93,8 +93,8 @@ void RemoteProcessTest::handleProcessStarted() } else { m_started = true; if (m_state == TestingCrash) { - Utils::SshRemoteProcessRunner * const killer - = new Utils::SshRemoteProcessRunner(this); + QSsh::SshRemoteProcessRunner * const killer + = new QSsh::SshRemoteProcessRunner(this); killer->run("pkill -9 sleep", m_sshParams); } else if (m_state == TestingIoDevice) { connect(m_catProcess.data(), SIGNAL(readyRead()), SLOT(handleReadyRead())); @@ -214,9 +214,9 @@ void RemoteProcessTest::handleProcessClosed(int exitStatus) } std::cout << "Ok.\nTesting I/O device functionality... " << std::flush; m_state = TestingIoDevice; - m_sshConnection = Utils::SshConnection::create(m_sshParams); + m_sshConnection = QSsh::SshConnection::create(m_sshParams); connect(m_sshConnection.data(), SIGNAL(connected()), SLOT(handleConnected())); - connect(m_sshConnection.data(), SIGNAL(error(Utils::SshError)), + connect(m_sshConnection.data(), SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError())); m_sshConnection->connectToHost(); m_timeoutTimer->start(); @@ -308,7 +308,7 @@ void RemoteProcessTest::handleReadyRead() << qPrintable(testString()) << "', got '" << qPrintable(data) << "'." << std::endl; qApp->exit(1); } - Utils::SshRemoteProcessRunner * const killer = new Utils::SshRemoteProcessRunner(this); + QSsh::SshRemoteProcessRunner * const killer = new QSsh::SshRemoteProcessRunner(this); killer->run("pkill -9 cat", m_sshParams); break; } diff --git a/tests/manual/ssh/remoteprocess/remoteprocesstest.h b/tests/manual/ssh/remoteprocess/remoteprocesstest.h index e203eaea63..0eb59ab0f6 100644 --- a/tests/manual/ssh/remoteprocess/remoteprocesstest.h +++ b/tests/manual/ssh/remoteprocess/remoteprocesstest.h @@ -33,7 +33,7 @@ #ifndef REMOTEPROCESSTEST_H #define REMOTEPROCESSTEST_H -#include <utils/ssh/sshremoteprocessrunner.h> +#include <ssh/sshremoteprocessrunner.h> #include <QObject> @@ -44,7 +44,7 @@ class RemoteProcessTest : public QObject { Q_OBJECT public: - RemoteProcessTest(const Utils::SshConnectionParameters ¶ms); + RemoteProcessTest(const QSsh::SshConnectionParameters ¶ms); ~RemoteProcessTest(); void run(); @@ -70,13 +70,13 @@ private: void handleSuccessfulCrashTest(); void handleSuccessfulIoTest(); - const Utils::SshConnectionParameters m_sshParams; + const QSsh::SshConnectionParameters m_sshParams; QTimer * const m_timeoutTimer; QTextStream *m_textStream; - Utils::SshRemoteProcessRunner * const m_remoteRunner; - Utils::SshRemoteProcess::Ptr m_catProcess; - Utils::SshRemoteProcess::Ptr m_echoProcess; - Utils::SshConnection::Ptr m_sshConnection; + QSsh::SshRemoteProcessRunner * const m_remoteRunner; + QSsh::SshRemoteProcess::Ptr m_catProcess; + QSsh::SshRemoteProcess::Ptr m_echoProcess; + QSsh::SshConnection::Ptr m_sshConnection; QByteArray m_remoteStdout; QByteArray m_remoteStderr; QByteArray m_remoteData; diff --git a/tests/manual/ssh/sftp/argumentscollector.cpp b/tests/manual/ssh/sftp/argumentscollector.cpp index d51a00c3d6..a10fea0ee4 100644 --- a/tests/manual/ssh/sftp/argumentscollector.cpp +++ b/tests/manual/ssh/sftp/argumentscollector.cpp @@ -34,8 +34,9 @@ #include <iostream> +using namespace QSsh; + using namespace std; -using namespace Utils; ArgumentsCollector::ArgumentsCollector(const QStringList &args) : m_arguments(args) diff --git a/tests/manual/ssh/sftp/argumentscollector.h b/tests/manual/ssh/sftp/argumentscollector.h index 62fb79061d..ca67456b89 100644 --- a/tests/manual/ssh/sftp/argumentscollector.h +++ b/tests/manual/ssh/sftp/argumentscollector.h @@ -53,8 +53,7 @@ private: bool checkAndSetStringArg(int &pos, QString &arg, const char *opt) const; bool checkAndSetIntArg(int &pos, int &val, bool &alreadyGiven, const char *opt) const; - bool checkForNoProxy(int &pos, - Utils::SshConnectionParameters::ProxyType &type, + bool checkForNoProxy(int &pos, QSsh::SshConnectionParameters::ProxyType &type, bool &alreadyGiven) const; const QStringList m_arguments; diff --git a/tests/manual/ssh/sftp/main.cpp b/tests/manual/ssh/sftp/main.cpp index 8a0a244b91..231cb14909 100644 --- a/tests/manual/ssh/sftp/main.cpp +++ b/tests/manual/ssh/sftp/main.cpp @@ -33,8 +33,8 @@ #include "argumentscollector.h" #include "sftptest.h" -#include <utils/ssh/sftpchannel.h> -#include <utils/ssh/sshconnection.h> +#include <ssh/sftpchannel.h> +#include <ssh/sshconnection.h> #include <QCoreApplication> #include <QObject> @@ -43,14 +43,11 @@ #include <cstdlib> #include <iostream> -using namespace Utils; - int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); bool parseSuccess; - const Parameters parameters - = ArgumentsCollector(app.arguments()).collect(parseSuccess); + const Parameters parameters = ArgumentsCollector(app.arguments()).collect(parseSuccess); if (!parseSuccess) return EXIT_FAILURE; SftpTest sftpTest(parameters); diff --git a/tests/manual/ssh/sftp/parameters.h b/tests/manual/ssh/sftp/parameters.h index 81b473239c..7a29245269 100644 --- a/tests/manual/ssh/sftp/parameters.h +++ b/tests/manual/ssh/sftp/parameters.h @@ -33,10 +33,10 @@ #ifndef PARAMETERS_H #define PARAMETERS_H -#include <utils/ssh/sshconnection.h> +#include <ssh/sshconnection.h> struct Parameters { - Utils::SshConnectionParameters sshParams; + QSsh::SshConnectionParameters sshParams; int smallFileCount; int bigFileSize; }; diff --git a/tests/manual/ssh/sftp/sftptest.cpp b/tests/manual/ssh/sftp/sftptest.cpp index 8083ce0498..b1372d6f3c 100644 --- a/tests/manual/ssh/sftp/sftptest.cpp +++ b/tests/manual/ssh/sftp/sftptest.cpp @@ -40,7 +40,7 @@ #include <iostream> -using namespace Utils; +using namespace QSsh; SftpTest::SftpTest(const Parameters ¶ms) : m_parameters(params), m_state(Inactive), m_error(false), @@ -64,7 +64,7 @@ void SftpTest::run() 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, + connect(m_connection.data(), SIGNAL(error(QSsh::SshError)), this, SLOT(handleError())); connect(m_connection.data(), SIGNAL(disconnected()), this, SLOT(handleDisconnected())); @@ -87,11 +87,11 @@ void SftpTest::handleConnected() SLOT(handleChannelInitialized())); connect(m_channel.data(), SIGNAL(initializationFailed(QString)), this, SLOT(handleChannelInitializationFailure(QString))); - connect(m_channel.data(), SIGNAL(finished(Utils::SftpJobId,QString)), - this, SLOT(handleJobFinished(Utils::SftpJobId,QString))); + connect(m_channel.data(), SIGNAL(finished(QSsh::SftpJobId,QString)), + this, SLOT(handleJobFinished(QSsh::SftpJobId,QString))); connect(m_channel.data(), - SIGNAL(fileInfoAvailable(Utils::SftpJobId,QList<Utils::SftpFileInfo>)), - SLOT(handleFileInfo(Utils::SftpJobId,QList<Utils::SftpFileInfo>))); + SIGNAL(fileInfoAvailable(QSsh::SftpJobId,QList<QSsh::SftpFileInfo>)), + SLOT(handleFileInfo(QSsh::SftpJobId,QList<QSsh::SftpFileInfo>))); connect(m_channel.data(), SIGNAL(closed()), this, SLOT(handleChannelClosed())); m_state = InitializingChannel; @@ -200,7 +200,7 @@ void SftpTest::handleChannelClosed() m_connection->disconnectFromHost(); } -void SftpTest::handleJobFinished(Utils::SftpJobId job, const QString &error) +void SftpTest::handleJobFinished(QSsh::SftpJobId job, const QString &error) { switch (m_state) { case UploadingSmall: diff --git a/tests/manual/ssh/sftp/sftptest.h b/tests/manual/ssh/sftp/sftptest.h index ca84e850c2..8ca5a3dff4 100644 --- a/tests/manual/ssh/sftp/sftptest.h +++ b/tests/manual/ssh/sftp/sftptest.h @@ -35,8 +35,8 @@ #include "parameters.h" -#include <utils/ssh/sftpchannel.h> -#include <utils/ssh/sshconnection.h> +#include <ssh/sftpchannel.h> +#include <ssh/sshconnection.h> #include <QElapsedTimer> #include <QHash> @@ -60,12 +60,12 @@ private slots: void handleDisconnected(); void handleChannelInitialized(); void handleChannelInitializationFailure(const QString &reason); - void handleJobFinished(Utils::SftpJobId job, const QString &error); - void handleFileInfo(Utils::SftpJobId job, const QList<Utils::SftpFileInfo> &fileInfoList); + void handleJobFinished(QSsh::SftpJobId job, const QString &error); + void handleFileInfo(QSsh::SftpJobId job, const QList<QSsh::SftpFileInfo> &fileInfoList); void handleChannelClosed(); private: - typedef QHash<Utils::SftpJobId, QString> JobMap; + typedef QHash<QSsh::SftpJobId, QString> JobMap; typedef QSharedPointer<QFile> FilePtr; enum State { Inactive, Connecting, InitializingChannel, UploadingSmall, DownloadingSmall, @@ -78,36 +78,36 @@ private: QString cmpFileName(const QString &localFileName) const; QString remoteFilePath(const QString &localFileName) const; void earlyDisconnectFromHost(); - bool checkJobId(Utils::SftpJobId job, Utils::SftpJobId expectedJob, const char *activity); - bool handleJobFinished(Utils::SftpJobId job, JobMap &jobMap, + bool checkJobId(QSsh::SftpJobId job, QSsh::SftpJobId expectedJob, const char *activity); + bool handleJobFinished(QSsh::SftpJobId job, JobMap &jobMap, const QString &error, const char *activity); - bool handleJobFinished(Utils::SftpJobId job, Utils::SftpJobId expectedJob, const QString &error, + bool handleJobFinished(QSsh::SftpJobId job, QSsh::SftpJobId expectedJob, const QString &error, const char *activity); - bool handleBigJobFinished(Utils::SftpJobId job, Utils::SftpJobId expectedJob, + bool handleBigJobFinished(QSsh::SftpJobId job, QSsh::SftpJobId expectedJob, const QString &error, const char *activity); bool compareFiles(QFile *orig, QFile *copy); const Parameters m_parameters; State m_state; bool m_error; - Utils::SshConnection::Ptr m_connection; - Utils::SftpChannel::Ptr m_channel; + QSsh::SshConnection::Ptr m_connection; + QSsh::SftpChannel::Ptr m_channel; QList<FilePtr> m_localSmallFiles; JobMap m_smallFilesUploadJobs; JobMap m_smallFilesDownloadJobs; JobMap m_smallFilesRemovalJobs; FilePtr m_localBigFile; - Utils::SftpJobId m_bigFileUploadJob; - Utils::SftpJobId m_bigFileDownloadJob; - Utils::SftpJobId m_bigFileRemovalJob; - Utils::SftpJobId m_mkdirJob; - Utils::SftpJobId m_statDirJob; - Utils::SftpJobId m_lsDirJob; - Utils::SftpJobId m_rmDirJob; + QSsh::SftpJobId m_bigFileUploadJob; + QSsh::SftpJobId m_bigFileDownloadJob; + QSsh::SftpJobId m_bigFileRemovalJob; + QSsh::SftpJobId m_mkdirJob; + QSsh::SftpJobId m_statDirJob; + QSsh::SftpJobId m_lsDirJob; + QSsh::SftpJobId m_rmDirJob; QElapsedTimer m_bigJobTimer; QString m_remoteDirPath; - Utils::SftpFileInfo m_dirInfo; - QList<Utils::SftpFileInfo> m_dirContents; + QSsh::SftpFileInfo m_dirInfo; + QList<QSsh::SftpFileInfo> m_dirContents; }; diff --git a/tests/manual/ssh/sftpfsmodel/main.cpp b/tests/manual/ssh/sftpfsmodel/main.cpp index 4525c0b30e..655a00d74f 100644 --- a/tests/manual/ssh/sftpfsmodel/main.cpp +++ b/tests/manual/ssh/sftpfsmodel/main.cpp @@ -31,14 +31,12 @@ **************************************************************************/ #include "window.h" -#include <utils/ssh/sftpfilesystemmodel.h> -#include <utils/ssh/sshconnection.h> +#include <ssh/sftpfilesystemmodel.h> +#include <ssh/sshconnection.h> #include <QApplication> #include <QTreeView> -using namespace Utils; - int main(int argc, char *argv[]) { QApplication app(argc, argv); diff --git a/tests/manual/ssh/sftpfsmodel/window.cpp b/tests/manual/ssh/sftpfsmodel/window.cpp index d3ca3dccda..ee3637bb2f 100644 --- a/tests/manual/ssh/sftpfsmodel/window.cpp +++ b/tests/manual/ssh/sftpfsmodel/window.cpp @@ -34,8 +34,8 @@ #include "modeltest.h" -#include <utils/ssh/sftpfilesystemmodel.h> -#include <utils/ssh/sshconnection.h> +#include <ssh/sftpfilesystemmodel.h> +#include <ssh/sshconnection.h> #include <QApplication> #include <QDir> @@ -45,7 +45,7 @@ #include <QItemSelectionModel> #include <QString> -using namespace Utils; +using namespace QSsh; SftpFsWindow::SftpFsWindow(QWidget *parent) : QDialog(parent), m_ui(new Ui::Window) { @@ -75,8 +75,8 @@ void SftpFsWindow::connectToHost() connect(m_fsModel, SIGNAL(sftpOperationFailed(QString)), SLOT(handleSftpOperationFailed(QString))); connect(m_fsModel, SIGNAL(connectionError(QString)), SLOT(handleConnectionError(QString))); - connect(m_fsModel, SIGNAL(sftpOperationFinished(Utils::SftpJobId,QString)), - SLOT(handleSftpOperationFinished(Utils::SftpJobId,QString))); + connect(m_fsModel, SIGNAL(sftpOperationFinished(QSsh::SftpJobId,QString)), + SLOT(handleSftpOperationFinished(QSsh::SftpJobId,QString))); m_fsModel->setSshConnection(sshParams); m_ui->fsView->setModel(m_fsModel); } diff --git a/tests/manual/ssh/sftpfsmodel/window.h b/tests/manual/ssh/sftpfsmodel/window.h index b403df0582..5e6d5ee4a9 100644 --- a/tests/manual/ssh/sftpfsmodel/window.h +++ b/tests/manual/ssh/sftpfsmodel/window.h @@ -29,7 +29,7 @@ ** Nokia at qt-info@nokia.com. ** **************************************************************************/ -#include <utils/ssh/sftpdefs.h> +#include <ssh/sftpdefs.h> #include <QDialog> @@ -37,7 +37,7 @@ QT_BEGIN_NAMESPACE namespace Ui { class Window; } QT_END_NAMESPACE -namespace Utils { class SftpFileSystemModel; } +namespace QSsh { class SftpFileSystemModel; } class SftpFsWindow : public QDialog { @@ -51,9 +51,9 @@ private slots: void downloadFile(); void handleConnectionError(const QString &errorMessage); void handleSftpOperationFailed(const QString &errorMessage); - void handleSftpOperationFinished(Utils::SftpJobId jobId, const QString &error); + void handleSftpOperationFinished(QSsh::SftpJobId jobId, const QString &error); private: - Utils::SftpFileSystemModel *m_fsModel; + QSsh::SftpFileSystemModel *m_fsModel; Ui::Window *m_ui; }; diff --git a/tests/manual/ssh/shell/main.cpp b/tests/manual/ssh/shell/main.cpp index ba51eae3c0..4767d2cb7a 100644 --- a/tests/manual/ssh/shell/main.cpp +++ b/tests/manual/ssh/shell/main.cpp @@ -32,7 +32,7 @@ #include "../remoteprocess/argumentscollector.h" #include "shell.h" -#include <utils/ssh/sshconnection.h> +#include <ssh/sshconnection.h> #include <QCoreApplication> #include <QObject> @@ -41,13 +41,11 @@ #include <cstdlib> #include <iostream> -using namespace Utils; - int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); bool parseSuccess; - const Utils::SshConnectionParameters ¶meters + const QSsh::SshConnectionParameters ¶meters = ArgumentsCollector(app.arguments()).collect(parseSuccess); if (!parseSuccess) return EXIT_FAILURE; diff --git a/tests/manual/ssh/shell/shell.cpp b/tests/manual/ssh/shell/shell.cpp index fe5a58dd8c..392f4af29c 100644 --- a/tests/manual/ssh/shell/shell.cpp +++ b/tests/manual/ssh/shell/shell.cpp @@ -31,8 +31,8 @@ **************************************************************************/ #include "shell.h" -#include <utils/ssh/sshconnection.h> -#include <utils/ssh/sshremoteprocess.h> +#include <ssh/sshconnection.h> +#include <ssh/sshremoteprocess.h> #include <QCoreApplication> #include <QFile> @@ -41,16 +41,16 @@ #include <cstdlib> #include <iostream> -using namespace Utils; +using namespace QSsh; -Shell::Shell(const Utils::SshConnectionParameters ¶meters, QObject *parent) +Shell::Shell(const QSsh::SshConnectionParameters ¶meters, QObject *parent) : QObject(parent), m_connection(SshConnection::create(parameters)), m_stdin(new QFile(this)) { connect(m_connection.data(), SIGNAL(connected()), SLOT(handleConnected())); connect(m_connection.data(), SIGNAL(dataAvailable(QString)), SLOT(handleShellMessage(QString))); - connect(m_connection.data(), SIGNAL(error(Utils::SshError)), SLOT(handleConnectionError())); + connect(m_connection.data(), SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError())); } Shell::~Shell() diff --git a/tests/manual/ssh/shell/shell.h b/tests/manual/ssh/shell/shell.h index 6ab410cc66..9e6e5c364b 100644 --- a/tests/manual/ssh/shell/shell.h +++ b/tests/manual/ssh/shell/shell.h @@ -35,7 +35,7 @@ #include <QObject> #include <QSharedPointer> -namespace Utils { +namespace QSsh { class SshConnection; class SshConnectionParameters; class SshRemoteProcess; @@ -51,7 +51,7 @@ class Shell : public QObject { Q_OBJECT public: - Shell(const Utils::SshConnectionParameters ¶meters, QObject *parent = 0); + Shell(const QSsh::SshConnectionParameters ¶meters, QObject *parent = 0); ~Shell(); void run(); @@ -67,8 +67,8 @@ private slots: void handleStdin(); private: - QSharedPointer<Utils::SshConnection> m_connection; - QSharedPointer<Utils::SshRemoteProcess> m_shell; + QSharedPointer<QSsh::SshConnection> m_connection; + QSharedPointer<QSsh::SshRemoteProcess> m_shell; QFile * const m_stdin; }; diff --git a/tests/manual/ssh/ssh.pri b/tests/manual/ssh/ssh.pri index b27a328c0c..f4c70a5d74 100644 --- a/tests/manual/ssh/ssh.pri +++ b/tests/manual/ssh/ssh.pri @@ -1,16 +1,13 @@ QT = core network include (../../../qtcreator.pri) -include (../../../src/plugins/coreplugin/coreplugin.pri) - -LIBS += -L$$IDE_PLUGIN_PATH/Nokia +include (../../../src/libs/ssh/ssh.pri) macx:QMAKE_LFLAGS += -Wl,-rpath,\"$$IDE_BIN_PATH/..\" INCLUDEPATH *= $$IDE_SOURCE_TREE/src/plugins -LIBS *= -L$$IDE_LIBRARY_PATH/Nokia +LIBS *= -L$$IDE_LIBRARY_PATH unix { - QMAKE_LFLAGS += -Wl,-rpath,\"$$IDE_PLUGIN_PATH/..\" - QMAKE_LFLAGS += -Wl,-rpath,\"$$IDE_PLUGIN_PATH/Nokia\" + QMAKE_LFLAGS += -Wl,-rpath,\"$$IDE_LIBRARY_PATH\" } CONFIG += console |