forked from qt-creator/qt-creator
move src/plugins/coreplugin/ssh to src/lib/utils/ssh
Merge-request: 253 Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -3,6 +3,7 @@ CONFIG += ordered
|
||||
QT += core gui
|
||||
|
||||
SUBDIRS = \
|
||||
3rdparty \
|
||||
qtconcurrent \
|
||||
aggregation \
|
||||
extensionsystem \
|
||||
@@ -13,8 +14,7 @@ SUBDIRS = \
|
||||
qmljs \
|
||||
glsl \
|
||||
qmleditorwidgets \
|
||||
symbianutils \
|
||||
3rdparty
|
||||
symbianutils
|
||||
|
||||
# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.
|
||||
win32 {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFile>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
namespace Internal {
|
||||
namespace {
|
||||
@@ -70,10 +70,10 @@ SftpChannel::SftpChannel(quint32 channelId,
|
||||
Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(initializationFailed(QString)), this,
|
||||
SIGNAL(initializationFailed(QString)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(dataAvailable(Core::SftpJobId, QString)), this,
|
||||
SIGNAL(dataAvailable(Core::SftpJobId, QString)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(finished(Core::SftpJobId,QString)), this,
|
||||
SIGNAL(finished(Core::SftpJobId,QString)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(dataAvailable(Utils::SftpJobId, QString)), this,
|
||||
SIGNAL(dataAvailable(Utils::SftpJobId, QString)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(finished(Utils::SftpJobId,QString)), this,
|
||||
SIGNAL(finished(Utils::SftpJobId,QString)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(closed()), this, SIGNAL(closed()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
@@ -882,4 +882,4 @@ void SftpChannelPrivate::spawnReadRequests(const SftpDownload::Ptr &job)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -37,14 +37,14 @@
|
||||
#include "sftpdefs.h"
|
||||
#include "sftpincomingpacket_p.h"
|
||||
|
||||
#include <coreplugin/core_global.h>
|
||||
#include <utils/utils_global.h>
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
namespace Internal {
|
||||
class SftpChannelPrivate;
|
||||
@@ -71,7 +71,7 @@ class SshSendFacility;
|
||||
* non-empty error string.
|
||||
* Note that directory names must not have a trailing slash.
|
||||
*/
|
||||
class CORE_EXPORT SftpChannel : public QObject
|
||||
class QTCREATOR_UTILS_EXPORT SftpChannel : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -108,14 +108,14 @@ signals:
|
||||
void closed();
|
||||
|
||||
// error.isEmpty <=> finished successfully
|
||||
void finished(Core::SftpJobId job, const QString &error = QString());
|
||||
void finished(Utils::SftpJobId job, const QString &error = QString());
|
||||
|
||||
/*
|
||||
* This signal is only emitted by the "List Directory" operation,
|
||||
* one file at a time.
|
||||
// TODO: Also emit for each file copied by uploadDir().
|
||||
*/
|
||||
void dataAvailable(Core::SftpJobId job, const QString &data);
|
||||
void dataAvailable(Utils::SftpJobId job, const QString &data);
|
||||
|
||||
private:
|
||||
SftpChannel(quint32 channelId, Internal::SshSendFacility &sendFacility);
|
||||
@@ -123,6 +123,6 @@ private:
|
||||
Internal::SftpChannelPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPCHANNEL_H
|
||||
@@ -43,14 +43,14 @@
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SftpChannel;
|
||||
namespace Internal {
|
||||
|
||||
class SftpChannelPrivate : public AbstractSshChannel
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Core::SftpChannel;
|
||||
friend class Utils::SftpChannel;
|
||||
public:
|
||||
|
||||
enum SftpState { Inactive, SubsystemRequested, InitSent, Initialized };
|
||||
@@ -64,8 +64,8 @@ signals:
|
||||
void initialized();
|
||||
void initializationFailed(const QString &reason);
|
||||
void closed();
|
||||
void finished(Core::SftpJobId job, const QString &error = QString());
|
||||
void dataAvailable(Core::SftpJobId job, const QString &data);
|
||||
void finished(Utils::SftpJobId job, const QString &error = QString());
|
||||
void dataAvailable(Utils::SftpJobId job, const QString &data);
|
||||
|
||||
private:
|
||||
typedef QMap<SftpJobId, AbstractSftpOperation::Ptr> JobMap;
|
||||
@@ -128,6 +128,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPCHANNEL_P_H
|
||||
@@ -33,4 +33,4 @@
|
||||
|
||||
#include "sftpdefs.h"
|
||||
|
||||
namespace Core { const SftpJobId SftpInvalidJob = 0; }
|
||||
namespace Utils { const SftpJobId SftpInvalidJob = 0; }
|
||||
@@ -34,19 +34,19 @@
|
||||
#ifndef SFTPDEFS_H
|
||||
#define SFTPDEFS_H
|
||||
|
||||
#include <coreplugin/core_global.h>
|
||||
#include <utils/utils_global.h>
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
typedef quint32 SftpJobId;
|
||||
CORE_EXPORT extern const SftpJobId SftpInvalidJob;
|
||||
QTCREATOR_UTILS_EXPORT extern const SftpJobId SftpInvalidJob;
|
||||
|
||||
enum SftpOverwriteMode {
|
||||
SftpOverwriteExisting, SftpAppendToExisting, SftpSkipExisting
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPDEFS_H
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "sshexception_p.h"
|
||||
#include "sshpacketparser_p.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
@@ -231,4 +231,4 @@ SftpFileAttributes SftpIncomingPacket::asFileAttributes(quint32 &offset) const
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "sftppacket_p.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
struct SftpHandleResponse {
|
||||
@@ -110,6 +110,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPINCOMINGPACKET_P_H
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
AbstractSftpOperation::AbstractSftpOperation(SftpJobId jobId) : jobId(jobId)
|
||||
@@ -184,4 +184,4 @@ SftpOutgoingPacket &SftpUploadFile::initialPacket(SftpOutgoingPacket &packet)
|
||||
SftpUploadDir::~SftpUploadDir() {}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QFile;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SftpOutgoingPacket;
|
||||
@@ -227,6 +227,6 @@ struct SftpUploadDir
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPOPERATION_P_H
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <QtCore/QtEndian>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
@@ -203,4 +203,4 @@ SftpOutgoingPacket &SftpOutgoingPacket::finalize()
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "sftppacket_p.h"
|
||||
#include "sftpdefs.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SftpOutgoingPacket : public AbstractSftpPacket
|
||||
@@ -82,6 +82,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPOUTGOINGPACKET_P_H
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "sshpacketparser_p.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
const quint32 AbstractSftpPacket::MaxDataSize = 32000;
|
||||
@@ -55,4 +55,4 @@ quint32 AbstractSftpPacket::requestId() const
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
enum SftpPacketType {
|
||||
@@ -107,6 +107,6 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SFTPPACKET_P_H
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <botan/rng.h>
|
||||
#include <botan/secmem.h>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
inline const Botan::byte *convertByteArray(const QByteArray &a)
|
||||
@@ -96,6 +96,6 @@ inline quint32 botanHMacKeyLen(const QByteArray &rfcAlgoName)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // BYTEARRAYCONVERSIONS_P_H
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
@@ -104,4 +104,4 @@ QByteArray SshCapabilities::findBestMatch(const QList<QByteArray> &myCapabilitie
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QList>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SshCapabilities
|
||||
@@ -71,6 +71,6 @@ public:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // CAPABILITIES_P_H
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
@@ -261,4 +261,4 @@ quint32 AbstractSshChannel::maxDataSize() const
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QTimer)
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
struct SshChannelExitSignal;
|
||||
@@ -124,6 +124,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHCHANNEL_P_H
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <QtCore/QList>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
SshChannelManager::SshChannelManager(SshSendFacility &sendFacility,
|
||||
@@ -150,14 +150,14 @@ AbstractSshChannel *SshChannelManager::lookupChannel(quint32 channelId,
|
||||
return it == m_channels.end() ? 0 : it.value();
|
||||
}
|
||||
|
||||
Core::SshRemoteProcess::Ptr SshChannelManager::createRemoteProcess(const QByteArray &command)
|
||||
Utils::SshRemoteProcess::Ptr SshChannelManager::createRemoteProcess(const QByteArray &command)
|
||||
{
|
||||
SshRemoteProcess::Ptr proc(new SshRemoteProcess(command, m_nextLocalChannelId++, m_sendFacility));
|
||||
insertChannel(proc->d, proc);
|
||||
return proc;
|
||||
}
|
||||
|
||||
Core::SftpChannel::Ptr SshChannelManager::createSftpChannel()
|
||||
Utils::SftpChannel::Ptr SshChannelManager::createSftpChannel()
|
||||
{
|
||||
SftpChannel::Ptr sftp(new SftpChannel(m_nextLocalChannelId++, m_sendFacility));
|
||||
insertChannel(sftp->d, sftp);
|
||||
@@ -189,4 +189,4 @@ void SshChannelManager::removeChannel(ChannelIterator it)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
class SftpChannel;
|
||||
class SshRemoteProcess;
|
||||
@@ -92,6 +92,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHCHANNELLAYER_P_H
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <QtNetwork/QNetworkProxy>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
namespace {
|
||||
const QByteArray ClientId("SSH-2.0-QtCreator\r\n");
|
||||
@@ -65,8 +65,8 @@ namespace {
|
||||
staticInitMutex.lock();
|
||||
if (!staticInitializationsDone) {
|
||||
Botan::LibraryInitializer::initialize("thread_safe=true");
|
||||
qRegisterMetaType<Core::SshError>("Core::SshError");
|
||||
qRegisterMetaType<Core::SftpJobId>("Core::SftpJobId");
|
||||
qRegisterMetaType<Utils::SshError>("Utils::SshError");
|
||||
qRegisterMetaType<Utils::SftpJobId>("Utils::SftpJobId");
|
||||
staticInitializationsDone = true;
|
||||
}
|
||||
staticInitMutex.unlock();
|
||||
@@ -89,12 +89,12 @@ static inline bool equals(const SshConnectionParameters &p1, const SshConnection
|
||||
&& p1.timeout == p2.timeout && p1.port == p2.port;
|
||||
}
|
||||
|
||||
CORE_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
|
||||
QTCREATOR_UTILS_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
|
||||
{
|
||||
return equals(p1, p2);
|
||||
}
|
||||
|
||||
CORE_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
|
||||
QTCREATOR_UTILS_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
|
||||
{
|
||||
return !equals(p1, p2);
|
||||
}
|
||||
@@ -115,8 +115,8 @@ SshConnection::SshConnection() : d(new Internal::SshConnectionPrivate(this))
|
||||
SIGNAL(dataAvailable(QString)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(disconnected()), this, SIGNAL(disconnected()),
|
||||
Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(error(Core::SshError)), this,
|
||||
SIGNAL(error(Core::SshError)), Qt::QueuedConnection);
|
||||
connect(d, SIGNAL(error(Utils::SshError)), this,
|
||||
SIGNAL(error(Utils::SshError)), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void SshConnection::connectToHost(const SshConnectionParameters &serverInfo)
|
||||
@@ -642,4 +642,4 @@ QSharedPointer<SftpChannel> SshConnectionPrivate::createSftpChannel()
|
||||
const quint64 SshConnectionPrivate::InvalidSeqNr = static_cast<quint64>(-1);
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -36,14 +36,14 @@
|
||||
|
||||
#include "ssherrors.h"
|
||||
|
||||
#include <coreplugin/core_global.h>
|
||||
#include <utils/utils_global.h>
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SftpChannel;
|
||||
class SshRemoteProcess;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Internal {
|
||||
class SshConnectionPrivate;
|
||||
} // namespace Internal
|
||||
|
||||
struct CORE_EXPORT SshConnectionParameters
|
||||
struct QTCREATOR_UTILS_EXPORT SshConnectionParameters
|
||||
{
|
||||
enum ProxyType { DefaultProxy, NoProxy };
|
||||
SshConnectionParameters(ProxyType proxyType);
|
||||
@@ -66,15 +66,15 @@ struct CORE_EXPORT SshConnectionParameters
|
||||
ProxyType proxyType;
|
||||
};
|
||||
|
||||
CORE_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
|
||||
CORE_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
|
||||
QTCREATOR_UTILS_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
|
||||
QTCREATOR_UTILS_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
|
||||
|
||||
/*
|
||||
* This class provides an SSH connection, implementing protocol version 2.0
|
||||
* It can spawn channels for remote execution and SFTP operations (version 3).
|
||||
* It operates asynchronously (non-blocking) and is not thread-safe.
|
||||
*/
|
||||
class CORE_EXPORT SshConnection : public QObject
|
||||
class QTCREATOR_UTILS_EXPORT SshConnection : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SshConnection)
|
||||
@@ -99,7 +99,7 @@ signals:
|
||||
void connected();
|
||||
void disconnected();
|
||||
void dataAvailable(const QString &message);
|
||||
void error(Core::SshError);
|
||||
void error(Utils::SshError);
|
||||
|
||||
private:
|
||||
SshConnection();
|
||||
@@ -53,7 +53,7 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Botan { class Exception; }
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SftpChannel;
|
||||
|
||||
namespace Internal {
|
||||
@@ -76,7 +76,7 @@ enum SshStateInternal {
|
||||
class SshConnectionPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Core::SshConnection;
|
||||
friend class Utils::SshConnection;
|
||||
public:
|
||||
SshConnectionPrivate(SshConnection *conn);
|
||||
~SshConnectionPrivate();
|
||||
@@ -94,7 +94,7 @@ signals:
|
||||
void connected();
|
||||
void disconnected();
|
||||
void dataAvailable(const QString &message);
|
||||
void error(Core::SshError);
|
||||
void error(Utils::SshError);
|
||||
|
||||
private:
|
||||
Q_SLOT void handleSocketConnected();
|
||||
@@ -163,6 +163,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHCONNECTION_P_H
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
using namespace Botan;
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
SshAbstractCryptoFacility::SshAbstractCryptoFacility()
|
||||
@@ -370,4 +370,4 @@ void SshDecryptionFacility::decrypt(QByteArray &data, quint32 offset,
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -51,7 +51,7 @@ namespace Botan {
|
||||
class PK_Signing_Key;
|
||||
}
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SshKeyExchange;
|
||||
@@ -153,6 +153,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHABSTRACTCRYPTOFACILITY_P_H
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef SSHERRORS_P_H
|
||||
#define SSHERRORS_P_H
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
enum SshError {
|
||||
SshNoError, SshSocketError, SshTimeoutError, SshProtocolError,
|
||||
@@ -42,6 +42,6 @@ enum SshError {
|
||||
SshClosedByServerError, SshInternalError
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHERRORS_P_H
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
enum SshErrorCode {
|
||||
@@ -88,6 +88,6 @@ struct SshClientException
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHEXCEPTION_P_H
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "sshcapabilities_p.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
const QByteArray SshIncomingPacket::ExitStatusType("exit-status");
|
||||
@@ -459,4 +459,4 @@ void SshIncomingPacket::calculateLength() const
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SshKeyExchange;
|
||||
@@ -191,6 +191,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHINCOMINGPACKET_P_H
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
using namespace Botan;
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
@@ -198,4 +198,4 @@ void SshKeyExchange::sendNewKeysPacket(const SshIncomingPacket &dhReply,
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
namespace Botan { class HashFunction; }
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SshSendFacility;
|
||||
@@ -86,6 +86,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHKEYEXCHANGE_P_H
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
using namespace Botan;
|
||||
using namespace Internal;
|
||||
@@ -147,4 +147,4 @@ bool SshKeyGenerator::generateOpenSslKeys(const KeyPtr &key)
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef SSHKEYGENERATOR_H
|
||||
#define SSHKEYGENERATOR_H
|
||||
|
||||
#include <coreplugin/core_global.h>
|
||||
#include <utils/utils_global.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QSharedPointer>
|
||||
@@ -43,9 +43,9 @@ namespace Botan {
|
||||
class Private_Key;
|
||||
}
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
class CORE_EXPORT SshKeyGenerator
|
||||
class QTCREATOR_UTILS_EXPORT SshKeyGenerator
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(SshKeyGenerator)
|
||||
public:
|
||||
@@ -74,6 +74,6 @@ private:
|
||||
PrivateKeyFormat m_format;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHKEYGENERATOR_H
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include <QtCore/QtEndian>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
SshOutgoingPacket::SshOutgoingPacket(const SshEncryptionFacility &encrypter,
|
||||
@@ -295,4 +295,4 @@ QByteArray SshOutgoingPacket::encodeNameList(const QList<QByteArray> &list)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "sshpacket_p.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class SshEncryptionFacility;
|
||||
@@ -99,6 +99,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHOUTGOINGPACKET_P_H
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <cctype>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
const quint32 AbstractSshPacket::PaddingLengthOffset = 4;
|
||||
@@ -168,4 +168,4 @@ void AbstractSshPacket::setLengthField(QByteArray &data)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <botan/bigint.h>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
enum SshPacketType {
|
||||
@@ -141,6 +141,6 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHPACKET_P_H
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <cctype>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
namespace { quint32 size(const QByteArray &data) { return data.size(); } }
|
||||
@@ -154,4 +154,4 @@ Botan::BigInt SshPacketParser::asBigInt(const QByteArray &data, quint32 *offset)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
struct SshNameList
|
||||
@@ -80,6 +80,6 @@ public:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHPACKETPARSER_P_H
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
const QByteArray SshRemoteProcess::AbrtSignal("ABRT");
|
||||
const QByteArray SshRemoteProcess::AlrmSignal("ALRM");
|
||||
@@ -234,4 +234,4 @@ void SshRemoteProcessPrivate::handleExitSignal(const SshChannelExitSignal &signa
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef SSHREMOTECOMMAND_H
|
||||
#define SSHREMOTECOMMAND_H
|
||||
|
||||
#include <coreplugin/core_global.h>
|
||||
#include <utils/utils_global.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QByteArray;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
class SshChannelManager;
|
||||
class SshRemoteProcessPrivate;
|
||||
@@ -63,7 +63,7 @@ class SshSendFacility;
|
||||
* Note that the process does not have a terminal, so you can't use it
|
||||
* for applications that require one.
|
||||
*/
|
||||
class CORE_EXPORT SshRemoteProcess : public QObject
|
||||
class QTCREATOR_UTILS_EXPORT SshRemoteProcess : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SshRemoteProcess)
|
||||
@@ -129,6 +129,6 @@ private:
|
||||
Internal::SshRemoteProcessPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHREMOTECOMMAND_H
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QPair>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshRemoteProcess;
|
||||
|
||||
namespace Internal {
|
||||
@@ -48,7 +48,7 @@ class SshSendFacility;
|
||||
class SshRemoteProcessPrivate : public AbstractSshChannel
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Core::SshRemoteProcess;
|
||||
friend class Utils::SshRemoteProcess;
|
||||
public:
|
||||
enum ProcessState {
|
||||
NotYetStarted, ExecRequested, StartFailed,Running, Exited
|
||||
@@ -93,6 +93,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHREMOTEPROCESS_P_H
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#define ASSERT_STATE(states) assertState(states, Q_FUNC_INFO)
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
|
||||
class SshRemoteProcessRunnerPrivate : public QObject
|
||||
{
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
SshRemoteProcess::Ptr m_process;
|
||||
|
||||
signals:
|
||||
void connectionError(Core::SshError);
|
||||
void connectionError(Utils::SshError);
|
||||
void processStarted();
|
||||
void processOutputAvailable(const QByteArray &output);
|
||||
void processErrorOutputAvailable(const QByteArray &output);
|
||||
@@ -27,7 +27,7 @@ signals:
|
||||
|
||||
private slots:
|
||||
void handleConnected();
|
||||
void handleConnectionError(Core::SshError error);
|
||||
void handleConnectionError(Utils::SshError error);
|
||||
void handleDisconnected();
|
||||
void handleProcessStarted();
|
||||
void handleProcessFinished(int exitStatus);
|
||||
@@ -69,8 +69,8 @@ void SshRemoteProcessRunnerPrivate::run(const QByteArray &command)
|
||||
setState(Connecting);
|
||||
|
||||
m_command = command;
|
||||
connect(m_connection.data(), SIGNAL(error(Core::SshError)),
|
||||
SLOT(handleConnectionError(Core::SshError)));
|
||||
connect(m_connection.data(), SIGNAL(error(Utils::SshError)),
|
||||
SLOT(handleConnectionError(Utils::SshError)));
|
||||
connect(m_connection.data(), SIGNAL(disconnected()),
|
||||
SLOT(handleDisconnected()));
|
||||
if (m_connection->state() == SshConnection::Connected) {
|
||||
@@ -98,7 +98,7 @@ void SshRemoteProcessRunnerPrivate::handleConnected()
|
||||
m_process->start();
|
||||
}
|
||||
|
||||
void SshRemoteProcessRunnerPrivate::handleConnectionError(Core::SshError error)
|
||||
void SshRemoteProcessRunnerPrivate::handleConnectionError(Utils::SshError error)
|
||||
{
|
||||
handleDisconnected();
|
||||
emit connectionError(error);
|
||||
@@ -185,8 +185,8 @@ SshRemoteProcessRunner::SshRemoteProcessRunner(const SshConnection::Ptr &connect
|
||||
|
||||
void SshRemoteProcessRunner::init()
|
||||
{
|
||||
connect(d, SIGNAL(connectionError(Core::SshError)),
|
||||
SIGNAL(connectionError(Core::SshError)));
|
||||
connect(d, SIGNAL(connectionError(Utils::SshError)),
|
||||
SIGNAL(connectionError(Utils::SshError)));
|
||||
connect(d, SIGNAL(processStarted()), SIGNAL(processStarted()));
|
||||
connect(d, SIGNAL(processClosed(int)), SIGNAL(processClosed(int)));
|
||||
connect(d, SIGNAL(processOutputAvailable(QByteArray)),
|
||||
@@ -204,7 +204,7 @@ QByteArray SshRemoteProcessRunner::command() const { return d->command(); }
|
||||
SshConnection::Ptr SshRemoteProcessRunner::connection() const { return d->m_connection; }
|
||||
SshRemoteProcess::Ptr SshRemoteProcessRunner::process() const { return d->m_process; }
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
|
||||
#include "sshremoteprocessrunner.moc"
|
||||
@@ -4,11 +4,11 @@
|
||||
#include "sshconnection.h"
|
||||
#include "sshremoteprocess.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshRemoteProcessRunnerPrivate;
|
||||
|
||||
// Convenience class for running a remote process over an SSH connection.
|
||||
class CORE_EXPORT SshRemoteProcessRunner : public QObject
|
||||
class QTCREATOR_UTILS_EXPORT SshRemoteProcessRunner : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(SshRemoteProcessRunner)
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
SshRemoteProcess::Ptr process() const;
|
||||
|
||||
signals:
|
||||
void connectionError(Core::SshError);
|
||||
void connectionError(Utils::SshError);
|
||||
void processStarted();
|
||||
void processOutputAvailable(const QByteArray &output);
|
||||
void processErrorOutputAvailable(const QByteArray &output);
|
||||
@@ -39,6 +39,6 @@ private:
|
||||
SshRemoteProcessRunnerPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHREMOTEPROCESSRUNNER_H
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
SshSendFacility::SshSendFacility(QTcpSocket *socket)
|
||||
@@ -207,4 +207,4 @@ void SshSendFacility::sendChannelClosePacket(quint32 remoteChannel)
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
@@ -42,7 +42,7 @@ class QTcpSocket;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
class SshKeyExchange;
|
||||
|
||||
@@ -92,6 +92,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
#endif // SSHCONNECTIONOUTSTATE_P_H
|
||||
@@ -55,7 +55,27 @@ SOURCES += $$PWD/environment.cpp \
|
||||
$$PWD/buildablehelperlibrary.cpp \
|
||||
$$PWD/annotateditemdelegate.cpp \
|
||||
$$PWD/fileinprojectfinder.cpp \
|
||||
$$PWD/ipaddresslineedit.cpp
|
||||
$$PWD/ipaddresslineedit.cpp \
|
||||
$$PWD/ssh/sshsendfacility.cpp \
|
||||
$$PWD/ssh/sshremoteprocess.cpp \
|
||||
$$PWD/ssh/sshpacketparser.cpp \
|
||||
$$PWD/ssh/sshpacket.cpp \
|
||||
$$PWD/ssh/sshoutgoingpacket.cpp \
|
||||
$$PWD/ssh/sshkeygenerator.cpp \
|
||||
$$PWD/ssh/sshkeyexchange.cpp \
|
||||
$$PWD/ssh/sshincomingpacket.cpp \
|
||||
$$PWD/ssh/sshcryptofacility.cpp \
|
||||
$$PWD/ssh/sshconnection.cpp \
|
||||
$$PWD/ssh/sshchannelmanager.cpp \
|
||||
$$PWD/ssh/sshchannel.cpp \
|
||||
$$PWD/ssh/sshcapabilities.cpp \
|
||||
$$PWD/ssh/sftppacket.cpp \
|
||||
$$PWD/ssh/sftpoutgoingpacket.cpp \
|
||||
$$PWD/ssh/sftpoperation.cpp \
|
||||
$$PWD/ssh/sftpincomingpacket.cpp \
|
||||
$$PWD/ssh/sftpdefs.cpp \
|
||||
$$PWD/ssh/sftpchannel.cpp \
|
||||
$$PWD/ssh/sshremoteprocessrunner.cpp
|
||||
|
||||
win32 {
|
||||
SOURCES += $$PWD/abstractprocess_win.cpp \
|
||||
@@ -121,7 +141,33 @@ HEADERS += $$PWD/environment.h \
|
||||
$$PWD/buildablehelperlibrary.h \
|
||||
$$PWD/annotateditemdelegate.h \
|
||||
$$PWD/fileinprojectfinder.h \
|
||||
$$PWD/ipaddresslineedit.h
|
||||
$$PWD/ipaddresslineedit.h \
|
||||
$$PWD/ssh/sshsendfacility_p.h \
|
||||
$$PWD/ssh/sshremoteprocess.h \
|
||||
$$PWD/ssh/sshremoteprocess_p.h \
|
||||
$$PWD/ssh/sshpacketparser_p.h \
|
||||
$$PWD/ssh/sshpacket_p.h \
|
||||
$$PWD/ssh/sshoutgoingpacket_p.h \
|
||||
$$PWD/ssh/sshkeygenerator.h \
|
||||
$$PWD/ssh/sshkeyexchange_p.h \
|
||||
$$PWD/ssh/sshincomingpacket_p.h \
|
||||
$$PWD/ssh/sshexception_p.h \
|
||||
$$PWD/ssh/ssherrors.h \
|
||||
$$PWD/ssh/sshcryptofacility_p.h \
|
||||
$$PWD/ssh/sshconnection.h \
|
||||
$$PWD/ssh/sshconnection_p.h \
|
||||
$$PWD/ssh/sshchannelmanager_p.h \
|
||||
$$PWD/ssh/sshchannel_p.h \
|
||||
$$PWD/ssh/sshcapabilities_p.h \
|
||||
$$PWD/ssh/sshbotanconversions_p.h \
|
||||
$$PWD/ssh/sftppacket_p.h \
|
||||
$$PWD/ssh/sftpoutgoingpacket_p.h \
|
||||
$$PWD/ssh/sftpoperation_p.h \
|
||||
$$PWD/ssh/sftpincomingpacket_p.h \
|
||||
$$PWD/ssh/sftpdefs.h \
|
||||
$$PWD/ssh/sftpchannel.h \
|
||||
$$PWD/ssh/sftpchannel_p.h \
|
||||
$$PWD/ssh/sshremoteprocessrunner.h
|
||||
|
||||
FORMS += $$PWD/filewizardpage.ui \
|
||||
$$PWD/projectintropage.ui \
|
||||
|
||||
@@ -5,6 +5,7 @@ QT += gui \
|
||||
|
||||
CONFIG += dll
|
||||
include($$PWD/../../qtcreatorlibrary.pri)
|
||||
include($$PWD/../3rdparty/botan/botan.pri)
|
||||
|
||||
include(utils-lib.pri)
|
||||
|
||||
|
||||
@@ -84,26 +84,6 @@ SOURCES += mainwindow.cpp \
|
||||
designmode.cpp \
|
||||
editortoolbar.cpp \
|
||||
helpmanager.cpp \
|
||||
ssh/sshsendfacility.cpp \
|
||||
ssh/sshremoteprocess.cpp \
|
||||
ssh/sshpacketparser.cpp \
|
||||
ssh/sshpacket.cpp \
|
||||
ssh/sshoutgoingpacket.cpp \
|
||||
ssh/sshkeygenerator.cpp \
|
||||
ssh/sshkeyexchange.cpp \
|
||||
ssh/sshincomingpacket.cpp \
|
||||
ssh/sshcryptofacility.cpp \
|
||||
ssh/sshconnection.cpp \
|
||||
ssh/sshchannelmanager.cpp \
|
||||
ssh/sshchannel.cpp \
|
||||
ssh/sshcapabilities.cpp \
|
||||
ssh/sftppacket.cpp \
|
||||
ssh/sftpoutgoingpacket.cpp \
|
||||
ssh/sftpoperation.cpp \
|
||||
ssh/sftpincomingpacket.cpp \
|
||||
ssh/sftpdefs.cpp \
|
||||
ssh/sftpchannel.cpp \
|
||||
ssh/sshremoteprocessrunner.cpp \
|
||||
outputpanemanager.cpp \
|
||||
navigationsubwidget.cpp \
|
||||
sidebarwidget.cpp \
|
||||
@@ -189,32 +169,6 @@ HEADERS += mainwindow.h \
|
||||
designmode.h \
|
||||
editortoolbar.h \
|
||||
helpmanager.h \
|
||||
ssh/sshsendfacility_p.h \
|
||||
ssh/sshremoteprocess.h \
|
||||
ssh/sshremoteprocess_p.h \
|
||||
ssh/sshpacketparser_p.h \
|
||||
ssh/sshpacket_p.h \
|
||||
ssh/sshoutgoingpacket_p.h \
|
||||
ssh/sshkeygenerator.h \
|
||||
ssh/sshkeyexchange_p.h \
|
||||
ssh/sshincomingpacket_p.h \
|
||||
ssh/sshexception_p.h \
|
||||
ssh/ssherrors.h \
|
||||
ssh/sshcryptofacility_p.h \
|
||||
ssh/sshconnection.h \
|
||||
ssh/sshconnection_p.h \
|
||||
ssh/sshchannelmanager_p.h \
|
||||
ssh/sshchannel_p.h \
|
||||
ssh/sshcapabilities_p.h \
|
||||
ssh/sshbotanconversions_p.h \
|
||||
ssh/sftppacket_p.h \
|
||||
ssh/sftpoutgoingpacket_p.h \
|
||||
ssh/sftpoperation_p.h \
|
||||
ssh/sftpincomingpacket_p.h \
|
||||
ssh/sftpdefs.h \
|
||||
ssh/sftpchannel.h \
|
||||
ssh/sftpchannel_p.h \
|
||||
ssh/sshremoteprocessrunner.h \
|
||||
outputpanemanager.h \
|
||||
navigationsubwidget.h \
|
||||
sidebarwidget.h \
|
||||
|
||||
@@ -1715,9 +1715,9 @@ void DebuggerPluginPrivate::startRemoteEngine()
|
||||
sp.connParams.pwd = dlg.password();
|
||||
|
||||
sp.connParams.timeout = 5;
|
||||
sp.connParams.authType = SshConnectionParameters::AuthByPwd;
|
||||
sp.connParams.authType = Utils::SshConnectionParameters::AuthByPwd;
|
||||
sp.connParams.port = 22;
|
||||
sp.connParams.proxyType = SshConnectionParameters::NoProxy;
|
||||
sp.connParams.proxyType = Utils::SshConnectionParameters::NoProxy;
|
||||
|
||||
sp.executable = dlg.inferiorPath();
|
||||
sp.serverStartScript = dlg.enginePath();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "debugger_global.h"
|
||||
#include "debuggerconstants.h"
|
||||
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <utils/environment.h>
|
||||
#include <projectexplorer/toolchaintype.h>
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
qmlServerAddress(QLatin1String("127.0.0.1")),
|
||||
qmlServerPort(0),
|
||||
useServerStartScript(false),
|
||||
connParams(Core::SshConnectionParameters::NoProxy),
|
||||
connParams(Utils::SshConnectionParameters::NoProxy),
|
||||
toolChainType(ProjectExplorer::ToolChain_UNKNOWN),
|
||||
startMode(NoStartMode),
|
||||
executableUid(0),
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
QByteArray remoteSourcesDir;
|
||||
QString remoteMountPoint;
|
||||
QString localMountDir;
|
||||
Core::SshConnectionParameters connParams;
|
||||
Utils::SshConnectionParameters connParams;
|
||||
|
||||
QString debuggerCommand;
|
||||
ProjectExplorer::ToolChainType toolChainType;
|
||||
|
||||
@@ -47,7 +47,7 @@ using namespace Core;
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
RemoteGdbProcess::RemoteGdbProcess(const Core::SshConnectionParameters &connParams,
|
||||
RemoteGdbProcess::RemoteGdbProcess(const Utils::SshConnectionParameters &connParams,
|
||||
RemotePlainGdbAdapter *adapter, QObject *parent)
|
||||
: AbstractGdbProcess(parent), m_connParams(connParams),
|
||||
m_state(Inactive), m_adapter(adapter)
|
||||
@@ -91,9 +91,9 @@ void RemoteGdbProcess::realStart(const QString &cmd, const QStringList &args,
|
||||
m_gdbOutput.clear();
|
||||
m_errorOutput.clear();
|
||||
m_inputToSend.clear();
|
||||
m_conn = SshConnection::create();
|
||||
m_conn = Utils::SshConnection::create();
|
||||
connect(m_conn.data(), SIGNAL(connected()), this, SLOT(handleConnected()));
|
||||
connect(m_conn.data(), SIGNAL(error(Core::SshError)), this,
|
||||
connect(m_conn.data(), SIGNAL(error(Utils::SshError)), this,
|
||||
SLOT(handleConnectionError()));
|
||||
m_conn->connectToHost(m_connParams);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ void RemoteGdbProcess::handleFifoCreationFinished(int exitStatus)
|
||||
return;
|
||||
QTC_ASSERT(m_state == CreatingFifo, return);
|
||||
|
||||
if (exitStatus != SshRemoteProcess::ExitedNormally) {
|
||||
if (exitStatus != Utils::SshRemoteProcess::ExitedNormally) {
|
||||
emitErrorExit(tr("Could not create FIFO."));
|
||||
} else {
|
||||
setState(StartingFifoReader);
|
||||
@@ -167,7 +167,7 @@ void RemoteGdbProcess::handleAppOutputReaderStarted()
|
||||
|
||||
void RemoteGdbProcess::handleAppOutputReaderFinished(int exitStatus)
|
||||
{
|
||||
if (exitStatus != SshRemoteProcess::ExitedNormally)
|
||||
if (exitStatus != Utils::SshRemoteProcess::ExitedNormally)
|
||||
emitErrorExit(tr("Application output reader unexpectedly finished."));
|
||||
}
|
||||
|
||||
@@ -187,15 +187,15 @@ void RemoteGdbProcess::handleGdbFinished(int exitStatus)
|
||||
QTC_ASSERT(m_state == RunningGdb, return);
|
||||
|
||||
switch (exitStatus) {
|
||||
case SshRemoteProcess::FailedToStart:
|
||||
case Utils::SshRemoteProcess::FailedToStart:
|
||||
m_error = tr("Remote gdb failed to start.");
|
||||
setState(Inactive);
|
||||
emit startFailed();
|
||||
break;
|
||||
case SshRemoteProcess::KilledBySignal:
|
||||
case Utils::SshRemoteProcess::KilledBySignal:
|
||||
emitErrorExit(tr("Remote gdb crashed."));
|
||||
break;
|
||||
case SshRemoteProcess::ExitedNormally:
|
||||
case Utils::SshRemoteProcess::ExitedNormally:
|
||||
const int exitCode = m_gdbProc->exitCode();
|
||||
setState(Inactive);
|
||||
emit finished(exitCode, QProcess::NormalExit);
|
||||
@@ -224,7 +224,7 @@ qint64 RemoteGdbProcess::write(const QByteArray &data)
|
||||
void RemoteGdbProcess::kill()
|
||||
{
|
||||
if (m_state == RunningGdb) {
|
||||
SshRemoteProcess::Ptr killProc
|
||||
Utils::SshRemoteProcess::Ptr killProc
|
||||
= m_conn->createRemoteProcess("pkill -SIGKILL -x gdb");
|
||||
killProc->start();
|
||||
} else {
|
||||
@@ -236,7 +236,7 @@ void RemoteGdbProcess::interruptInferior()
|
||||
{
|
||||
QTC_ASSERT(m_state == RunningGdb, return);
|
||||
|
||||
SshRemoteProcess::Ptr intProc
|
||||
Utils::SshRemoteProcess::Ptr intProc
|
||||
= m_conn->createRemoteProcess("pkill -x -SIGINT gdb");
|
||||
intProc->start();
|
||||
}
|
||||
@@ -375,15 +375,15 @@ void RemoteGdbProcess::setState(State newState)
|
||||
if (m_state == Inactive) {
|
||||
if (m_gdbProc) {
|
||||
disconnect(m_gdbProc.data(), 0, this, 0);
|
||||
m_gdbProc = SshRemoteProcess::Ptr();
|
||||
m_gdbProc = Utils::SshRemoteProcess::Ptr();
|
||||
}
|
||||
if (m_appOutputReader) {
|
||||
disconnect(m_appOutputReader.data(), 0, this, 0);
|
||||
m_appOutputReader = SshRemoteProcess::Ptr();
|
||||
m_appOutputReader = Utils::SshRemoteProcess::Ptr();
|
||||
}
|
||||
if (m_fifoCreator) {
|
||||
disconnect(m_fifoCreator.data(), 0, this, 0);
|
||||
m_fifoCreator = SshRemoteProcess::Ptr();
|
||||
m_fifoCreator = Utils::SshRemoteProcess::Ptr();
|
||||
}
|
||||
disconnect(m_conn.data(), 0, this, 0);
|
||||
m_conn->disconnectFromHost();
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
#include "abstractgdbprocess.h"
|
||||
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <coreplugin/ssh/sshremoteprocess.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshremoteprocess.h>
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QQueue>
|
||||
@@ -51,7 +51,7 @@ class RemoteGdbProcess : public AbstractGdbProcess
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RemoteGdbProcess(const Core::SshConnectionParameters &server,
|
||||
RemoteGdbProcess(const Utils::SshConnectionParameters &server,
|
||||
RemotePlainGdbAdapter *adapter, QObject *parent = 0);
|
||||
|
||||
virtual QByteArray readAllStandardOutput();
|
||||
@@ -106,11 +106,11 @@ private:
|
||||
void emitErrorExit(const QString &error);
|
||||
void setState(State newState);
|
||||
|
||||
Core::SshConnectionParameters m_connParams;
|
||||
Core::SshConnection::Ptr m_conn;
|
||||
Core::SshRemoteProcess::Ptr m_gdbProc;
|
||||
Core::SshRemoteProcess::Ptr m_appOutputReader;
|
||||
Core::SshRemoteProcess::Ptr m_fifoCreator;
|
||||
Utils::SshConnectionParameters m_connParams;
|
||||
Utils::SshConnection::Ptr m_conn;
|
||||
Utils::SshRemoteProcess::Ptr m_gdbProc;
|
||||
Utils::SshRemoteProcess::Ptr m_appOutputReader;
|
||||
Utils::SshRemoteProcess::Ptr m_fifoCreator;
|
||||
QByteArray m_gdbOutput;
|
||||
QByteArray m_errorOutput;
|
||||
QString m_command;
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
SshIODevice::SshIODevice(Core::SshRemoteProcessRunner::Ptr r)
|
||||
SshIODevice::SshIODevice(Utils::SshRemoteProcessRunner::Ptr r)
|
||||
: runner(r)
|
||||
, buckethead(0)
|
||||
{
|
||||
@@ -147,10 +147,10 @@ LldbEngineHost::LldbEngineHost(const DebuggerStartParameters &startParameters)
|
||||
if (startParameters.startMode == StartRemoteEngine)
|
||||
{
|
||||
m_guestProcess = 0;
|
||||
Core::SshRemoteProcessRunner::Ptr runner =
|
||||
Core::SshRemoteProcessRunner::create(startParameters.connParams);
|
||||
connect (runner.data(), SIGNAL(connectionError(Core::SshError)),
|
||||
this, SLOT(sshConnectionError(Core::SshError)));
|
||||
Utils::SshRemoteProcessRunner::Ptr runner =
|
||||
Utils::SshRemoteProcessRunner::create(startParameters.connParams);
|
||||
connect (runner.data(), SIGNAL(connectionError(Utils::SshError)),
|
||||
this, SLOT(sshConnectionError(Utils::SshError)));
|
||||
runner->run(startParameters.serverStartScript.toUtf8());
|
||||
setGuestDevice(new SshIODevice(runner));
|
||||
} else {
|
||||
@@ -210,7 +210,7 @@ void LldbEngineHost::nuke()
|
||||
m_guestProcess->kill();
|
||||
notifyEngineSpontaneousShutdown();
|
||||
}
|
||||
void LldbEngineHost::sshConnectionError(Core::SshError e)
|
||||
void LldbEngineHost::sshConnectionError(Utils::SshError e)
|
||||
{
|
||||
showStatusMessage(tr("ssh connection error: %1").arg(e));
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
#define DEBUGGER_LLDBENGINE_HOST_H
|
||||
|
||||
#include "ipcenginehost.h"
|
||||
#include <coreplugin/ssh/ssherrors.h>
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <coreplugin/ssh/sshremoteprocess.h>
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/ssherrors.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshremoteprocess.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QQueue>
|
||||
@@ -50,7 +50,7 @@ class SshIODevice : public QIODevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SshIODevice(Core::SshRemoteProcessRunner::Ptr r);
|
||||
SshIODevice(Utils::SshRemoteProcessRunner::Ptr r);
|
||||
virtual qint64 bytesAvailable () const;
|
||||
virtual qint64 writeData (const char * data, qint64 maxSize);
|
||||
virtual qint64 readData (char * data, qint64 maxSize);
|
||||
@@ -59,8 +59,8 @@ private slots:
|
||||
void outputAvailable(const QByteArray &output);
|
||||
void errorOutputAvailable(const QByteArray &output);
|
||||
private:
|
||||
Core::SshRemoteProcessRunner::Ptr runner;
|
||||
Core::SshRemoteProcess::Ptr proc;
|
||||
Utils::SshRemoteProcessRunner::Ptr runner;
|
||||
Utils::SshRemoteProcess::Ptr proc;
|
||||
int buckethead;
|
||||
QQueue<QByteArray> buckets;
|
||||
QByteArray startupbuffer;
|
||||
@@ -76,11 +76,11 @@ public:
|
||||
|
||||
private:
|
||||
QProcess *m_guestProcess;
|
||||
Core::SshRemoteProcessRunner::Ptr m_ssh;
|
||||
Utils::SshRemoteProcessRunner::Ptr m_ssh;
|
||||
protected:
|
||||
void nuke();
|
||||
private slots:
|
||||
void sshConnectionError(Core::SshError);
|
||||
void sshConnectionError(Utils::SshError);
|
||||
void finished(int, QProcess::ExitStatus);
|
||||
void stderrReady();
|
||||
};
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
#include "maemoglobal.h"
|
||||
#include "maemousedportsgatherer.h"
|
||||
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QtGui/QPalette>
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -87,7 +87,7 @@ void MaemoConfigTestDialog::startConfigTest()
|
||||
m_ui->testResultEdit->setPlainText(testingText);
|
||||
m_closeButton->setText(tr("Stop Test"));
|
||||
m_testProcessRunner = SshRemoteProcessRunner::create(m_config->sshParameters());
|
||||
connect(m_testProcessRunner.data(), SIGNAL(connectionError(Core::SshError)),
|
||||
connect(m_testProcessRunner.data(), SIGNAL(connectionError(Utils::SshError)),
|
||||
this, SLOT(handleConnectionError()));
|
||||
connect(m_testProcessRunner.data(), SIGNAL(processClosed(int)), this,
|
||||
SLOT(handleTestProcessFinished(int)));
|
||||
|
||||
@@ -43,9 +43,9 @@ class QPushButton;
|
||||
class Ui_MaemoConfigTestDialog;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshRemoteProcessRunner;
|
||||
} // namespace Core
|
||||
} // namespace Utils
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
QPushButton *m_closeButton;
|
||||
|
||||
const QSharedPointer<const MaemoDeviceConfig> m_config;
|
||||
QSharedPointer<Core::SshRemoteProcessRunner> m_testProcessRunner;
|
||||
QSharedPointer<Utils::SshRemoteProcessRunner> m_testProcessRunner;
|
||||
QString m_deviceTestOutput;
|
||||
bool m_qtVersionOk;
|
||||
MaemoUsedPortsGatherer *const m_portsGatherer;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "maemousedportsgatherer.h"
|
||||
#include "qt4maemotarget.h"
|
||||
|
||||
#include <coreplugin/ssh/sftpchannel.h>
|
||||
#include <utils/ssh/sftpchannel.h>
|
||||
#include <debugger/debuggerplugin.h>
|
||||
#include <debugger/debuggerstartparameters.h>
|
||||
#include <debugger/debuggerrunner.h>
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
@@ -205,8 +205,8 @@ void MaemoDebugSupport::startExecution()
|
||||
SLOT(handleSftpChannelInitialized()));
|
||||
connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this,
|
||||
SLOT(handleSftpChannelInitializationFailed(QString)));
|
||||
connect(m_uploader.data(), SIGNAL(finished(Core::SftpJobId, QString)),
|
||||
this, SLOT(handleSftpJobFinished(Core::SftpJobId, QString)));
|
||||
connect(m_uploader.data(), SIGNAL(finished(Utils::SftpJobId, QString)),
|
||||
this, SLOT(handleSftpJobFinished(Utils::SftpJobId, QString)));
|
||||
m_uploader->initialize();
|
||||
} else {
|
||||
setState(DumpersUploaded);
|
||||
@@ -244,7 +244,7 @@ void MaemoDebugSupport::handleSftpChannelInitializationFailed(const QString &err
|
||||
handleAdapterSetupFailed(error);
|
||||
}
|
||||
|
||||
void MaemoDebugSupport::handleSftpJobFinished(Core::SftpJobId job,
|
||||
void MaemoDebugSupport::handleSftpJobFinished(Utils::SftpJobId job,
|
||||
const QString &error)
|
||||
{
|
||||
if (m_state == Inactive)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "maemorunconfiguration.h"
|
||||
|
||||
#include <coreplugin/ssh/sftpdefs.h>
|
||||
#include <utils/ssh/sftpdefs.h>
|
||||
#include <utils/environment.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
@@ -77,7 +77,7 @@ private slots:
|
||||
void startExecution();
|
||||
void handleSftpChannelInitialized();
|
||||
void handleSftpChannelInitializationFailed(const QString &error);
|
||||
void handleSftpJobFinished(Core::SftpJobId job, const QString &error);
|
||||
void handleSftpJobFinished(Utils::SftpJobId job, const QString &error);
|
||||
void handleDebuggingFinished();
|
||||
void handleRemoteOutput(const QByteArray &output);
|
||||
void handleRemoteErrorOutput(const QByteArray &output);
|
||||
@@ -106,8 +106,8 @@ private:
|
||||
const QString m_dumperLib;
|
||||
const QList<Utils::EnvironmentItem> m_userEnvChanges;
|
||||
|
||||
QSharedPointer<Core::SftpChannel> m_uploader;
|
||||
Core::SftpJobId m_uploadJob;
|
||||
QSharedPointer<Utils::SftpChannel> m_uploader;
|
||||
Utils::SftpJobId m_uploadJob;
|
||||
QByteArray m_gdbserverOutput;
|
||||
State m_state;
|
||||
int m_gdbServerPort;
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
#include "maemousedportsgatherer.h"
|
||||
#include "qt4maemotarget.h"
|
||||
|
||||
#include <coreplugin/ssh/sftpchannel.h>
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <coreplugin/ssh/sshremoteprocess.h>
|
||||
#include <utils/ssh/sftpchannel.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshremoteprocess.h>
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -66,6 +66,7 @@
|
||||
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
@@ -436,7 +437,7 @@ void MaemoDeployStep::handleSftpChannelInitializationFailed(const QString &error
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoDeployStep::handleSftpJobFinished(Core::SftpJobId,
|
||||
void MaemoDeployStep::handleSftpJobFinished(Utils::SftpJobId,
|
||||
const QString &error)
|
||||
{
|
||||
ASSERT_STATE(QList<State>() << Uploading << StopRequested);
|
||||
@@ -612,8 +613,8 @@ void MaemoDeployStep::prepareSftpConnection()
|
||||
SLOT(handleSftpChannelInitialized()));
|
||||
connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this,
|
||||
SLOT(handleSftpChannelInitializationFailed(QString)));
|
||||
connect(m_uploader.data(), SIGNAL(finished(Core::SftpJobId, QString)),
|
||||
this, SLOT(handleSftpJobFinished(Core::SftpJobId, QString)));
|
||||
connect(m_uploader.data(), SIGNAL(finished(Utils::SftpJobId, QString)),
|
||||
this, SLOT(handleSftpJobFinished(Utils::SftpJobId, QString)));
|
||||
connect(m_uploader.data(), SIGNAL(closed()), this,
|
||||
SLOT(handleSftpChannelClosed()));
|
||||
m_uploader->initialize();
|
||||
@@ -695,7 +696,7 @@ void MaemoDeployStep::connectToDevice()
|
||||
m_connection = SshConnection::create();
|
||||
connect(m_connection.data(), SIGNAL(connected()), this,
|
||||
SLOT(handleConnected()));
|
||||
connect(m_connection.data(), SIGNAL(error(Core::SshError)), this,
|
||||
connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this,
|
||||
SLOT(handleConnectionFailure()));
|
||||
if (canReUse) {
|
||||
handleConnected();
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "maemodeviceconfigurations.h"
|
||||
#include "maemomountspecification.h"
|
||||
|
||||
#include <coreplugin/ssh/sftpdefs.h>
|
||||
#include <utils/ssh/sftpdefs.h>
|
||||
#include <projectexplorer/buildstep.h>
|
||||
|
||||
#include <QtCore/QHash>
|
||||
@@ -54,7 +54,7 @@ class QProcess;
|
||||
class QTimer;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SftpChannel;
|
||||
class SshConnection;
|
||||
class SshRemoteProcess;
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
const MaemoDeployable &deployable) const;
|
||||
void setDeployed(const QString &host, const MaemoDeployable &deployable);
|
||||
QSharedPointer<MaemoDeployables> deployables() const { return m_deployables; }
|
||||
QSharedPointer<Core::SshConnection> sshConnection() const { return m_connection; }
|
||||
QSharedPointer<Utils::SshConnection> sshConnection() const { return m_connection; }
|
||||
MaemoPortList freePorts() const;
|
||||
|
||||
bool isDeployToSysrootEnabled() const { return m_deployToSysroot; }
|
||||
@@ -112,7 +112,7 @@ private slots:
|
||||
void handleSysrootInstallerErrorOutput();
|
||||
void handleSftpChannelInitialized();
|
||||
void handleSftpChannelInitializationFailed(const QString &error);
|
||||
void handleSftpJobFinished(Core::SftpJobId job, const QString &error);
|
||||
void handleSftpJobFinished(Utils::SftpJobId job, const QString &error);
|
||||
void handleSftpChannelClosed();
|
||||
void handleInstallationFinished(int exitStatus);
|
||||
void handleDeviceInstallerOutput(const QByteArray &output);
|
||||
@@ -162,15 +162,15 @@ private:
|
||||
static const QLatin1String Id;
|
||||
|
||||
QSharedPointer<MaemoDeployables> m_deployables;
|
||||
QSharedPointer<Core::SshConnection> m_connection;
|
||||
QSharedPointer<Utils::SshConnection> m_connection;
|
||||
QProcess *m_sysrootInstaller;
|
||||
typedef QPair<MaemoDeployable, QSharedPointer<Core::SshRemoteProcess> > DeviceDeployAction;
|
||||
typedef QPair<MaemoDeployable, QSharedPointer<Utils::SshRemoteProcess> > DeviceDeployAction;
|
||||
QScopedPointer<DeviceDeployAction> m_currentDeviceDeployAction;
|
||||
QList<MaemoDeployable> m_filesToCopy;
|
||||
MaemoRemoteMounter *m_mounter;
|
||||
bool m_deployToSysroot;
|
||||
QSharedPointer<Core::SftpChannel> m_uploader;
|
||||
QSharedPointer<Core::SshRemoteProcess> m_deviceInstaller;
|
||||
QSharedPointer<Utils::SftpChannel> m_uploader;
|
||||
QSharedPointer<Utils::SshRemoteProcess> m_deviceInstaller;
|
||||
|
||||
bool m_needsInstall;
|
||||
typedef QPair<MaemoDeployable, QString> DeployablePerHost;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
|
||||
typedef Core::SshConnectionParameters::AuthType AuthType;
|
||||
typedef Utils::SshConnectionParameters::AuthType AuthType;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -74,7 +74,7 @@ namespace {
|
||||
const int DefaultGdbServerPortSim(13219);
|
||||
const QString DefaultHostNameHW(QLatin1String("192.168.2.15"));
|
||||
const QString DefaultHostNameSim(QLatin1String("localhost"));
|
||||
const AuthType DefaultAuthType(Core::SshConnectionParameters::AuthByKey);
|
||||
const AuthType DefaultAuthType(Utils::SshConnectionParameters::AuthByKey);
|
||||
const int DefaultTimeout(30);
|
||||
const MaemoDeviceConfig::DeviceType DefaultDeviceType(MaemoDeviceConfig::Physical);
|
||||
}
|
||||
@@ -231,8 +231,8 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createHardwareConfig(const QString &na
|
||||
MaemoGlobal::MaemoVersion osVersion, const QString &hostName,
|
||||
const QString privateKeyFilePath, Id &nextId)
|
||||
{
|
||||
Core::SshConnectionParameters sshParams(Core::SshConnectionParameters::NoProxy);
|
||||
sshParams.authType = Core::SshConnectionParameters::AuthByKey;
|
||||
Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy);
|
||||
sshParams.authType = Utils::SshConnectionParameters::AuthByKey;
|
||||
sshParams.host = hostName;
|
||||
sshParams.privateKeyFile = privateKeyFilePath;
|
||||
return Ptr(new MaemoDeviceConfig(name, osVersion, Physical, sshParams, nextId));
|
||||
@@ -241,8 +241,8 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createHardwareConfig(const QString &na
|
||||
MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &name,
|
||||
MaemoGlobal::MaemoVersion osVersion, Id &nextId)
|
||||
{
|
||||
Core::SshConnectionParameters sshParams(Core::SshConnectionParameters::NoProxy);
|
||||
sshParams.authType = Core::SshConnectionParameters::AuthByPwd;
|
||||
Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy);
|
||||
sshParams.authType = Utils::SshConnectionParameters::AuthByPwd;
|
||||
sshParams.host = defaultHost(Simulator);
|
||||
sshParams.pwd = defaultQemuPassword(osVersion);
|
||||
return Ptr(new MaemoDeviceConfig(name, osVersion, Simulator, sshParams, nextId));
|
||||
@@ -250,7 +250,7 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &na
|
||||
|
||||
MaemoDeviceConfig::MaemoDeviceConfig(const QString &name,
|
||||
MaemoGlobal::MaemoVersion osVersion, DeviceType devType,
|
||||
const Core::SshConnectionParameters &sshParams, Id &nextId)
|
||||
const Utils::SshConnectionParameters &sshParams, Id &nextId)
|
||||
: m_sshParameters(sshParams),
|
||||
m_name(name),
|
||||
m_osVersion(osVersion),
|
||||
@@ -266,7 +266,7 @@ MaemoDeviceConfig::MaemoDeviceConfig(const QString &name,
|
||||
|
||||
MaemoDeviceConfig::MaemoDeviceConfig(const QSettings &settings,
|
||||
Id &nextId)
|
||||
: m_sshParameters(Core::SshConnectionParameters::NoProxy),
|
||||
: m_sshParameters(Utils::SshConnectionParameters::NoProxy),
|
||||
m_name(settings.value(NameKey).toString()),
|
||||
m_osVersion(static_cast<MaemoGlobal::MaemoVersion>(settings.value(OsVersionKey, MaemoGlobal::Maemo5).toInt())),
|
||||
m_type(static_cast<DeviceType>(settings.value(TypeKey, DefaultDeviceType).toInt())),
|
||||
@@ -493,7 +493,7 @@ void MaemoDeviceConfigurations::setConfigurationName(int i, const QString &name)
|
||||
}
|
||||
|
||||
void MaemoDeviceConfigurations::setSshParameters(int i,
|
||||
const Core::SshConnectionParameters ¶ms)
|
||||
const Utils::SshConnectionParameters ¶ms)
|
||||
{
|
||||
Q_ASSERT(i >= 0 && i < rowCount());
|
||||
m_devConfigs.at(i)->m_sshParameters = params;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "maemoglobal.h"
|
||||
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
|
||||
#include <QtCore/QAbstractListModel>
|
||||
#include <QtCore/QList>
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
enum DeviceType { Physical, Simulator };
|
||||
|
||||
MaemoPortList freePorts() const;
|
||||
Core::SshConnectionParameters sshParameters() const { return m_sshParameters; }
|
||||
Utils::SshConnectionParameters sshParameters() const { return m_sshParameters; }
|
||||
QString name() const { return m_name; }
|
||||
MaemoGlobal::MaemoVersion osVersion() const { return m_osVersion; }
|
||||
DeviceType type() const { return m_type; }
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
typedef QSharedPointer<MaemoDeviceConfig> Ptr;
|
||||
|
||||
MaemoDeviceConfig(const QString &name, MaemoGlobal::MaemoVersion osVersion,
|
||||
DeviceType type, const Core::SshConnectionParameters &sshParams,
|
||||
DeviceType type, const Utils::SshConnectionParameters &sshParams,
|
||||
Id &nextId);
|
||||
MaemoDeviceConfig(const QSettings &settings, Id &nextId);
|
||||
MaemoDeviceConfig(const ConstPtr &other);
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
void save(QSettings &settings) const;
|
||||
QString defaultPortsSpec(DeviceType type) const;
|
||||
|
||||
Core::SshConnectionParameters m_sshParameters;
|
||||
Utils::SshConnectionParameters m_sshParameters;
|
||||
QString m_name;
|
||||
MaemoGlobal::MaemoVersion m_osVersion;
|
||||
DeviceType m_type;
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
MaemoGlobal::MaemoVersion osVersion);
|
||||
void removeConfiguration(int index);
|
||||
void setConfigurationName(int i, const QString &name);
|
||||
void setSshParameters(int i, const Core::SshConnectionParameters ¶ms);
|
||||
void setSshParameters(int i, const Utils::SshConnectionParameters ¶ms);
|
||||
void setPortsSpec(int i, const QString &portsSpec);
|
||||
void setDefaultDevice(int index);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "maemosshconfigdialog.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QRegExp>
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -204,7 +205,7 @@ void MaemoDeviceConfigurationsSettingsWidget::displayCurrent()
|
||||
m_ui->deviceTypeValueLabel->setText(tr("Emulator (Qemu)"));
|
||||
m_ui->portsLineEdit->setReadOnly(true);
|
||||
}
|
||||
if (sshParams.authType == Core::SshConnectionParameters::AuthByPwd)
|
||||
if (sshParams.authType == Utils::SshConnectionParameters::AuthByPwd)
|
||||
m_ui->passwordButton->setChecked(true);
|
||||
else
|
||||
m_ui->keyButton->setChecked(true);
|
||||
|
||||
@@ -46,7 +46,7 @@ class QLineEdit;
|
||||
class Ui_MaemoDeviceConfigurationsSettingsWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshRemoteProcessRunner;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "maemodeviceconfigurations.h"
|
||||
#include "maemokeydeployer.h"
|
||||
|
||||
#include <coreplugin/ssh/sshkeygenerator.h>
|
||||
#include <utils/ssh/sshkeygenerator.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFile>
|
||||
@@ -309,9 +309,9 @@ private:
|
||||
m_ui->keyDirPathChooser->setEnabled(false);
|
||||
m_ui->createKeysButton->setEnabled(false);
|
||||
m_ui->statusLabel->setText(tr("Creating keys ... "));
|
||||
Core::SshKeyGenerator keyGenerator;
|
||||
if (!keyGenerator.generateKeys(Core::SshKeyGenerator::Rsa,
|
||||
Core::SshKeyGenerator::OpenSsl, 1024)) {
|
||||
Utils::SshKeyGenerator keyGenerator;
|
||||
if (!keyGenerator.generateKeys(Utils::SshKeyGenerator::Rsa,
|
||||
Utils::SshKeyGenerator::OpenSsl, 1024)) {
|
||||
QMessageBox::critical(this, tr("Can't Create Keys"),
|
||||
tr("Key creation failed: %1").arg(keyGenerator.error()));
|
||||
enableInput();
|
||||
@@ -402,11 +402,11 @@ private:
|
||||
|
||||
Q_SLOT void deployKey()
|
||||
{
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
m_ui->deviceAddressLineEdit->setEnabled(false);
|
||||
m_ui->passwordLineEdit->setEnabled(false);
|
||||
m_ui->deployButton->setEnabled(false);
|
||||
Core::SshConnectionParameters sshParams(SshConnectionParameters::NoProxy);
|
||||
Utils::SshConnectionParameters sshParams(SshConnectionParameters::NoProxy);
|
||||
sshParams.authType = SshConnectionParameters::AuthByPwd;
|
||||
sshParams.host = hostAddress();
|
||||
sshParams.port = MaemoDeviceConfig::defaultSshPort(MaemoDeviceConfig::Physical);
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "maemoglobal.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -63,13 +63,13 @@ void MaemoDeviceEnvReader::start()
|
||||
return;
|
||||
m_stop = false;
|
||||
if (!m_remoteProcessRunner
|
||||
|| m_remoteProcessRunner->connection()->state() != Core::SshConnection::Connected
|
||||
|| m_remoteProcessRunner->connection()->state() != Utils::SshConnection::Connected
|
||||
|| m_remoteProcessRunner->connection()->connectionParameters() != m_devConfig->sshParameters()) {
|
||||
m_remoteProcessRunner
|
||||
= Core::SshRemoteProcessRunner::create(m_devConfig->sshParameters());
|
||||
= Utils::SshRemoteProcessRunner::create(m_devConfig->sshParameters());
|
||||
}
|
||||
connect(m_remoteProcessRunner.data(),
|
||||
SIGNAL(connectionError(Core::SshError)), this,
|
||||
SIGNAL(connectionError(Utils::SshError)), this,
|
||||
SLOT(handleConnectionFailure()));
|
||||
connect(m_remoteProcessRunner.data(), SIGNAL(processClosed(int)), this,
|
||||
SLOT(remoteProcessFinished(int)));
|
||||
@@ -115,16 +115,16 @@ void MaemoDeviceEnvReader::handleCurrentDeviceConfigChanged()
|
||||
|
||||
void MaemoDeviceEnvReader::remoteProcessFinished(int exitCode)
|
||||
{
|
||||
Q_ASSERT(exitCode == Core::SshRemoteProcess::FailedToStart
|
||||
|| exitCode == Core::SshRemoteProcess::KilledBySignal
|
||||
|| exitCode == Core::SshRemoteProcess::ExitedNormally);
|
||||
Q_ASSERT(exitCode == Utils::SshRemoteProcess::FailedToStart
|
||||
|| exitCode == Utils::SshRemoteProcess::KilledBySignal
|
||||
|| exitCode == Utils::SshRemoteProcess::ExitedNormally);
|
||||
|
||||
if (m_stop)
|
||||
return;
|
||||
|
||||
disconnect(m_remoteProcessRunner.data(), 0, this, 0);
|
||||
m_env.clear();
|
||||
if (exitCode == Core::SshRemoteProcess::ExitedNormally) {
|
||||
if (exitCode == Utils::SshRemoteProcess::ExitedNormally) {
|
||||
if (!m_remoteOutput.isEmpty()) {
|
||||
m_env = Utils::Environment(m_remoteOutput.split(QLatin1Char('\n'),
|
||||
QString::SkipEmptyParts));
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshRemoteProcessRunner;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
Utils::Environment m_env;
|
||||
QSharedPointer<const MaemoDeviceConfig> m_devConfig;
|
||||
MaemoRunConfiguration *m_runConfig;
|
||||
QSharedPointer<Core::SshRemoteProcessRunner> m_remoteProcessRunner;
|
||||
QSharedPointer<Utils::SshRemoteProcessRunner> m_remoteProcessRunner;
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <coreplugin/filemanager.h>
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
||||
#include <qt4projectmanager/qtversionmanager.h>
|
||||
#include <utils/environment.h>
|
||||
@@ -138,18 +138,18 @@ QString MaemoGlobal::remoteEnvironment(const QList<Utils::EnvironmentItem> &list
|
||||
return env.mid(0, env.size() - 1);
|
||||
}
|
||||
|
||||
QString MaemoGlobal::failedToConnectToServerMessage(const Core::SshConnection::Ptr &connection,
|
||||
QString MaemoGlobal::failedToConnectToServerMessage(const Utils::SshConnection::Ptr &connection,
|
||||
const MaemoDeviceConfig::ConstPtr &deviceConfig)
|
||||
{
|
||||
QString errorMsg = tr("Could not connect to host: %1")
|
||||
.arg(connection->errorString());
|
||||
|
||||
if (deviceConfig->type() == MaemoDeviceConfig::Simulator) {
|
||||
if (connection->errorState() == Core::SshTimeoutError
|
||||
|| connection->errorState() == Core::SshSocketError) {
|
||||
if (connection->errorState() == Utils::SshTimeoutError
|
||||
|| connection->errorState() == Utils::SshSocketError) {
|
||||
errorMsg += tr("\nDid you start Qemu?");
|
||||
}
|
||||
} else if (connection->errorState() == Core::SshTimeoutError) {
|
||||
} else if (connection->errorState() == Utils::SshTimeoutError) {
|
||||
errorMsg += tr("\nIs the device connected and set up for network access?");
|
||||
}
|
||||
return errorMsg;
|
||||
|
||||
@@ -51,7 +51,7 @@ class QProcess;
|
||||
class QString;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core { class SshConnection; }
|
||||
namespace Utils { class SshConnection; }
|
||||
namespace Qt4ProjectManager {
|
||||
class QtVersion;
|
||||
namespace Internal {
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
static QString remoteCommandPrefix(const QString &commandFilePath);
|
||||
static QString remoteEnvironment(const QList<Utils::EnvironmentItem> &list);
|
||||
static QString remoteSourceProfilesCommand();
|
||||
static QString failedToConnectToServerMessage(const QSharedPointer<Core::SshConnection> &connection,
|
||||
static QString failedToConnectToServerMessage(const QSharedPointer<Utils::SshConnection> &connection,
|
||||
const QSharedPointer<const MaemoDeviceConfig> &deviceConfig);
|
||||
static QString deviceConfigurationName(const QSharedPointer<const MaemoDeviceConfig> &devConf);
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
****************************************************************************/
|
||||
#include "maemokeydeployer.h"
|
||||
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -68,7 +68,7 @@ void MaemoKeyDeployer::deployPublicKey(const SshConnectionParameters &sshParams,
|
||||
return;
|
||||
}
|
||||
|
||||
connect(m_deployProcess.data(), SIGNAL(connectionError(Core::SshError)), this,
|
||||
connect(m_deployProcess.data(), SIGNAL(connectionError(Utils::SshError)), this,
|
||||
SLOT(handleConnectionFailure()));
|
||||
connect(m_deployProcess.data(), SIGNAL(processClosed(int)), this,
|
||||
SLOT(handleKeyUploadFinished(int)));
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
struct SshConnectionParameters;
|
||||
class SshRemoteProcessRunner;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
explicit MaemoKeyDeployer(QObject *parent = 0);
|
||||
~MaemoKeyDeployer();
|
||||
|
||||
void deployPublicKey(const Core::SshConnectionParameters &sshParams,
|
||||
void deployPublicKey(const Utils::SshConnectionParameters &sshParams,
|
||||
const QString &keyFilePath);
|
||||
void stopDeployment();
|
||||
|
||||
@@ -67,7 +67,7 @@ private slots:
|
||||
private:
|
||||
void cleanup();
|
||||
|
||||
QSharedPointer<Core::SshRemoteProcessRunner> m_deployProcess;
|
||||
QSharedPointer<Utils::SshRemoteProcessRunner> m_deployProcess;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -371,7 +372,7 @@ void MaemoPublisherFremantleFree::uploadPackage()
|
||||
m_uploader = SshRemoteProcessRunner::create(m_sshParams);
|
||||
connect(m_uploader.data(), SIGNAL(processStarted()),
|
||||
SLOT(handleScpStarted()));
|
||||
connect(m_uploader.data(), SIGNAL(connectionError(Core::SshError)),
|
||||
connect(m_uploader.data(), SIGNAL(connectionError(Utils::SshError)),
|
||||
SLOT(handleConnectionError()));
|
||||
connect(m_uploader.data(), SIGNAL(processClosed(int)),
|
||||
SLOT(handleUploadJobFinished(int)));
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#ifndef MAEMOPUBLISHERFREMANTLEFREE_H
|
||||
#define MAEMOPUBLISHERFREMANTLEFREE_H
|
||||
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QProcess>
|
||||
@@ -112,9 +112,9 @@ private:
|
||||
State m_state;
|
||||
QString m_tmpProjectDir;
|
||||
QProcess *m_process;
|
||||
Core::SshConnectionParameters m_sshParams;
|
||||
Utils::SshConnectionParameters m_sshParams;
|
||||
QString m_remoteDir;
|
||||
QSharedPointer<Core::SshRemoteProcessRunner> m_uploader;
|
||||
QSharedPointer<Utils::SshRemoteProcessRunner> m_uploader;
|
||||
QByteArray m_scpOutput;
|
||||
QList<QString> m_filesToUpload;
|
||||
QString m_resultString;
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#include "maemousedportsgatherer.h"
|
||||
#include "qt4maemotarget.h"
|
||||
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <coreplugin/ssh/sshremoteprocess.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshremoteprocess.h>
|
||||
#include <qt4projectmanager/qt4buildconfiguration.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QTimer)
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SftpChannel;
|
||||
class SshConnection;
|
||||
class SshRemoteProcess;
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
~MaemoRemoteMounter();
|
||||
|
||||
// Must already be connected.
|
||||
void setConnection(const QSharedPointer<Core::SshConnection> &connection);
|
||||
void setConnection(const QSharedPointer<Utils::SshConnection> &connection);
|
||||
|
||||
void setBuildConfiguration(const Qt4BuildConfiguration *bc);
|
||||
void addMountSpecification(const MaemoMountSpecification &mountSpec,
|
||||
@@ -120,10 +120,10 @@ private:
|
||||
int remotePort;
|
||||
};
|
||||
|
||||
QSharedPointer<Core::SshConnection> m_connection;
|
||||
QSharedPointer<Utils::SshConnection> m_connection;
|
||||
QList<MountInfo> m_mountSpecs;
|
||||
QSharedPointer<Core::SshRemoteProcess> m_mountProcess;
|
||||
QSharedPointer<Core::SshRemoteProcess> m_unmountProcess;
|
||||
QSharedPointer<Utils::SshRemoteProcess> m_mountProcess;
|
||||
QSharedPointer<Utils::SshRemoteProcess> m_unmountProcess;
|
||||
|
||||
typedef QSharedPointer<QProcess> ProcPtr;
|
||||
QList<ProcPtr> m_utfsServers;
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
#include "maemodeviceconfigurations.h"
|
||||
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -114,7 +114,7 @@ void MaemoRemoteProcessList::startProcess(const QByteArray &cmdLine,
|
||||
stop();
|
||||
}
|
||||
m_state = newState;
|
||||
connect(m_process.data(), SIGNAL(connectionError(Core::SshError)),
|
||||
connect(m_process.data(), SIGNAL(connectionError(Utils::SshError)),
|
||||
SLOT(handleConnectionError()));
|
||||
connect(m_process.data(), SIGNAL(processOutputAvailable(QByteArray)),
|
||||
SLOT(handleRemoteStdOut(QByteArray)));
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QString>
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
void stop();
|
||||
void startProcess(const QByteArray &cmdLine, State newState);
|
||||
|
||||
const QSharedPointer<Core::SshRemoteProcessRunner> m_process;
|
||||
const QSharedPointer<Utils::SshRemoteProcessRunner> m_process;
|
||||
QByteArray m_remoteStdout;
|
||||
QByteArray m_remoteStderr;
|
||||
QString m_errorMsg;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "maemodeviceconfigurations.h"
|
||||
|
||||
#include <coreplugin/ssh/sshkeygenerator.h>
|
||||
#include <utils/ssh/sshkeygenerator.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QApplication>
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtNetwork/QHostInfo>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
MaemoSshConfigDialog::MaemoSshConfigDialog(QWidget *parent)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshKeyGenerator;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
|
||||
private:
|
||||
QString home;
|
||||
QScopedPointer<Core::SshKeyGenerator> m_keyGenerator;
|
||||
QScopedPointer<Utils::SshKeyGenerator> m_keyGenerator;
|
||||
Ui::MaemoSshConfigDialog m_ui;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemousedportsgatherer.h"
|
||||
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <coreplugin/ssh/sshremoteprocess.h>
|
||||
#include <utils/ssh/sshconnection.h>
|
||||
#include <utils/ssh/sshremoteprocess.h>
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -125,7 +125,7 @@ void MaemoSshRunner::start()
|
||||
m_connection = SshConnection::create();
|
||||
connect(m_connection.data(), SIGNAL(connected()), this,
|
||||
SLOT(handleConnected()));
|
||||
connect(m_connection.data(), SIGNAL(error(Core::SshError)), this,
|
||||
connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this,
|
||||
SLOT(handleConnectionFailure()));
|
||||
if (reUse) {
|
||||
handleConnected();
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshConnection;
|
||||
class SshRemoteProcess;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
void startExecution(const QByteArray &remoteCall);
|
||||
|
||||
QSharedPointer<Core::SshConnection> connection() const { return m_connection; }
|
||||
QSharedPointer<Utils::SshConnection> connection() const { return m_connection; }
|
||||
const MaemoUsedPortsGatherer *usedPortsGatherer() const { return m_portsGatherer; }
|
||||
MaemoPortList *freePorts() { return &m_freePorts; }
|
||||
QString remoteExecutable() const { return m_remoteExecutable; }
|
||||
@@ -121,9 +121,9 @@ private:
|
||||
const MaemoPortList m_initialFreePorts;
|
||||
QList<MaemoMountSpecification> m_mountSpecs;
|
||||
|
||||
QSharedPointer<Core::SshConnection> m_connection;
|
||||
QSharedPointer<Core::SshRemoteProcess> m_runner;
|
||||
QSharedPointer<Core::SshRemoteProcess> m_cleaner;
|
||||
QSharedPointer<Utils::SshConnection> m_connection;
|
||||
QSharedPointer<Utils::SshRemoteProcess> m_runner;
|
||||
QSharedPointer<Utils::SshRemoteProcess> m_cleaner;
|
||||
QStringList m_procsToKill;
|
||||
MaemoPortList m_freePorts;
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
#include "maemoglobal.h"
|
||||
|
||||
#include <coreplugin/ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/ssh/sshremoteprocessrunner.h>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -49,7 +49,7 @@ MaemoUsedPortsGatherer::MaemoUsedPortsGatherer(QObject *parent) :
|
||||
|
||||
MaemoUsedPortsGatherer::~MaemoUsedPortsGatherer() {}
|
||||
|
||||
void MaemoUsedPortsGatherer::start(const Core::SshConnection::Ptr &connection,
|
||||
void MaemoUsedPortsGatherer::start(const Utils::SshConnection::Ptr &connection,
|
||||
const MaemoPortList &portList)
|
||||
{
|
||||
if (m_running)
|
||||
@@ -58,7 +58,7 @@ void MaemoUsedPortsGatherer::start(const Core::SshConnection::Ptr &connection,
|
||||
m_remoteStdout.clear();
|
||||
m_remoteStderr.clear();
|
||||
m_procRunner = SshRemoteProcessRunner::create(connection);
|
||||
connect(m_procRunner.data(), SIGNAL(connectionError(Core::SshError)),
|
||||
connect(m_procRunner.data(), SIGNAL(connectionError(Utils::SshError)),
|
||||
SLOT(handleConnectionError()));
|
||||
connect(m_procRunner.data(), SIGNAL(processClosed(int)),
|
||||
SLOT(handleProcessClosed(int)));
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core {
|
||||
namespace Utils {
|
||||
class SshConnection;
|
||||
class SshRemoteProcessRunner;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class MaemoUsedPortsGatherer : public QObject
|
||||
public:
|
||||
explicit MaemoUsedPortsGatherer(QObject *parent = 0);
|
||||
~MaemoUsedPortsGatherer();
|
||||
void start(const QSharedPointer<Core::SshConnection> &connection,
|
||||
void start(const QSharedPointer<Utils::SshConnection> &connection,
|
||||
const MaemoPortList &portList);
|
||||
void stop();
|
||||
int getNextFreePort(MaemoPortList *freePorts) const; // returns -1 if no more are left
|
||||
@@ -74,7 +74,7 @@ private slots:
|
||||
private:
|
||||
void setupUsedPorts();
|
||||
|
||||
QSharedPointer<Core::SshRemoteProcessRunner> m_procRunner;
|
||||
QSharedPointer<Utils::SshRemoteProcessRunner> m_procRunner;
|
||||
QList<int> m_usedPorts;
|
||||
QByteArray m_remoteStdout;
|
||||
QByteArray m_remoteStderr;
|
||||
|
||||
Reference in New Issue
Block a user