summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2012-05-18 10:49:35 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2012-05-22 10:51:53 +0200
commit53a1087d1321758ab1dc0a6ad737c135249bd5e6 (patch)
treeab0f9596da64a1907690b324bd05416c585eaf8c /src/plugins
parentb9d9bb7ba85e3b3ea0e06f0876272c0e3bebd144 (diff)
downloadqt-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 'src/plugins')
-rw-r--r--src/plugins/analyzerbase/analyzermanager.cpp2
-rw-r--r--src/plugins/analyzerbase/analyzerstartparameters.h4
-rw-r--r--src/plugins/analyzerbase/startremotedialog.cpp10
-rw-r--r--src/plugins/analyzerbase/startremotedialog.h4
-rw-r--r--src/plugins/cpaster/cpaster.qbs2
-rw-r--r--src/plugins/debugger/debugger.qbs2
-rw-r--r--src/plugins/debugger/debugger_dependencies.pri1
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp4
-rw-r--r--src/plugins/debugger/debuggerstartparameters.h4
-rw-r--r--src/plugins/debugger/gdb/remotegdbprocess.cpp27
-rw-r--r--src/plugins/debugger/gdb/remotegdbprocess.h16
-rw-r--r--src/plugins/debugger/lldb/lldbenginehost.cpp12
-rw-r--r--src/plugins/debugger/lldb/lldbenginehost.h18
-rw-r--r--src/plugins/git/git.qbs2
-rw-r--r--src/plugins/madde/maddedevicetester.cpp4
-rw-r--r--src/plugins/madde/maddedevicetester.h4
-rw-r--r--src/plugins/madde/maddeuploadandinstallpackagesteps.cpp2
-rw-r--r--src/plugins/madde/maemodeploybymountsteps.cpp2
-rw-r--r--src/plugins/madde/maemodeploymentmounter.cpp6
-rw-r--r--src/plugins/madde/maemodeploymentmounter.h6
-rw-r--r--src/plugins/madde/maemodeviceconfigwizard.cpp11
-rw-r--r--src/plugins/madde/maemopublisherfremantlefree.cpp4
-rw-r--r--src/plugins/madde/maemopublisherfremantlefree.h8
-rw-r--r--src/plugins/madde/maemoqemumanager.h14
-rw-r--r--src/plugins/madde/maemoremotecopyfacility.cpp6
-rw-r--r--src/plugins/madde/maemoremotecopyfacility.h8
-rw-r--r--src/plugins/madde/maemoremotemounter.cpp5
-rw-r--r--src/plugins/madde/maemoremotemounter.h12
-rw-r--r--src/plugins/madde/maemorunconfiguration.cpp2
-rw-r--r--src/plugins/madde/maemosshrunner.cpp4
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp8
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeployservice.h4
-rw-r--r--src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp2
-rw-r--r--src/plugins/remotelinux/genericdirectuploadservice.cpp14
-rw-r--r--src/plugins/remotelinux/genericdirectuploadservice.h4
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp5
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp4
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp1
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h4
-rw-r--r--src/plugins/remotelinux/linuxdeviceconfiguration.cpp4
-rw-r--r--src/plugins/remotelinux/linuxdeviceconfiguration.h10
-rw-r--r--src/plugins/remotelinux/linuxdevicetester.cpp8
-rw-r--r--src/plugins/remotelinux/linuxdevicetester.h4
-rw-r--r--src/plugins/remotelinux/packageuploader.cpp12
-rw-r--r--src/plugins/remotelinux/packageuploader.h12
-rw-r--r--src/plugins/remotelinux/publickeydeploymentdialog.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinux.qbs2
-rw-r--r--src/plugins/remotelinux/remotelinuxapplicationrunner.cpp17
-rw-r--r--src/plugins/remotelinux/remotelinuxapplicationrunner.h8
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp4
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentreader.cpp12
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentreader.h4
-rw-r--r--src/plugins/remotelinux/remotelinuxpackageinstaller.cpp8
-rw-r--r--src/plugins/remotelinux/remotelinuxprocesslist.cpp4
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.cpp1
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.h4
-rw-r--r--src/plugins/remotelinux/remotelinuxusedportsgatherer.cpp9
-rw-r--r--src/plugins/remotelinux/sshkeydeployer.cpp4
-rw-r--r--src/plugins/remotelinux/sshkeydeployer.h4
-rw-r--r--src/plugins/remotelinux/startgdbserverdialog.cpp5
-rw-r--r--src/plugins/valgrind/callgrind/callgrindcontroller.cpp10
-rw-r--r--src/plugins/valgrind/callgrind/callgrindcontroller.h16
-rw-r--r--src/plugins/valgrind/valgrindprocess.cpp34
-rw-r--r--src/plugins/valgrind/valgrindprocess.h20
-rw-r--r--src/plugins/valgrind/valgrindrunner.cpp10
-rw-r--r--src/plugins/valgrind/valgrindrunner.h6
67 files changed, 245 insertions, 243 deletions
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp
index 7a0ccbb6cc..3b5f2f17e0 100644
--- a/src/plugins/analyzerbase/analyzermanager.cpp
+++ b/src/plugins/analyzerbase/analyzermanager.cpp
@@ -74,7 +74,7 @@
#include <utils/qtcassert.h>
#include <utils/checkablemessagebox.h>
#include <utils/statuslabel.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QVariant>
#include <QDebug>
diff --git a/src/plugins/analyzerbase/analyzerstartparameters.h b/src/plugins/analyzerbase/analyzerstartparameters.h
index d84bd95771..91a5c8b8aa 100644
--- a/src/plugins/analyzerbase/analyzerstartparameters.h
+++ b/src/plugins/analyzerbase/analyzerstartparameters.h
@@ -39,7 +39,7 @@
#include <QMetaType>
#include <coreplugin/id.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <utils/environment.h>
namespace Analyzer {
@@ -54,7 +54,7 @@ public:
{}
StartMode startMode;
- Utils::SshConnectionParameters connParams;
+ QSsh::SshConnectionParameters connParams;
Core::Id toolId;
QString debuggee;
diff --git a/src/plugins/analyzerbase/startremotedialog.cpp b/src/plugins/analyzerbase/startremotedialog.cpp
index 25b784f607..9436add8ba 100644
--- a/src/plugins/analyzerbase/startremotedialog.cpp
+++ b/src/plugins/analyzerbase/startremotedialog.cpp
@@ -35,7 +35,7 @@
#include "ui_startremotedialog.h"
#include <coreplugin/icore.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QPushButton>
@@ -113,16 +113,16 @@ void StartRemoteDialog::validate()
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
}
-Utils::SshConnectionParameters StartRemoteDialog::sshParams() const
+QSsh::SshConnectionParameters StartRemoteDialog::sshParams() const
{
- Utils::SshConnectionParameters params;
+ QSsh::SshConnectionParameters params;
params.host = m_ui->host->text();
params.userName = m_ui->user->text();
if (m_ui->keyFile->isValid()) {
- params.authenticationType = Utils::SshConnectionParameters::AuthenticationByKey;
+ params.authenticationType = QSsh::SshConnectionParameters::AuthenticationByKey;
params.privateKeyFile = m_ui->keyFile->path();
} else {
- params.authenticationType = Utils::SshConnectionParameters::AuthenticationByPassword;
+ params.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
params.password = m_ui->password->text();
}
params.port = m_ui->port->value();
diff --git a/src/plugins/analyzerbase/startremotedialog.h b/src/plugins/analyzerbase/startremotedialog.h
index 8e74fafb1e..e827d2e0d2 100644
--- a/src/plugins/analyzerbase/startremotedialog.h
+++ b/src/plugins/analyzerbase/startremotedialog.h
@@ -37,7 +37,7 @@
#include <QDialog>
-namespace Utils { class SshConnectionParameters; }
+namespace QSsh { class SshConnectionParameters; }
namespace Analyzer {
@@ -52,7 +52,7 @@ public:
explicit StartRemoteDialog(QWidget *parent = 0);
virtual ~StartRemoteDialog();
- Utils::SshConnectionParameters sshParams() const;
+ QSsh::SshConnectionParameters sshParams() const;
QString executable() const;
QString arguments() const;
QString workingDirectory() const;
diff --git a/src/plugins/cpaster/cpaster.qbs b/src/plugins/cpaster/cpaster.qbs
index c3d596066d..230d02a127 100644
--- a/src/plugins/cpaster/cpaster.qbs
+++ b/src/plugins/cpaster/cpaster.qbs
@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CodePaster"
- Depends { name: "qt"; submodules: ['widgets'] }
+ Depends { name: "qt"; submodules: ['widgets', 'network'] }
Depends { name: "Core" }
Depends { name: "TextEditor" }
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index d5124f9050..9cf8b36f30 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -16,6 +16,7 @@ QtcPlugin {
Depends { name: "symbianutils" }
Depends { name: "QmlJS" }
Depends { name: "QmlDebug" }
+ Depends { name: "QtcSsh" }
Depends { name: "cpp" }
cpp.defines: ["DEBUGGER_LIBRARY"]
@@ -314,6 +315,7 @@ QtcPlugin {
ProductModule {
Depends { name: "cpp" }
+ Depends { name: "QtcSsh" }
cpp.includePaths: ["."]
}
}
diff --git a/src/plugins/debugger/debugger_dependencies.pri b/src/plugins/debugger/debugger_dependencies.pri
index 0fcdf49d33..e99a0c39f5 100644
--- a/src/plugins/debugger/debugger_dependencies.pri
+++ b/src/plugins/debugger/debugger_dependencies.pri
@@ -8,3 +8,4 @@ include(../../libs/cplusplus/cplusplus.pri)
include(../../libs/utils/utils.pri)
include(../../libs/symbianutils/symbianutils.pri)
include(../../libs/qmljs/qmljs.pri)
+include(../../libs/ssh/ssh.pri)
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index b09ee58486..648b31639d 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1842,9 +1842,9 @@ void DebuggerPluginPrivate::startRemoteEngine()
sp.connParams.password = dlg.password();
sp.connParams.timeout = 5;
- sp.connParams.authenticationType = Utils::SshConnectionParameters::AuthenticationByPassword;
+ sp.connParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
sp.connParams.port = 22;
- sp.connParams.proxyType = Utils::SshConnectionParameters::NoProxy;
+ sp.connParams.proxyType = QSsh::SshConnectionParameters::NoProxy;
sp.executable = dlg.inferiorPath();
sp.serverStartScript = dlg.enginePath();
diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h
index 4f5ba16ba2..fbb7424bf6 100644
--- a/src/plugins/debugger/debuggerstartparameters.h
+++ b/src/plugins/debugger/debuggerstartparameters.h
@@ -36,7 +36,7 @@
#include "debugger_global.h"
#include "debuggerconstants.h"
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <utils/environment.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -119,7 +119,7 @@ public:
QByteArray remoteSourcesDir;
QString remoteMountPoint;
QString localMountDir;
- Utils::SshConnectionParameters connParams;
+ QSsh::SshConnectionParameters connParams;
bool requestRemoteSetup;
QString debuggerCommand;
diff --git a/src/plugins/debugger/gdb/remotegdbprocess.cpp b/src/plugins/debugger/gdb/remotegdbprocess.cpp
index cc510c2f88..a5e53ddd9f 100644
--- a/src/plugins/debugger/gdb/remotegdbprocess.cpp
+++ b/src/plugins/debugger/gdb/remotegdbprocess.cpp
@@ -36,18 +36,19 @@
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
-#include <utils/ssh/sshconnectionmanager.h>
+#include <ssh/sshconnectionmanager.h>
#include <QFileInfo>
#include <ctype.h>
+using namespace QSsh;
using namespace Utils;
namespace Debugger {
namespace Internal {
-RemoteGdbProcess::RemoteGdbProcess(const Utils::SshConnectionParameters &connParams,
+RemoteGdbProcess::RemoteGdbProcess(const QSsh::SshConnectionParameters &connParams,
RemotePlainGdbAdapter *adapter, QObject *parent)
: AbstractGdbProcess(parent), m_connParams(connParams),
m_state(Inactive), m_adapter(adapter)
@@ -92,7 +93,7 @@ void RemoteGdbProcess::realStart(const QString &cmd, const QStringList &args,
m_errorOutput.clear();
m_inputToSend.clear();
m_conn = SshConnectionManager::instance().acquireConnection(m_connParams);
- connect(m_conn.data(), SIGNAL(error(Utils::SshError)), this,
+ connect(m_conn.data(), SIGNAL(error(QSsh::SshError)), this,
SLOT(handleConnectionError()));
if (m_conn->state() == SshConnection::Connected) {
handleConnected();
@@ -130,7 +131,7 @@ void RemoteGdbProcess::handleFifoCreationFinished(int exitStatus)
return;
QTC_ASSERT(m_state == CreatingFifo, return);
- if (exitStatus != Utils::SshRemoteProcess::ExitedNormally) {
+ if (exitStatus != QSsh::SshRemoteProcess::ExitedNormally) {
emitErrorExit(tr("Could not create FIFO."));
} else {
setState(StartingFifoReader);
@@ -172,7 +173,7 @@ void RemoteGdbProcess::handleAppOutputReaderStarted()
void RemoteGdbProcess::handleAppOutputReaderFinished(int exitStatus)
{
- if (exitStatus != Utils::SshRemoteProcess::ExitedNormally)
+ if (exitStatus != QSsh::SshRemoteProcess::ExitedNormally)
emitErrorExit(tr("Application output reader unexpectedly finished."));
}
@@ -192,15 +193,15 @@ void RemoteGdbProcess::handleGdbFinished(int exitStatus)
QTC_ASSERT(m_state == RunningGdb, return);
switch (exitStatus) {
- case Utils::SshRemoteProcess::FailedToStart:
+ case QSsh::SshRemoteProcess::FailedToStart:
m_error = tr("Remote GDB failed to start.");
setState(Inactive);
emit startFailed();
break;
- case Utils::SshRemoteProcess::KilledBySignal:
+ case QSsh::SshRemoteProcess::KilledBySignal:
emitErrorExit(tr("Remote GDB crashed."));
break;
- case Utils::SshRemoteProcess::ExitedNormally:
+ case QSsh::SshRemoteProcess::ExitedNormally:
const int exitCode = m_gdbProc->exitCode();
setState(Inactive);
emit finished(exitCode, QProcess::NormalExit);
@@ -229,7 +230,7 @@ qint64 RemoteGdbProcess::write(const QByteArray &data)
void RemoteGdbProcess::kill()
{
if (m_state == RunningGdb) {
- Utils::SshRemoteProcess::Ptr killProc
+ QSsh::SshRemoteProcess::Ptr killProc
= m_conn->createRemoteProcess("pkill -SIGKILL -x gdb");
killProc->start();
} else {
@@ -246,7 +247,7 @@ void RemoteGdbProcess::interruptInferior()
{
QTC_ASSERT(m_state == RunningGdb, return);
- Utils::SshRemoteProcess::Ptr intProc
+ QSsh::SshRemoteProcess::Ptr intProc
= m_conn->createRemoteProcess("pkill -x -SIGINT gdb");
intProc->start();
}
@@ -386,15 +387,15 @@ void RemoteGdbProcess::setState(State newState)
if (m_state == Inactive) {
if (m_gdbProc) {
disconnect(m_gdbProc.data(), 0, this, 0);
- m_gdbProc = Utils::SshRemoteProcess::Ptr();
+ m_gdbProc = QSsh::SshRemoteProcess::Ptr();
}
if (m_appOutputReader) {
disconnect(m_appOutputReader.data(), 0, this, 0);
- m_appOutputReader = Utils::SshRemoteProcess::Ptr();
+ m_appOutputReader = QSsh::SshRemoteProcess::Ptr();
}
if (m_fifoCreator) {
disconnect(m_fifoCreator.data(), 0, this, 0);
- m_fifoCreator = Utils::SshRemoteProcess::Ptr();
+ m_fifoCreator = QSsh::SshRemoteProcess::Ptr();
}
disconnect(m_conn.data(), 0, this, 0);
SshConnectionManager::instance().releaseConnection(m_conn);
diff --git a/src/plugins/debugger/gdb/remotegdbprocess.h b/src/plugins/debugger/gdb/remotegdbprocess.h
index b9888a5441..8dba88e191 100644
--- a/src/plugins/debugger/gdb/remotegdbprocess.h
+++ b/src/plugins/debugger/gdb/remotegdbprocess.h
@@ -35,8 +35,8 @@
#include "abstractgdbprocess.h"
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
#include <QByteArray>
#include <QQueue>
@@ -50,7 +50,7 @@ class RemoteGdbProcess : public AbstractGdbProcess
{
Q_OBJECT
public:
- RemoteGdbProcess(const Utils::SshConnectionParameters &server,
+ RemoteGdbProcess(const QSsh::SshConnectionParameters &server,
RemotePlainGdbAdapter *adapter, QObject *parent = 0);
virtual QByteArray readAllStandardOutput();
@@ -106,11 +106,11 @@ private:
void emitErrorExit(const QString &error);
void setState(State newState);
- Utils::SshConnectionParameters m_connParams;
- Utils::SshConnection::Ptr m_conn;
- Utils::SshRemoteProcess::Ptr m_gdbProc;
- Utils::SshRemoteProcess::Ptr m_appOutputReader;
- Utils::SshRemoteProcess::Ptr m_fifoCreator;
+ QSsh::SshConnectionParameters m_connParams;
+ QSsh::SshConnection::Ptr m_conn;
+ QSsh::SshRemoteProcess::Ptr m_gdbProc;
+ QSsh::SshRemoteProcess::Ptr m_appOutputReader;
+ QSsh::SshRemoteProcess::Ptr m_fifoCreator;
QByteArray m_gdbOutput;
QByteArray m_errorOutput;
QString m_command;
diff --git a/src/plugins/debugger/lldb/lldbenginehost.cpp b/src/plugins/debugger/lldb/lldbenginehost.cpp
index 17d4b9be51..9e36567ee8 100644
--- a/src/plugins/debugger/lldb/lldbenginehost.cpp
+++ b/src/plugins/debugger/lldb/lldbenginehost.cpp
@@ -64,7 +64,7 @@
namespace Debugger {
namespace Internal {
-SshIODevice::SshIODevice(Utils::SshRemoteProcessRunner *r)
+SshIODevice::SshIODevice(QSsh::SshRemoteProcessRunner *r)
: runner(r)
, buckethead(0)
{
@@ -150,9 +150,9 @@ LldbEngineHost::LldbEngineHost(const DebuggerStartParameters &startParameters)
if (startParameters.startMode == StartRemoteEngine)
{
m_guestProcess = 0;
- Utils::SshRemoteProcessRunner * const runner = new Utils::SshRemoteProcessRunner;
- connect (runner, SIGNAL(connectionError(Utils::SshError)),
- this, SLOT(sshConnectionError(Utils::SshError)));
+ QSsh::SshRemoteProcessRunner * const runner = new QSsh::SshRemoteProcessRunner;
+ connect (runner, SIGNAL(connectionError(QSsh::SshError)),
+ this, SLOT(sshConnectionError(QSsh::SshError)));
runner->run(startParameters.serverStartScript.toUtf8(), startParameters.connParams);
setGuestDevice(new SshIODevice(runner));
} else {
@@ -199,7 +199,7 @@ LldbEngineHost::~LldbEngineHost()
if (m_ssh && m_ssh->isProcessRunning()) {
// TODO: openssh doesn't do that
- m_ssh->sendSignalToProcess(Utils::SshRemoteProcess::KillSignal);
+ m_ssh->sendSignalToProcess(QSsh::SshRemoteProcess::KillSignal);
}
}
@@ -212,7 +212,7 @@ void LldbEngineHost::nuke()
m_guestProcess->kill();
notifyEngineSpontaneousShutdown();
}
-void LldbEngineHost::sshConnectionError(Utils::SshError e)
+void LldbEngineHost::sshConnectionError(QSsh::SshError e)
{
showStatusMessage(tr("SSH connection error: %1").arg(e));
}
diff --git a/src/plugins/debugger/lldb/lldbenginehost.h b/src/plugins/debugger/lldb/lldbenginehost.h
index 2978033849..5b301b3962 100644
--- a/src/plugins/debugger/lldb/lldbenginehost.h
+++ b/src/plugins/debugger/lldb/lldbenginehost.h
@@ -34,10 +34,10 @@
#define DEBUGGER_LLDBENGINE_HOST_H
#include "ipcenginehost.h"
-#include <utils/ssh/ssherrors.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocess.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/ssherrors.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QProcess>
#include <QQueue>
@@ -49,7 +49,7 @@ class SshIODevice : public QIODevice
{
Q_OBJECT
public:
- SshIODevice(Utils::SshRemoteProcessRunner *r);
+ SshIODevice(QSsh::SshRemoteProcessRunner *r);
~SshIODevice();
virtual qint64 bytesAvailable () const;
virtual qint64 writeData (const char * data, qint64 maxSize);
@@ -59,8 +59,8 @@ private slots:
void outputAvailable(const QByteArray &output);
void errorOutputAvailable(const QByteArray &output);
private:
- Utils::SshRemoteProcessRunner *runner;
- Utils::SshRemoteProcess::Ptr proc;
+ QSsh::SshRemoteProcessRunner *runner;
+ QSsh::SshRemoteProcess::Ptr proc;
int buckethead;
QQueue<QByteArray> buckets;
QByteArray startupbuffer;
@@ -76,11 +76,11 @@ public:
private:
QProcess *m_guestProcess;
- Utils::SshRemoteProcessRunner *m_ssh;
+ QSsh::SshRemoteProcessRunner *m_ssh;
protected:
void nuke();
private slots:
- void sshConnectionError(Utils::SshError);
+ void sshConnectionError(QSsh::SshError);
void finished(int, QProcess::ExitStatus);
void stderrReady();
};
diff --git a/src/plugins/git/git.qbs b/src/plugins/git/git.qbs
index 8f61ffb9b6..3b05df1a78 100644
--- a/src/plugins/git/git.qbs
+++ b/src/plugins/git/git.qbs
@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Git"
- Depends { name: "qt"; submodules: ['widgets'] }
+ Depends { name: "qt"; submodules: ['widgets', 'network'] }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
diff --git a/src/plugins/madde/maddedevicetester.cpp b/src/plugins/madde/maddedevicetester.cpp
index 3fa4b96189..7a8ba98549 100644
--- a/src/plugins/madde/maddedevicetester.cpp
+++ b/src/plugins/madde/maddedevicetester.cpp
@@ -36,12 +36,12 @@
#include <remotelinux/linuxdeviceconfiguration.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QRegExp>
using namespace RemoteLinux;
-using namespace Utils;
+using namespace QSsh;
namespace Madde {
namespace Internal {
diff --git a/src/plugins/madde/maddedevicetester.h b/src/plugins/madde/maddedevicetester.h
index 2dc176ae36..46248f2c64 100644
--- a/src/plugins/madde/maddedevicetester.h
+++ b/src/plugins/madde/maddedevicetester.h
@@ -36,7 +36,7 @@
#include <QByteArray>
-namespace Utils {
+namespace QSsh {
class SshRemoteProcessRunner;
}
@@ -73,7 +73,7 @@ private:
RemoteLinux::GenericLinuxDeviceTester * const m_genericTester;
State m_state;
TestResult m_result;
- Utils::SshRemoteProcessRunner *m_processRunner;
+ QSsh::SshRemoteProcessRunner *m_processRunner;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_deviceConfiguration;
QByteArray m_stdout;
QByteArray m_stderr;
diff --git a/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp b/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
index d1b224d4a5..348fb58f31 100644
--- a/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
+++ b/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
@@ -42,7 +42,7 @@
#include <qtsupport/baseqtversion.h>
#include <remotelinux/abstractuploadandinstallpackageservice.h>
#include <remotelinux/linuxdeviceconfiguration.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
using namespace RemoteLinux;
diff --git a/src/plugins/madde/maemodeploybymountsteps.cpp b/src/plugins/madde/maemodeploybymountsteps.cpp
index 3407aae74a..35469614ad 100644
--- a/src/plugins/madde/maemodeploybymountsteps.cpp
+++ b/src/plugins/madde/maemodeploybymountsteps.cpp
@@ -48,7 +48,7 @@
#include <remotelinux/deploymentinfo.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QFileInfo>
#include <QList>
diff --git a/src/plugins/madde/maemodeploymentmounter.cpp b/src/plugins/madde/maemodeploymentmounter.cpp
index 5a43ec4c8d..94a42e14b2 100644
--- a/src/plugins/madde/maemodeploymentmounter.cpp
+++ b/src/plugins/madde/maemodeploymentmounter.cpp
@@ -39,11 +39,11 @@
#include <remotelinux/linuxdeviceconfiguration.h>
#include <remotelinux/remotelinuxusedportsgatherer.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
-using namespace Utils;
+using namespace QSsh;
namespace Madde {
namespace Internal {
@@ -82,7 +82,7 @@ void MaemoDeploymentMounter::setupMounts(const SshConnection::Ptr &connection,
m_devConf = devConf;
m_mounter->setConnection(m_connection, m_devConf);
m_buildConfig = bc;
- connect(m_connection.data(), SIGNAL(error(Utils::SshError)),
+ connect(m_connection.data(), SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionError()));
setState(UnmountingOldDirs);
unmount();
diff --git a/src/plugins/madde/maemodeploymentmounter.h b/src/plugins/madde/maemodeploymentmounter.h
index 8e58628ffa..57e9320801 100644
--- a/src/plugins/madde/maemodeploymentmounter.h
+++ b/src/plugins/madde/maemodeploymentmounter.h
@@ -41,7 +41,7 @@
#include <QObject>
#include <QSharedPointer>
-namespace Utils { class SshConnection; }
+namespace QSsh { class SshConnection; }
namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
namespace RemoteLinux {
@@ -61,7 +61,7 @@ public:
~MaemoDeploymentMounter();
// Connection must be in connected state.
- void setupMounts(const QSharedPointer<Utils::SshConnection> &connection,
+ void setupMounts(const QSharedPointer<QSsh::SshConnection> &connection,
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
const QList<MaemoMountSpecification> &mountSpecs,
const Qt4ProjectManager::Qt4BuildConfiguration *bc);
@@ -93,7 +93,7 @@ private:
void setState(State newState);
State m_state;
- QSharedPointer<Utils::SshConnection> m_connection;
+ QSharedPointer<QSsh::SshConnection> m_connection;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
MaemoRemoteMounter * const m_mounter;
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
diff --git a/src/plugins/madde/maemodeviceconfigwizard.cpp b/src/plugins/madde/maemodeviceconfigwizard.cpp
index 0db737173e..40628569eb 100644
--- a/src/plugins/madde/maemodeviceconfigwizard.cpp
+++ b/src/plugins/madde/maemodeviceconfigwizard.cpp
@@ -45,7 +45,7 @@
#include <remotelinux/linuxdevicetestdialog.h>
#include <remotelinux/sshkeydeployer.h>
#include <utils/fileutils.h>
-#include <utils/ssh/sshkeygenerator.h>
+#include <ssh/sshkeygenerator.h>
#include <QDir>
#include <QFile>
@@ -56,6 +56,7 @@
using namespace ProjectExplorer;
using namespace RemoteLinux;
+using namespace QSsh;
using namespace Utils;
namespace Madde {
@@ -443,7 +444,7 @@ private:
Q_SLOT void deployKey()
{
- using namespace Utils;
+ using namespace QSsh;
m_ui->deviceAddressLineEdit->setEnabled(false);
m_ui->passwordLineEdit->setEnabled(false);
m_ui->deployButton->setEnabled(false);
@@ -561,19 +562,19 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
{
bool doTest;
QString freePortsSpec;
- Utils::SshConnectionParameters sshParams;
+ QSsh::SshConnectionParameters sshParams;
sshParams.userName = defaultUser(d->wizardData.deviceType);
sshParams.host = d->wizardData.hostName;
sshParams.port = d->wizardData.sshPort;
if (d->wizardData.machineType == LinuxDeviceConfiguration::Emulator) {
- sshParams.authenticationType = Utils::SshConnectionParameters::AuthenticationByPassword;
+ sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
sshParams.password = d->wizardData.deviceType == Core::Id(MeeGoOsType)
? QLatin1String("meego") : QString();
sshParams.timeout = 30;
freePortsSpec = QLatin1String("13219,14168");
doTest = false;
} else {
- sshParams.authenticationType = Utils::SshConnectionParameters::AuthenticationByKey;
+ sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByKey;
sshParams.privateKeyFile = d->wizardData.privateKeyFilePath;
sshParams.timeout = 10;
freePortsSpec = QLatin1String("10000-10100");
diff --git a/src/plugins/madde/maemopublisherfremantlefree.cpp b/src/plugins/madde/maemopublisherfremantlefree.cpp
index 896a138513..30c5679cef 100644
--- a/src/plugins/madde/maemopublisherfremantlefree.cpp
+++ b/src/plugins/madde/maemopublisherfremantlefree.cpp
@@ -47,7 +47,7 @@
#include <remotelinux/deploymentinfo.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QCoreApplication>
#include <QDir>
@@ -59,7 +59,7 @@
using namespace Core;
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
-using namespace Utils;
+using namespace QSsh;
namespace Madde {
namespace Internal {
diff --git a/src/plugins/madde/maemopublisherfremantlefree.h b/src/plugins/madde/maemopublisherfremantlefree.h
index 298612fba5..39a692e964 100644
--- a/src/plugins/madde/maemopublisherfremantlefree.h
+++ b/src/plugins/madde/maemopublisherfremantlefree.h
@@ -32,7 +32,7 @@
#ifndef MAEMOPUBLISHERFREMANTLEFREE_H
#define MAEMOPUBLISHERFREMANTLEFREE_H
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QObject>
#include <QProcess>
@@ -45,7 +45,7 @@ namespace Qt4ProjectManager {
class Qt4BuildConfiguration;
}
-namespace Utils {
+namespace QSsh {
class SshRemoteProcessRunner;
}
@@ -118,9 +118,9 @@ private:
State m_state;
QString m_tmpProjectDir;
QProcess *m_process;
- Utils::SshConnectionParameters m_sshParams;
+ QSsh::SshConnectionParameters m_sshParams;
QString m_remoteDir;
- Utils::SshRemoteProcessRunner *m_uploader;
+ QSsh::SshRemoteProcessRunner *m_uploader;
QByteArray m_scpOutput;
QList<QString> m_filesToUpload;
QString m_resultString;
diff --git a/src/plugins/madde/maemoqemumanager.h b/src/plugins/madde/maemoqemumanager.h
index a5c61b7899..1c6c635a79 100644
--- a/src/plugins/madde/maemoqemumanager.h
+++ b/src/plugins/madde/maemoqemumanager.h
@@ -45,10 +45,6 @@
QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QStringList)
-namespace Utils {
-class FileSystemWatcher;
-}
-
namespace ProjectExplorer {
class BuildConfiguration;
class Project;
@@ -56,13 +52,9 @@ class RunConfiguration;
class Target;
}
-namespace QtSupport {
-class BaseQtVersion;
-}
-
-namespace RemoteLinux {
-class RemoteLinuxRunConfiguration;
-}
+namespace QtSupport { class BaseQtVersion; }
+namespace RemoteLinux { class RemoteLinuxRunConfiguration; }
+namespace Utils { class FileSystemWatcher; }
namespace Madde {
namespace Internal {
diff --git a/src/plugins/madde/maemoremotecopyfacility.cpp b/src/plugins/madde/maemoremotecopyfacility.cpp
index 574a2efcba..3a267e591c 100644
--- a/src/plugins/madde/maemoremotecopyfacility.cpp
+++ b/src/plugins/madde/maemoremotecopyfacility.cpp
@@ -34,13 +34,13 @@
#include "maemoglobal.h"
#include <remotelinux/linuxdeviceconfiguration.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QDir>
using namespace RemoteLinux;
-using namespace Utils;
+using namespace QSsh;
namespace Madde {
namespace Internal {
diff --git a/src/plugins/madde/maemoremotecopyfacility.h b/src/plugins/madde/maemoremotecopyfacility.h
index 2a19950e5d..b0b4c51fab 100644
--- a/src/plugins/madde/maemoremotecopyfacility.h
+++ b/src/plugins/madde/maemoremotecopyfacility.h
@@ -40,7 +40,7 @@
#include <QSharedPointer>
#include <QString>
-namespace Utils {
+namespace QSsh {
class SshConnection;
class SshRemoteProcessRunner;
}
@@ -59,7 +59,7 @@ public:
explicit MaemoRemoteCopyFacility(QObject *parent = 0);
~MaemoRemoteCopyFacility();
- void copyFiles(const QSharedPointer<Utils::SshConnection> &connection,
+ void copyFiles(const QSharedPointer<QSsh::SshConnection> &connection,
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf,
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
void cancel();
@@ -81,8 +81,8 @@ private:
void copyNextFile();
void setFinished();
- Utils::SshRemoteProcessRunner *m_copyRunner;
- Utils::SshRemoteProcessRunner *m_killProcess;
+ QSsh::SshRemoteProcessRunner *m_copyRunner;
+ QSsh::SshRemoteProcessRunner *m_killProcess;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
QList<RemoteLinux::DeployableFile> m_deployables;
QString m_mountPoint;
diff --git a/src/plugins/madde/maemoremotemounter.cpp b/src/plugins/madde/maemoremotemounter.cpp
index c8de89c90a..fec15a2e8a 100644
--- a/src/plugins/madde/maemoremotemounter.cpp
+++ b/src/plugins/madde/maemoremotemounter.cpp
@@ -35,8 +35,8 @@
#include "maemoglobal.h"
#include "qt4maemotarget.h"
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/baseqtversion.h>
#include <remotelinux/linuxdeviceconfiguration.h>
@@ -47,6 +47,7 @@
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
+using namespace QSsh;
using namespace Utils;
namespace Madde {
diff --git a/src/plugins/madde/maemoremotemounter.h b/src/plugins/madde/maemoremotemounter.h
index 8c4fa5c00d..5644d40712 100644
--- a/src/plugins/madde/maemoremotemounter.h
+++ b/src/plugins/madde/maemoremotemounter.h
@@ -43,13 +43,13 @@
QT_FORWARD_DECLARE_CLASS(QTimer)
-namespace Utils {
-class PortList;
+namespace QSsh {
class SftpChannel;
class SshConnection;
class SshRemoteProcess;
}
+namespace Utils { class PortList; }
namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
namespace RemoteLinux {
@@ -68,7 +68,7 @@ public:
~MaemoRemoteMounter();
// Must already be connected.
- void setConnection(const QSharedPointer<Utils::SshConnection> &connection,
+ void setConnection(const QSharedPointer<QSsh::SshConnection> &connection,
const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &devConf);
void setBuildConfiguration(const Qt4ProjectManager::Qt4BuildConfiguration *bc);
@@ -123,11 +123,11 @@ private:
int remotePort;
};
- QSharedPointer<Utils::SshConnection> m_connection;
+ QSharedPointer<QSsh::SshConnection> m_connection;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_devConf;
QList<MountInfo> m_mountSpecs;
- QSharedPointer<Utils::SshRemoteProcess> m_mountProcess;
- QSharedPointer<Utils::SshRemoteProcess> m_unmountProcess;
+ QSharedPointer<QSsh::SshRemoteProcess> m_mountProcess;
+ QSharedPointer<QSsh::SshRemoteProcess> m_unmountProcess;
typedef QSharedPointer<QProcess> ProcPtr;
QList<ProcPtr> m_utfsServers;
diff --git a/src/plugins/madde/maemorunconfiguration.cpp b/src/plugins/madde/maemorunconfiguration.cpp
index c71bb6ba28..d548b49735 100644
--- a/src/plugins/madde/maemorunconfiguration.cpp
+++ b/src/plugins/madde/maemorunconfiguration.cpp
@@ -42,7 +42,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <utils/portlist.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QDir>
#include <QFileInfo>
diff --git a/src/plugins/madde/maemosshrunner.cpp b/src/plugins/madde/maemosshrunner.cpp
index 219b93515a..5d29a169fb 100644
--- a/src/plugins/madde/maemosshrunner.cpp
+++ b/src/plugins/madde/maemosshrunner.cpp
@@ -38,11 +38,11 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <remotelinux/linuxdeviceconfiguration.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
-using namespace Utils;
+using namespace QSsh;
namespace Madde {
namespace Internal {
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp
index 33433d61f8..70d45ff453 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp
+++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp
@@ -36,8 +36,8 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshconnectionmanager.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshconnectionmanager.h>
#include <QDateTime>
#include <QFileInfo>
@@ -45,7 +45,7 @@
#include <QString>
using namespace Qt4ProjectManager;
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
@@ -263,7 +263,7 @@ void AbstractRemoteLinuxDeployService::handleDeviceSetupDone(bool success)
d->state = Connecting;
d->connection = SshConnectionManager::instance().acquireConnection(d->deviceConfiguration->sshParameters());
- connect(d->connection.data(), SIGNAL(error(Utils::SshError)),
+ connect(d->connection.data(), SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionFailure()));
if (d->connection->state() == SshConnection::Connected) {
handleConnected();
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h
index e0f4fb5d3f..8ea3120c8b 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h
+++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h
@@ -39,7 +39,7 @@
#include <QVariantMap>
QT_FORWARD_DECLARE_CLASS(QString)
-namespace Utils { class SshConnection; }
+namespace QSsh { class SshConnection; }
namespace Qt4ProjectManager {
class Qt4BuildConfiguration;
@@ -82,7 +82,7 @@ signals:
protected:
const Qt4ProjectManager::Qt4BuildConfiguration *qt4BuildConfiguration() const;
QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const;
- QSharedPointer<Utils::SshConnection> connection() const;
+ QSharedPointer<QSsh::SshConnection> connection() const;
void saveDeploymentTimeStamp(const DeployableFile &deployableFile);
bool hasChangedSinceLastDeployment(const DeployableFile &deployableFile) const;
diff --git a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp
index cc70ffb79b..a7fc3dc9b4 100644
--- a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp
+++ b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp
@@ -37,7 +37,7 @@
#include "remotelinuxpackageinstaller.h"
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QFileInfo>
#include <QString>
diff --git a/src/plugins/remotelinux/genericdirectuploadservice.cpp b/src/plugins/remotelinux/genericdirectuploadservice.cpp
index 72a0e6aec0..74ada44f94 100644
--- a/src/plugins/remotelinux/genericdirectuploadservice.cpp
+++ b/src/plugins/remotelinux/genericdirectuploadservice.cpp
@@ -34,16 +34,16 @@
#include "deployablefile.h"
#include <utils/qtcassert.h>
-#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 <QDir>
#include <QFileInfo>
#include <QList>
#include <QString>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
@@ -131,8 +131,8 @@ void GenericDirectUploadService::handleSftpInitialized()
}
Q_ASSERT(!d->filesToUpload.isEmpty());
- connect(d->uploader.data(), SIGNAL(finished(Utils::SftpJobId,QString)),
- SLOT(handleUploadFinished(Utils::SftpJobId,QString)));
+ connect(d->uploader.data(), SIGNAL(finished(QSsh::SftpJobId,QString)),
+ SLOT(handleUploadFinished(QSsh::SftpJobId,QString)));
d->state = Uploading;
uploadNextFile();
}
@@ -146,7 +146,7 @@ void GenericDirectUploadService::handleSftpInitializationFailed(const QString &m
handleDeploymentDone();
}
-void GenericDirectUploadService::handleUploadFinished(Utils::SftpJobId jobId, const QString &errorMsg)
+void GenericDirectUploadService::handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg)
{
Q_UNUSED(jobId);
diff --git a/src/plugins/remotelinux/genericdirectuploadservice.h b/src/plugins/remotelinux/genericdirectuploadservice.h
index 320afb6a45..1f697ca98a 100644
--- a/src/plugins/remotelinux/genericdirectuploadservice.h
+++ b/src/plugins/remotelinux/genericdirectuploadservice.h
@@ -35,7 +35,7 @@
#include "abstractremotelinuxdeployservice.h"
#include "remotelinux_export.h"
-#include <utils/ssh/sftpdefs.h>
+#include <ssh/sftpdefs.h>
#include <QList>
@@ -66,7 +66,7 @@ public:
private slots:
void handleSftpInitialized();
void handleSftpInitializationFailed(const QString &errorMessage);
- void handleUploadFinished(Utils::SftpJobId jobId, const QString &errorMsg);
+ void handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg);
void handleMkdirFinished(int exitStatus);
void handleLnFinished(int exitStatus);
void handleStdOutData();
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
index 3a270c7490..f7e4850d15 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
@@ -33,12 +33,13 @@
#include "ui_genericlinuxdeviceconfigurationwidget.h"
#include <utils/portlist.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshkeycreationdialog.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshkeycreationdialog.h>
#include <QTextStream>
using namespace RemoteLinux;
+using namespace QSsh;
using namespace Utils;
GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp
index 6d8be5cd03..764a4d5761 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp
@@ -38,7 +38,7 @@
#include <utils/portlist.h>
using namespace ProjectExplorer;
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
@@ -76,7 +76,7 @@ GenericLinuxDeviceConfigurationWizard::~GenericLinuxDeviceConfigurationWizard()
IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
{
- Utils::SshConnectionParameters sshParams;
+ QSsh::SshConnectionParameters sshParams;
sshParams.host = d->setupPage.hostName();
sshParams.userName = d->setupPage.userName();
sshParams.port = 22;
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp
index b4ba390c6d..e7ea64e155 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp
@@ -50,6 +50,7 @@ public:
} // namespace Internal
+using namespace QSsh;
using namespace Utils;
GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationWizardSetupPage(QWidget *parent) :
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h
index e5b22c5feb..71930503c3 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h
@@ -33,7 +33,7 @@
#include "remotelinux_export.h"
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QWizardPage>
@@ -57,7 +57,7 @@ public:
QString configurationName() const;
QString hostName() const;
QString userName() const;
- Utils::SshConnectionParameters::AuthenticationType authenticationType() const;
+ QSsh::SshConnectionParameters::AuthenticationType authenticationType() const;
QString password() const;
QString privateKeyFilePath() const;
diff --git a/src/plugins/remotelinux/linuxdeviceconfiguration.cpp b/src/plugins/remotelinux/linuxdeviceconfiguration.cpp
index a478926755..d05fc3a23a 100644
--- a/src/plugins/remotelinux/linuxdeviceconfiguration.cpp
+++ b/src/plugins/remotelinux/linuxdeviceconfiguration.cpp
@@ -39,13 +39,15 @@
#include "remotelinux_constants.h"
#include <utils/portlist.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <utils/qtcassert.h>
#include <QDesktopServices>
#include <QStringList>
+using namespace QSsh;
using namespace Utils;
+
typedef SshConnectionParameters::AuthenticationType AuthType;
namespace RemoteLinux {
diff --git a/src/plugins/remotelinux/linuxdeviceconfiguration.h b/src/plugins/remotelinux/linuxdeviceconfiguration.h
index 6fa22eb9be..ab9bcdceed 100644
--- a/src/plugins/remotelinux/linuxdeviceconfiguration.h
+++ b/src/plugins/remotelinux/linuxdeviceconfiguration.h
@@ -38,10 +38,8 @@
#include <QCoreApplication>
-namespace Utils {
-class SshConnectionParameters;
-class PortList;
-}
+namespace QSsh { class SshConnectionParameters; }
+namespace Utils { class PortList; }
namespace RemoteLinux {
namespace Internal {
@@ -60,10 +58,10 @@ public:
~LinuxDeviceConfiguration();
Utils::PortList freePorts() const;
- Utils::SshConnectionParameters sshParameters() const;
+ QSsh::SshConnectionParameters sshParameters() const;
MachineType machineType() const;
- void setSshParameters(const Utils::SshConnectionParameters &sshParameters);
+ void setSshParameters(const QSsh::SshConnectionParameters &sshParameters);
void setFreePorts(const Utils::PortList &freePorts);
static QString defaultPrivateKeyFilePath();
diff --git a/src/plugins/remotelinux/linuxdevicetester.cpp b/src/plugins/remotelinux/linuxdevicetester.cpp
index e7b32afa51..6a9845e8dc 100644
--- a/src/plugins/remotelinux/linuxdevicetester.cpp
+++ b/src/plugins/remotelinux/linuxdevicetester.cpp
@@ -35,10 +35,10 @@
#include "remotelinuxusedportsgatherer.h"
#include <utils/qtcassert.h>
-#include <utils/ssh/sshremoteprocess.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
@@ -86,7 +86,7 @@ void GenericLinuxDeviceTester::testDevice(const LinuxDeviceConfiguration::ConstP
d->deviceConfiguration = deviceConfiguration;
d->connection = SshConnection::create(deviceConfiguration->sshParameters());
connect(d->connection.data(), SIGNAL(connected()), SLOT(handleConnected()));
- connect(d->connection.data(), SIGNAL(error(Utils::SshError)),
+ connect(d->connection.data(), SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionFailure()));
emit progressMessage(tr("Connecting to host..."));
diff --git a/src/plugins/remotelinux/linuxdevicetester.h b/src/plugins/remotelinux/linuxdevicetester.h
index 7e2ef787ab..58a3f10ed7 100644
--- a/src/plugins/remotelinux/linuxdevicetester.h
+++ b/src/plugins/remotelinux/linuxdevicetester.h
@@ -39,7 +39,7 @@
QT_FORWARD_DECLARE_CLASS(QString)
-namespace Utils {
+namespace QSsh {
class SshConnection;
}
@@ -80,7 +80,7 @@ public:
void testDevice(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration);
void stopTest();
- QSharedPointer<Utils::SshConnection> connection() const;
+ QSharedPointer<QSsh::SshConnection> connection() const;
private slots:
void handleConnected();
diff --git a/src/plugins/remotelinux/packageuploader.cpp b/src/plugins/remotelinux/packageuploader.cpp
index 4e17ad1104..fbdb058def 100644
--- a/src/plugins/remotelinux/packageuploader.cpp
+++ b/src/plugins/remotelinux/packageuploader.cpp
@@ -33,10 +33,10 @@
#include "packageuploader.h"
#include <utils/qtcassert.h>
-#include <utils/ssh/sftpchannel.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sftpchannel.h>
+#include <ssh/sshconnection.h>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
@@ -61,15 +61,15 @@ void PackageUploader::uploadPackage(const SshConnection::Ptr &connection,
m_localFilePath = localFilePath;
m_remoteFilePath = remoteFilePath;
m_connection = connection;
- connect(m_connection.data(), SIGNAL(error(Utils::SshError)),
+ connect(m_connection.data(), SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionFailure()));
m_uploader = m_connection->createSftpChannel();
connect(m_uploader.data(), SIGNAL(initialized()), this,
SLOT(handleSftpChannelInitialized()));
connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this,
SLOT(handleSftpChannelInitializationFailed(QString)));
- connect(m_uploader.data(), SIGNAL(finished(Utils::SftpJobId,QString)),
- this, SLOT(handleSftpJobFinished(Utils::SftpJobId,QString)));
+ connect(m_uploader.data(), SIGNAL(finished(QSsh::SftpJobId,QString)),
+ this, SLOT(handleSftpJobFinished(QSsh::SftpJobId,QString)));
m_uploader->initialize();
}
diff --git a/src/plugins/remotelinux/packageuploader.h b/src/plugins/remotelinux/packageuploader.h
index 3c671257bd..d29adf80b5 100644
--- a/src/plugins/remotelinux/packageuploader.h
+++ b/src/plugins/remotelinux/packageuploader.h
@@ -37,9 +37,9 @@
#include <QSharedPointer>
#include <QString>
-#include <utils/ssh/sftpdefs.h>
+#include <ssh/sftpdefs.h>
-namespace Utils {
+namespace QSsh {
class SftpChannel;
class SshConnection;
}
@@ -55,7 +55,7 @@ public:
~PackageUploader();
// Connection has to be established already.
- void uploadPackage(const QSharedPointer<Utils::SshConnection> &connection,
+ void uploadPackage(const QSharedPointer<QSsh::SshConnection> &connection,
const QString &localFilePath, const QString &remoteFilePath);
void cancelUpload();
@@ -67,7 +67,7 @@ private slots:
void handleConnectionFailure();
void handleSftpChannelInitialized();
void handleSftpChannelInitializationFailed(const QString &error);
- void handleSftpJobFinished(Utils::SftpJobId job, const QString &error);
+ void handleSftpJobFinished(QSsh::SftpJobId job, const QString &error);
private:
enum State { InitializingSftp, Uploading, Inactive };
@@ -76,8 +76,8 @@ private:
void setState(State newState);
State m_state;
- QSharedPointer<Utils::SshConnection> m_connection;
- QSharedPointer<Utils::SftpChannel> m_uploader;
+ QSharedPointer<QSsh::SshConnection> m_connection;
+ QSharedPointer<QSsh::SftpChannel> m_uploader;
QString m_localFilePath;
QString m_remoteFilePath;
};
diff --git a/src/plugins/remotelinux/publickeydeploymentdialog.cpp b/src/plugins/remotelinux/publickeydeploymentdialog.cpp
index 605e6a49a4..6b10673884 100644
--- a/src/plugins/remotelinux/publickeydeploymentdialog.cpp
+++ b/src/plugins/remotelinux/publickeydeploymentdialog.cpp
@@ -34,7 +34,7 @@
#include "sshkeydeployer.h"
#include <coreplugin/icore.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QTimer>
#include <QFileDialog>
diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs
index e3ae54956c..84e1151e0e 100644
--- a/src/plugins/remotelinux/remotelinux.qbs
+++ b/src/plugins/remotelinux/remotelinux.qbs
@@ -11,6 +11,7 @@ QtcPlugin {
Depends { name: "ProjectExplorer" }
Depends { name: "Qt4ProjectManager" }
Depends { name: "QtSupport" }
+ Depends { name: "QtcSsh" }
Depends { name: "cpp" }
cpp.includePaths: [
@@ -133,6 +134,7 @@ QtcPlugin {
ProductModule {
Depends { name: "Core" }
+ Depends { name: "QtcSsh" }
}
}
diff --git a/src/plugins/remotelinux/remotelinuxapplicationrunner.cpp b/src/plugins/remotelinux/remotelinuxapplicationrunner.cpp
index 1485db51c5..95101ec82a 100644
--- a/src/plugins/remotelinux/remotelinuxapplicationrunner.cpp
+++ b/src/plugins/remotelinux/remotelinuxapplicationrunner.cpp
@@ -37,13 +37,14 @@
#include <utils/portlist.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshconnectionmanager.h>
-#include <utils/ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshconnectionmanager.h>
+#include <ssh/sshremoteprocess.h>
#include <limits>
using namespace Qt4ProjectManager;
+using namespace QSsh;
using namespace Utils;
namespace RemoteLinux {
@@ -79,9 +80,9 @@ public:
const QString commandPrefix;
const PortList initialFreePorts;
- Utils::SshConnection::Ptr connection;
- Utils::SshRemoteProcess::Ptr runner;
- Utils::SshRemoteProcess::Ptr cleaner;
+ QSsh::SshConnection::Ptr connection;
+ QSsh::SshRemoteProcess::Ptr runner;
+ QSsh::SshRemoteProcess::Ptr cleaner;
PortList freePorts;
int exitStatus;
@@ -400,13 +401,13 @@ void AbstractRemoteLinuxApplicationRunner::handleDeviceSetupDone(bool success)
d->exitStatus = -1;
d->freePorts = d->initialFreePorts;
connect(d->connection.data(), SIGNAL(connected()), SLOT(handleConnected()));
- connect(d->connection.data(), SIGNAL(error(Utils::SshError)),
+ connect(d->connection.data(), SIGNAL(error(QSsh::SshError)),
SLOT(handleConnectionFailure()));
if (d->connection->state() == SshConnection::Connected) {
handleConnected();
} else {
emit reportProgress(tr("Connecting to device..."));
- if (d->connection->state() == Utils::SshConnection::Unconnected)
+ if (d->connection->state() == QSsh::SshConnection::Unconnected)
d->connection->connectToHost();
}
}
diff --git a/src/plugins/remotelinux/remotelinuxapplicationrunner.h b/src/plugins/remotelinux/remotelinuxapplicationrunner.h
index 92f2b053c0..0961b9ab1a 100644
--- a/src/plugins/remotelinux/remotelinuxapplicationrunner.h
+++ b/src/plugins/remotelinux/remotelinuxapplicationrunner.h
@@ -36,10 +36,8 @@
#include <QObject>
#include <QSharedPointer>
-namespace Utils {
-class PortList;
-class SshConnection;
-}
+namespace QSsh { class SshConnection; }
+namespace Utils { class PortList; }
namespace RemoteLinux {
class LinuxDeviceConfiguration;
@@ -64,7 +62,7 @@ public:
void startExecution(const QByteArray &remoteCall);
- QSharedPointer<Utils::SshConnection> connection() const;
+ QSharedPointer<QSsh::SshConnection> connection() const;
QSharedPointer<const LinuxDeviceConfiguration> devConfig() const;
const RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
Utils::PortList *freePorts();
diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
index 29653c84bd..11d2bc435b 100644
--- a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
+++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp
@@ -34,11 +34,11 @@
#include "linuxdeviceconfiguration.h"
#include <utils/qtcassert.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QString>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index 73344d11bc..176df268e5 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -47,7 +47,7 @@
#include <QPointer>
#include <QSharedPointer>
-using namespace Utils;
+using namespace QSsh;
using namespace Debugger;
using namespace ProjectExplorer;
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp
index 0703e97b0c..5fd0213aed 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp
+++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp
@@ -33,7 +33,7 @@
#include "linuxdeviceconfiguration.h"
#include "remotelinuxrunconfiguration.h"
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
namespace RemoteLinux {
namespace Internal {
@@ -60,7 +60,7 @@ void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
return;
m_stop = false;
if (!m_remoteProcessRunner)
- m_remoteProcessRunner = new Utils::SshRemoteProcessRunner(this);
+ m_remoteProcessRunner = new QSsh::SshRemoteProcessRunner(this);
connect(m_remoteProcessRunner, SIGNAL(connectionError()), SLOT(handleConnectionFailure()));
connect(m_remoteProcessRunner, SIGNAL(processClosed(int)), SLOT(remoteProcessFinished(int)));
connect(m_remoteProcessRunner, SIGNAL(processOutputAvailable(QByteArray)),
@@ -102,16 +102,16 @@ void RemoteLinuxEnvironmentReader::handleCurrentDeviceConfigChanged()
void RemoteLinuxEnvironmentReader::remoteProcessFinished(int exitCode)
{
- Q_ASSERT(exitCode == Utils::SshRemoteProcess::FailedToStart
- || exitCode == Utils::SshRemoteProcess::KilledBySignal
- || exitCode == Utils::SshRemoteProcess::ExitedNormally);
+ Q_ASSERT(exitCode == QSsh::SshRemoteProcess::FailedToStart
+ || exitCode == QSsh::SshRemoteProcess::KilledBySignal
+ || exitCode == QSsh::SshRemoteProcess::ExitedNormally);
if (m_stop)
return;
disconnect(m_remoteProcessRunner, 0, this, 0);
m_env.clear();
- if (exitCode == Utils::SshRemoteProcess::ExitedNormally) {
+ if (exitCode == QSsh::SshRemoteProcess::ExitedNormally) {
if (!m_remoteOutput.isEmpty()) {
m_env = Utils::Environment(m_remoteOutput.split(QLatin1Char('\n'),
QString::SkipEmptyParts));
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.h b/src/plugins/remotelinux/remotelinuxenvironmentreader.h
index 5e80faf697..7f49be8edb 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentreader.h
+++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.h
@@ -37,7 +37,7 @@
#include <QObject>
#include <QSharedPointer>
-namespace Utils {
+namespace QSsh {
class SshRemoteProcessRunner;
}
@@ -80,7 +80,7 @@ private:
Utils::Environment m_env;
QSharedPointer<const LinuxDeviceConfiguration> m_devConfig;
RemoteLinuxRunConfiguration *m_runConfig;
- Utils::SshRemoteProcessRunner *m_remoteProcessRunner;
+ QSsh::SshRemoteProcessRunner *m_remoteProcessRunner;
};
} // namespace Internal
diff --git a/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp b/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp
index b2c7d20c3a..3a060d2185 100644
--- a/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp
+++ b/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp
@@ -34,11 +34,11 @@
#include "linuxdeviceconfiguration.h"
#include <utils/qtcassert.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QByteArray>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
@@ -50,8 +50,8 @@ public:
bool isRunning;
LinuxDeviceConfiguration::ConstPtr deviceConfig;
- Utils::SshRemoteProcessRunner *installer;
- Utils::SshRemoteProcessRunner *killProcess;
+ QSsh::SshRemoteProcessRunner *installer;
+ QSsh::SshRemoteProcessRunner *killProcess;
};
} // namespace Internal
diff --git a/src/plugins/remotelinux/remotelinuxprocesslist.cpp b/src/plugins/remotelinux/remotelinuxprocesslist.cpp
index 29c4deb321..347f17d0f8 100644
--- a/src/plugins/remotelinux/remotelinuxprocesslist.cpp
+++ b/src/plugins/remotelinux/remotelinuxprocesslist.cpp
@@ -33,12 +33,12 @@
#include "linuxdeviceconfiguration.h"
#include <utils/qtcassert.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QByteArray>
#include <QString>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index 03e935c8c4..f39af40b42 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -51,6 +51,7 @@
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
+using namespace QSsh;
using namespace Utils;
namespace RemoteLinux {
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.h b/src/plugins/remotelinux/remotelinuxrunconfiguration.h
index 77ad9b16e3..55ae2a740a 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.h
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.h
@@ -44,9 +44,7 @@ class Qt4BaseTarget;
class Qt4ProFileNode;
} // namespace Qt4ProjectManager
-namespace Utils {
-class PortList;
-}
+namespace Utils { class PortList; }
namespace RemoteLinux {
class LinuxDeviceConfiguration;
diff --git a/src/plugins/remotelinux/remotelinuxusedportsgatherer.cpp b/src/plugins/remotelinux/remotelinuxusedportsgatherer.cpp
index 23c442b52d..5dc94bbc68 100644
--- a/src/plugins/remotelinux/remotelinuxusedportsgatherer.cpp
+++ b/src/plugins/remotelinux/remotelinuxusedportsgatherer.cpp
@@ -34,12 +34,13 @@
#include <utils/portlist.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshconnectionmanager.h>
-#include <utils/ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshconnectionmanager.h>
+#include <ssh/sshremoteprocess.h>
#include <QString>
+using namespace QSsh;
using namespace Utils;
namespace RemoteLinux {
@@ -75,7 +76,7 @@ void RemoteLinuxUsedPortsGatherer::start(const LinuxDeviceConfiguration::ConstPt
QTC_ASSERT(!d->connection, return);
d->portsToCheck = devConf->freePorts();
d->connection = SshConnectionManager::instance().acquireConnection(devConf->sshParameters());
- connect(d->connection.data(), SIGNAL(error(Utils::SshError)), SLOT(handleConnectionError()));
+ connect(d->connection.data(), SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
if (d->connection->state() == SshConnection::Connected) {
handleConnectionEstablished();
return;
diff --git a/src/plugins/remotelinux/sshkeydeployer.cpp b/src/plugins/remotelinux/sshkeydeployer.cpp
index 955373c266..fcdd31a8dd 100644
--- a/src/plugins/remotelinux/sshkeydeployer.cpp
+++ b/src/plugins/remotelinux/sshkeydeployer.cpp
@@ -30,13 +30,13 @@
**************************************************************************/
#include "sshkeydeployer.h"
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <utils/fileutils.h>
#include <QFile>
#include <QSharedPointer>
-using namespace Utils;
+using namespace QSsh;
namespace RemoteLinux {
namespace Internal {
diff --git a/src/plugins/remotelinux/sshkeydeployer.h b/src/plugins/remotelinux/sshkeydeployer.h
index 5debd0e194..28c9d262eb 100644
--- a/src/plugins/remotelinux/sshkeydeployer.h
+++ b/src/plugins/remotelinux/sshkeydeployer.h
@@ -35,7 +35,7 @@
#include <QObject>
-namespace Utils {
+namespace QSsh {
class SshConnectionParameters;
}
@@ -52,7 +52,7 @@ public:
explicit SshKeyDeployer(QObject *parent = 0);
~SshKeyDeployer();
- void deployPublicKey(const Utils::SshConnectionParameters &sshParams,
+ void deployPublicKey(const QSsh::SshConnectionParameters &sshParams,
const QString &keyFilePath);
void stopDeployment();
diff --git a/src/plugins/remotelinux/startgdbserverdialog.cpp b/src/plugins/remotelinux/startgdbserverdialog.cpp
index 2723658693..9cc6d5d06c 100644
--- a/src/plugins/remotelinux/startgdbserverdialog.cpp
+++ b/src/plugins/remotelinux/startgdbserverdialog.cpp
@@ -43,8 +43,8 @@
#include <utils/pathchooser.h>
#include <utils/portlist.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocessrunner.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocessrunner.h>
#include <QVariant>
#include <QSettings>
@@ -70,6 +70,7 @@
using namespace Core;
using namespace ProjectExplorer;
+using namespace QSsh;
using namespace Utils;
const char LastSysroot[] = "RemoteLinux/LastSysroot";
diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp
index ea765081bf..8cbd1a124d 100644
--- a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp
+++ b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp
@@ -38,7 +38,7 @@
#include <valgrindprocess.h>
#include <utils/qtcassert.h>
-#include <utils/ssh/sftpchannel.h>
+#include <ssh/sftpchannel.h>
#include <QTemporaryFile>
@@ -236,8 +236,8 @@ void CallgrindController::foundRemoteFile()
m_remoteFile = m_findRemoteFile->readAllStandardOutput().trimmed();
m_sftp = m_ssh->createSftpChannel();
- connect(m_sftp.data(), SIGNAL(finished(Utils::SftpJobId,QString)),
- this, SLOT(sftpJobFinished(Utils::SftpJobId,QString)));
+ connect(m_sftp.data(), SIGNAL(finished(QSsh::SftpJobId,QString)),
+ this, SLOT(sftpJobFinished(QSsh::SftpJobId,QString)));
connect(m_sftp.data(), SIGNAL(initialized()), this, SLOT(sftpInitialized()));
m_sftp->initialize();
}
@@ -251,10 +251,10 @@ void CallgrindController::sftpInitialized()
dataFile.setAutoRemove(false);
dataFile.close();
- m_downloadJob = m_sftp->downloadFile(m_remoteFile, m_tempDataFile, Utils::SftpOverwriteExisting);
+ m_downloadJob = m_sftp->downloadFile(m_remoteFile, m_tempDataFile, QSsh::SftpOverwriteExisting);
}
-void CallgrindController::sftpJobFinished(Utils::SftpJobId job, const QString &error)
+void CallgrindController::sftpJobFinished(QSsh::SftpJobId job, const QString &error)
{
QTC_ASSERT(job == m_downloadJob, return);
diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.h b/src/plugins/valgrind/callgrind/callgrindcontroller.h
index a8b66f7418..55bc6134ea 100644
--- a/src/plugins/valgrind/callgrind/callgrindcontroller.h
+++ b/src/plugins/valgrind/callgrind/callgrindcontroller.h
@@ -37,9 +37,9 @@
#include <qprocess.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocess.h>
-#include <utils/ssh/sftpchannel.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
+#include <ssh/sftpchannel.h>
namespace Valgrind {
@@ -89,7 +89,7 @@ private Q_SLOTS:
void foundRemoteFile();
void sftpInitialized();
- void sftpJobFinished(Utils::SftpJobId job, const QString &error);
+ void sftpJobFinished(QSsh::SftpJobId job, const QString &error);
private:
void cleanupTempFile();
@@ -102,11 +102,11 @@ private:
Option m_lastOption;
// remote callgrind support
- Utils::SshConnection::Ptr m_ssh;
+ QSsh::SshConnection::Ptr m_ssh;
QString m_tempDataFile;
- Utils::SshRemoteProcess::Ptr m_findRemoteFile;
- Utils::SftpChannel::Ptr m_sftp;
- Utils::SftpJobId m_downloadJob;
+ QSsh::SshRemoteProcess::Ptr m_findRemoteFile;
+ QSsh::SftpChannel::Ptr m_sftp;
+ QSsh::SftpJobId m_downloadJob;
QByteArray m_remoteFile;
};
diff --git a/src/plugins/valgrind/valgrindprocess.cpp b/src/plugins/valgrind/valgrindprocess.cpp
index b85a720487..b739f35a5a 100644
--- a/src/plugins/valgrind/valgrindprocess.cpp
+++ b/src/plugins/valgrind/valgrindprocess.cpp
@@ -148,7 +148,7 @@ void LocalValgrindProcess::readyReadStandardOutput()
////////////////////////
-RemoteValgrindProcess::RemoteValgrindProcess(const Utils::SshConnectionParameters &sshParams,
+RemoteValgrindProcess::RemoteValgrindProcess(const QSsh::SshConnectionParameters &sshParams,
QObject *parent)
: ValgrindProcess(parent)
, m_params(sshParams)
@@ -156,7 +156,7 @@ RemoteValgrindProcess::RemoteValgrindProcess(const Utils::SshConnectionParameter
, m_pid(0)
{}
-RemoteValgrindProcess::RemoteValgrindProcess(const Utils::SshConnection::Ptr &connection, QObject *parent)
+RemoteValgrindProcess::RemoteValgrindProcess(const QSsh::SshConnection::Ptr &connection, QObject *parent)
: ValgrindProcess(parent)
, m_params(connection->connectionParameters())
, m_connection(connection)
@@ -179,14 +179,14 @@ void RemoteValgrindProcess::run(const QString &valgrindExecutable, const QString
// connect to host and wait for connection
if (!m_connection)
- m_connection = Utils::SshConnection::create(m_params);
+ m_connection = QSsh::SshConnection::create(m_params);
- if (m_connection->state() != Utils::SshConnection::Connected) {
+ if (m_connection->state() != QSsh::SshConnection::Connected) {
connect(m_connection.data(), SIGNAL(connected()),
this, SLOT(connected()));
- connect(m_connection.data(), SIGNAL(error(Utils::SshError)),
- this, SLOT(error(Utils::SshError)));
- if (m_connection->state() == Utils::SshConnection::Unconnected)
+ connect(m_connection.data(), SIGNAL(error(QSsh::SshError)),
+ this, SLOT(error(QSsh::SshError)));
+ if (m_connection->state() == QSsh::SshConnection::Unconnected)
m_connection->connectToHost();
} else {
connected();
@@ -195,7 +195,7 @@ void RemoteValgrindProcess::run(const QString &valgrindExecutable, const QString
void RemoteValgrindProcess::connected()
{
- QTC_ASSERT(m_connection->state() == Utils::SshConnection::Connected, return);
+ QTC_ASSERT(m_connection->state() == QSsh::SshConnection::Connected, return);
// connected, run command
QString cmd;
@@ -219,14 +219,14 @@ void RemoteValgrindProcess::connected()
m_process->start();
}
-Utils::SshConnection::Ptr RemoteValgrindProcess::connection() const
+QSsh::SshConnection::Ptr RemoteValgrindProcess::connection() const
{
return m_connection;
}
void RemoteValgrindProcess::processStarted()
{
- QTC_ASSERT(m_connection->state() == Utils::SshConnection::Connected, return);
+ QTC_ASSERT(m_connection->state() == QSsh::SshConnection::Connected, return);
// find out what PID our process has
@@ -278,10 +278,10 @@ void RemoteValgrindProcess::standardError()
emit processOutput(m_process->readAllStandardError(), Utils::StdErrFormat);
}
-void RemoteValgrindProcess::error(Utils::SshError error)
+void RemoteValgrindProcess::error(QSsh::SshError error)
{
switch (error) {
- case Utils::SshTimeoutError:
+ case QSsh::SshTimeoutError:
m_error = QProcess::Timedout;
break;
default:
@@ -294,7 +294,7 @@ void RemoteValgrindProcess::error(Utils::SshError error)
void RemoteValgrindProcess::close()
{
- QTC_ASSERT(m_connection->state() == Utils::SshConnection::Connected, return);
+ QTC_ASSERT(m_connection->state() == QSsh::SshConnection::Connected, return);
if (m_process) {
if (m_pid) {
const QString killTemplate = QString("kill -%2 %1" // kill
@@ -304,7 +304,7 @@ void RemoteValgrindProcess::close()
const QString brutalKill = killTemplate.arg("SIGKILL");
const QString remoteCall = niceKill + QLatin1String("; sleep 1; ") + brutalKill;
- Utils::SshRemoteProcess::Ptr cleanup = m_connection->createRemoteProcess(remoteCall.toUtf8());
+ QSsh::SshRemoteProcess::Ptr cleanup = m_connection->createRemoteProcess(remoteCall.toUtf8());
cleanup->start();
}
}
@@ -315,12 +315,12 @@ void RemoteValgrindProcess::closed(int status)
QTC_ASSERT(m_process, return);
m_errorString = m_process->errorString();
- if (status == Utils::SshRemoteProcess::FailedToStart) {
+ if (status == QSsh::SshRemoteProcess::FailedToStart) {
m_error = QProcess::FailedToStart;
emit ValgrindProcess::error(QProcess::FailedToStart);
- } else if (status == Utils::SshRemoteProcess::ExitedNormally) {
+ } else if (status == QSsh::SshRemoteProcess::ExitedNormally) {
emit finished(m_process->exitCode(), QProcess::NormalExit);
- } else if (status == Utils::SshRemoteProcess::KilledBySignal) {
+ } else if (status == QSsh::SshRemoteProcess::KilledBySignal) {
m_error = QProcess::Crashed;
emit finished(m_process->exitCode(), QProcess::CrashExit);
}
diff --git a/src/plugins/valgrind/valgrindprocess.h b/src/plugins/valgrind/valgrindprocess.h
index 857ead960e..18927f47b1 100644
--- a/src/plugins/valgrind/valgrindprocess.h
+++ b/src/plugins/valgrind/valgrindprocess.h
@@ -36,8 +36,8 @@
#define VALGRIND_RUNNER_P_H
#include <utils/qtcprocess.h>
-#include <utils/ssh/sshremoteprocess.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
#include <utils/outputformat.h>
namespace Valgrind {
@@ -118,9 +118,9 @@ class RemoteValgrindProcess : public ValgrindProcess
Q_OBJECT
public:
- explicit RemoteValgrindProcess(const Utils::SshConnectionParameters &sshParams,
+ explicit RemoteValgrindProcess(const QSsh::SshConnectionParameters &sshParams,
QObject *parent = 0);
- explicit RemoteValgrindProcess(const Utils::SshConnection::Ptr &connection,
+ explicit RemoteValgrindProcess(const QSsh::SshConnection::Ptr &connection,
QObject *parent = 0);
virtual bool isRunning() const;
@@ -139,21 +139,21 @@ public:
virtual qint64 pid() const;
- Utils::SshConnection::Ptr connection() const;
+ QSsh::SshConnection::Ptr connection() const;
private slots:
void closed(int);
void connected();
- void error(Utils::SshError error);
+ void error(QSsh::SshError error);
void processStarted();
void findPIDOutputReceived();
void standardOutput();
void standardError();
private:
- Utils::SshConnectionParameters m_params;
- Utils::SshConnection::Ptr m_connection;
- Utils::SshRemoteProcess::Ptr m_process;
+ QSsh::SshConnectionParameters m_params;
+ QSsh::SshConnection::Ptr m_connection;
+ QSsh::SshRemoteProcess::Ptr m_process;
QString m_workingDir;
QString m_valgrindExe;
QStringList m_valgrindArgs;
@@ -162,7 +162,7 @@ private:
QString m_errorString;
QProcess::ProcessError m_error;
qint64 m_pid;
- Utils::SshRemoteProcess::Ptr m_findPID;
+ QSsh::SshRemoteProcess::Ptr m_findPID;
};
} // namespace Valgrind
diff --git a/src/plugins/valgrind/valgrindrunner.cpp b/src/plugins/valgrind/valgrindrunner.cpp
index 25a0c8aad0..5900c28b52 100644
--- a/src/plugins/valgrind/valgrindrunner.cpp
+++ b/src/plugins/valgrind/valgrindrunner.cpp
@@ -38,8 +38,8 @@
#include <utils/qtcassert.h>
#include <utils/environment.h>
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocess.h>
+#include <ssh/sshconnection.h>
+#include <ssh/sshremoteprocess.h>
#include <QEventLoop>
@@ -70,7 +70,7 @@ public:
QString debuggeeArguments;
QString workingdir;
Analyzer::StartMode startMode;
- Utils::SshConnectionParameters connParams;
+ QSsh::SshConnectionParameters connParams;
};
void ValgrindRunner::Private::run(ValgrindProcess *_process)
@@ -178,12 +178,12 @@ void ValgrindRunner::setStartMode(Analyzer::StartMode startMode)
d->startMode = startMode;
}
-const Utils::SshConnectionParameters &ValgrindRunner::connectionParameters() const
+const QSsh::SshConnectionParameters &ValgrindRunner::connectionParameters() const
{
return d->connParams;
}
-void ValgrindRunner::setConnectionParameters(const Utils::SshConnectionParameters &connParams)
+void ValgrindRunner::setConnectionParameters(const QSsh::SshConnectionParameters &connParams)
{
d->connParams = connParams;
}
diff --git a/src/plugins/valgrind/valgrindrunner.h b/src/plugins/valgrind/valgrindrunner.h
index 1531024cef..12917c930c 100644
--- a/src/plugins/valgrind/valgrindrunner.h
+++ b/src/plugins/valgrind/valgrindrunner.h
@@ -38,7 +38,7 @@
#include <analyzerbase/analyzerconstants.h>
#include <utils/outputformat.h>
-#include <utils/ssh/sshconnection.h>
+#include <ssh/sshconnection.h>
#include <QProcess>
@@ -76,8 +76,8 @@ public:
void setStartMode(Analyzer::StartMode startMode);
Analyzer::StartMode startMode() const;
- void setConnectionParameters(const Utils::SshConnectionParameters &connParams);
- const Utils::SshConnectionParameters &connectionParameters() const;
+ void setConnectionParameters(const QSsh::SshConnectionParameters &connParams);
+ const QSsh::SshConnectionParameters &connectionParameters() const;
void waitForFinished() const;