forked from qt-creator/qt-creator
remotelinux/projectexplorer: move UsedPortsGatherer to projectexplorer
Change-Id: Iafd7f109de3076375e667aff0c429405cef07b55 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef MADDEDEVICE_H
|
#ifndef MADDEDEVICE_H
|
||||||
#define MADDEDEVICE_H
|
#define MADDEDEVICE_H
|
||||||
|
|
||||||
|
@@ -35,11 +35,11 @@
|
|||||||
|
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace RemoteLinux;
|
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
|
@@ -36,8 +36,6 @@
|
|||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
|
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
namespace ProjectExplorer { class Profile; }
|
namespace ProjectExplorer { class Profile; }
|
||||||
namespace QSsh { class SshConnection; }
|
namespace QSsh { class SshConnection; }
|
||||||
namespace Utils { class FileName; }
|
namespace Utils { class FileName; }
|
||||||
@@ -49,6 +47,7 @@ class MaemoRemoteMounter;
|
|||||||
class MaemoDeploymentMounter : public QObject
|
class MaemoDeploymentMounter : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MaemoDeploymentMounter(QObject *parent = 0);
|
explicit MaemoDeploymentMounter(QObject *parent = 0);
|
||||||
~MaemoDeploymentMounter();
|
~MaemoDeploymentMounter();
|
||||||
|
@@ -33,8 +33,9 @@
|
|||||||
#include "maemoglobal.h"
|
#include "maemoglobal.h"
|
||||||
#include "maddedevice.h"
|
#include "maddedevice.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
|
#include <ssh/sshconnection.h>
|
||||||
#include <ssh/sshremoteprocessrunner.h>
|
#include <ssh/sshremoteprocessrunner.h>
|
||||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
@@ -52,7 +53,7 @@ MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent)
|
|||||||
m_utfsServerTimer(new QTimer(this)),
|
m_utfsServerTimer(new QTimer(this)),
|
||||||
m_mountProcess(new SshRemoteProcessRunner(this)),
|
m_mountProcess(new SshRemoteProcessRunner(this)),
|
||||||
m_unmountProcess(new SshRemoteProcessRunner(this)),
|
m_unmountProcess(new SshRemoteProcessRunner(this)),
|
||||||
m_portsGatherer(new RemoteLinuxUsedPortsGatherer(this)),
|
m_portsGatherer(new DeviceUsedPortsGatherer(this)),
|
||||||
m_state(Inactive)
|
m_state(Inactive)
|
||||||
{
|
{
|
||||||
connect(m_utfsServerTimer, SIGNAL(timeout()), SLOT(handleUtfsServerTimeout()));
|
connect(m_utfsServerTimer, SIGNAL(timeout()), SLOT(handleUtfsServerTimeout()));
|
||||||
|
@@ -45,8 +45,7 @@
|
|||||||
QT_FORWARD_DECLARE_CLASS(QTimer)
|
QT_FORWARD_DECLARE_CLASS(QTimer)
|
||||||
|
|
||||||
namespace QSsh { class SshRemoteProcessRunner; }
|
namespace QSsh { class SshRemoteProcessRunner; }
|
||||||
|
namespace ProjectExplorer { class DeviceUsedPortsGatherer; }
|
||||||
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
|
|
||||||
|
|
||||||
namespace Madde {
|
namespace Madde {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -54,6 +53,7 @@ namespace Internal {
|
|||||||
class MaemoRemoteMounter : public QObject
|
class MaemoRemoteMounter : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MaemoRemoteMounter(QObject *parent = 0);
|
MaemoRemoteMounter(QObject *parent = 0);
|
||||||
~MaemoRemoteMounter();
|
~MaemoRemoteMounter();
|
||||||
@@ -120,7 +120,7 @@ private:
|
|||||||
typedef QSharedPointer<QProcess> ProcPtr;
|
typedef QSharedPointer<QProcess> ProcPtr;
|
||||||
QList<ProcPtr> m_utfsServers;
|
QList<ProcPtr> m_utfsServers;
|
||||||
|
|
||||||
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
|
ProjectExplorer::DeviceUsedPortsGatherer *m_portsGatherer;
|
||||||
Utils::FileName m_maddeRoot;
|
Utils::FileName m_maddeRoot;
|
||||||
|
|
||||||
State m_state;
|
State m_state;
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
#include "deviceusedportsgatherer.h"
|
||||||
|
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -35,16 +35,13 @@
|
|||||||
#include <ssh/sshconnectionmanager.h>
|
#include <ssh/sshconnectionmanager.h>
|
||||||
#include <ssh/sshremoteprocess.h>
|
#include <ssh/sshremoteprocess.h>
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
|
||||||
using namespace QSsh;
|
using namespace QSsh;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace ProjectExplorer {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class RemoteLinuxUsedPortsGathererPrivate
|
class DeviceUsedPortsGathererPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SshConnection *connection;
|
SshConnection *connection;
|
||||||
@@ -58,21 +55,19 @@ class RemoteLinuxUsedPortsGathererPrivate
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
using namespace Internal;
|
DeviceUsedPortsGatherer::DeviceUsedPortsGatherer(QObject *parent) :
|
||||||
|
QObject(parent), d(new Internal::DeviceUsedPortsGathererPrivate)
|
||||||
RemoteLinuxUsedPortsGatherer::RemoteLinuxUsedPortsGatherer(QObject *parent) :
|
|
||||||
QObject(parent), d(new RemoteLinuxUsedPortsGathererPrivate)
|
|
||||||
{
|
{
|
||||||
d->connection = 0;
|
d->connection = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer::~RemoteLinuxUsedPortsGatherer()
|
DeviceUsedPortsGatherer::~DeviceUsedPortsGatherer()
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::start(const IDevice::ConstPtr &devConf)
|
void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &devConf)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!d->connection, return);
|
QTC_ASSERT(!d->connection, return);
|
||||||
d->portsToCheck = devConf->freePorts();
|
d->portsToCheck = devConf->freePorts();
|
||||||
@@ -87,7 +82,7 @@ void RemoteLinuxUsedPortsGatherer::start(const IDevice::ConstPtr &devConf)
|
|||||||
d->connection->connectToHost();
|
d->connection->connectToHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::handleConnectionEstablished()
|
void DeviceUsedPortsGatherer::handleConnectionEstablished()
|
||||||
{
|
{
|
||||||
QString command = d->command;
|
QString command = d->command;
|
||||||
if (command.isEmpty()) {
|
if (command.isEmpty()) {
|
||||||
@@ -113,7 +108,7 @@ void RemoteLinuxUsedPortsGatherer::handleConnectionEstablished()
|
|||||||
d->process->start();
|
d->process->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::stop()
|
void DeviceUsedPortsGatherer::stop()
|
||||||
{
|
{
|
||||||
if (!d->connection)
|
if (!d->connection)
|
||||||
return;
|
return;
|
||||||
@@ -128,7 +123,7 @@ void RemoteLinuxUsedPortsGatherer::stop()
|
|||||||
d->connection = 0;
|
d->connection = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RemoteLinuxUsedPortsGatherer::getNextFreePort(PortList *freePorts) const
|
int DeviceUsedPortsGatherer::getNextFreePort(PortList *freePorts) const
|
||||||
{
|
{
|
||||||
while (freePorts->hasMore()) {
|
while (freePorts->hasMore()) {
|
||||||
const int port = freePorts->getNext();
|
const int port = freePorts->getNext();
|
||||||
@@ -138,17 +133,17 @@ int RemoteLinuxUsedPortsGatherer::getNextFreePort(PortList *freePorts) const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<int> RemoteLinuxUsedPortsGatherer::usedPorts() const
|
QList<int> DeviceUsedPortsGatherer::usedPorts() const
|
||||||
{
|
{
|
||||||
return d->usedPorts;
|
return d->usedPorts;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::setCommand(const QString &command)
|
void DeviceUsedPortsGatherer::setCommand(const QString &command)
|
||||||
{
|
{
|
||||||
d->command = command;
|
d->command = command;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::setupUsedPorts()
|
void DeviceUsedPortsGatherer::setupUsedPorts()
|
||||||
{
|
{
|
||||||
QList<QByteArray> portStrings = d->remoteStdout.split('\n');
|
QList<QByteArray> portStrings = d->remoteStdout.split('\n');
|
||||||
portStrings.removeFirst();
|
portStrings.removeFirst();
|
||||||
@@ -168,7 +163,7 @@ void RemoteLinuxUsedPortsGatherer::setupUsedPorts()
|
|||||||
emit portListReady();
|
emit portListReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::handleConnectionError()
|
void DeviceUsedPortsGatherer::handleConnectionError()
|
||||||
{
|
{
|
||||||
if (!d->connection)
|
if (!d->connection)
|
||||||
return;
|
return;
|
||||||
@@ -176,7 +171,7 @@ void RemoteLinuxUsedPortsGatherer::handleConnectionError()
|
|||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::handleProcessClosed(int exitStatus)
|
void DeviceUsedPortsGatherer::handleProcessClosed(int exitStatus)
|
||||||
{
|
{
|
||||||
if (!d->connection)
|
if (!d->connection)
|
||||||
return;
|
return;
|
||||||
@@ -208,16 +203,16 @@ void RemoteLinuxUsedPortsGatherer::handleProcessClosed(int exitStatus)
|
|||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::handleRemoteStdOut()
|
void DeviceUsedPortsGatherer::handleRemoteStdOut()
|
||||||
{
|
{
|
||||||
if (d->process)
|
if (d->process)
|
||||||
d->remoteStdout += d->process->readAllStandardOutput();
|
d->remoteStdout += d->process->readAllStandardOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxUsedPortsGatherer::handleRemoteStdErr()
|
void DeviceUsedPortsGatherer::handleRemoteStdErr()
|
||||||
{
|
{
|
||||||
if (d->process)
|
if (d->process)
|
||||||
d->remoteStderr += d->process->readAllStandardError();
|
d->remoteStderr += d->process->readAllStandardError();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace ProjectExplorer
|
@@ -26,34 +26,25 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#ifndef REMOTELINUXUSEDPORTSGATHERER_H
|
|
||||||
#define REMOTELINUXUSEDPORTSGATHERER_H
|
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#ifndef DEVICEUSEDPORTSGATHERER_H
|
||||||
|
#define DEVICEUSEDPORTSGATHERER_H
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include "idevice.h"
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QObject>
|
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QString)
|
|
||||||
|
|
||||||
namespace Utils { class PortList; }
|
namespace Utils { class PortList; }
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace ProjectExplorer {
|
||||||
|
namespace Internal { class DeviceUsedPortsGathererPrivate; }
|
||||||
|
|
||||||
namespace Internal {
|
class PROJECTEXPLORER_EXPORT DeviceUsedPortsGatherer : public QObject
|
||||||
class RemoteLinuxUsedPortsGathererPrivate;
|
|
||||||
} // namespace Internal
|
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxUsedPortsGatherer : public QObject
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(RemoteLinuxUsedPortsGatherer)
|
|
||||||
public:
|
public:
|
||||||
explicit RemoteLinuxUsedPortsGatherer(QObject *parent = 0);
|
explicit DeviceUsedPortsGatherer(QObject *parent = 0);
|
||||||
~RemoteLinuxUsedPortsGatherer();
|
~DeviceUsedPortsGatherer();
|
||||||
|
|
||||||
void start(const ProjectExplorer::IDevice::ConstPtr &devConf);
|
void start(const ProjectExplorer::IDevice::ConstPtr &devConf);
|
||||||
void stop();
|
void stop();
|
||||||
int getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
|
int getNextFreePort(Utils::PortList *freePorts) const; // returns -1 if no more are left
|
||||||
@@ -75,9 +66,9 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void setupUsedPorts();
|
void setupUsedPorts();
|
||||||
|
|
||||||
Internal::RemoteLinuxUsedPortsGathererPrivate * const d;
|
Internal::DeviceUsedPortsGathererPrivate * const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace ProjectExplorer
|
||||||
|
|
||||||
#endif // REMOTELINUXUSEDPORTSGATHERER_H
|
#endif // DEVICEUSEDPORTSGATHERER_H
|
@@ -124,7 +124,8 @@ HEADERS += projectexplorer.h \
|
|||||||
devicesupport/deviceprocesslist.h \
|
devicesupport/deviceprocesslist.h \
|
||||||
devicesupport/deviceprocessesdialog.h \
|
devicesupport/deviceprocessesdialog.h \
|
||||||
devicesupport/devicesettingswidget.h \
|
devicesupport/devicesettingswidget.h \
|
||||||
devicesupport/devicesettingspage.h
|
devicesupport/devicesettingspage.h \
|
||||||
|
devicesupport/deviceusedportsgatherer.h
|
||||||
|
|
||||||
SOURCES += projectexplorer.cpp \
|
SOURCES += projectexplorer.cpp \
|
||||||
abi.cpp \
|
abi.cpp \
|
||||||
@@ -225,7 +226,8 @@ SOURCES += projectexplorer.cpp \
|
|||||||
devicesupport/deviceprocesslist.cpp \
|
devicesupport/deviceprocesslist.cpp \
|
||||||
devicesupport/deviceprocessesdialog.cpp \
|
devicesupport/deviceprocessesdialog.cpp \
|
||||||
devicesupport/devicesettingswidget.cpp \
|
devicesupport/devicesettingswidget.cpp \
|
||||||
devicesupport/devicesettingspage.cpp
|
devicesupport/devicesettingspage.cpp \
|
||||||
|
devicesupport/deviceusedportsgatherer.cpp
|
||||||
|
|
||||||
FORMS += processstep.ui \
|
FORMS += processstep.ui \
|
||||||
editorsettingspropertiespage.ui \
|
editorsettingspropertiespage.ui \
|
||||||
|
@@ -304,6 +304,8 @@ QtcPlugin {
|
|||||||
"devicesupport/devicesettingswidget.cpp",
|
"devicesupport/devicesettingswidget.cpp",
|
||||||
"devicesupport/devicesettingswidget.h",
|
"devicesupport/devicesettingswidget.h",
|
||||||
"devicesupport/devicesettingswidget.ui",
|
"devicesupport/devicesettingswidget.ui",
|
||||||
|
"devicesupport/deviceusedportsgatherer.cpp",
|
||||||
|
"devicesupport/deviceusedportsgatherer.h",
|
||||||
"devicesupport/idevicewidget.h",
|
"devicesupport/idevicewidget.h",
|
||||||
"devicesupport/idevicefactory.cpp",
|
"devicesupport/idevicefactory.cpp",
|
||||||
"devicesupport/idevicefactory.h"
|
"devicesupport/idevicefactory.h"
|
||||||
|
@@ -35,8 +35,6 @@
|
|||||||
#include "qnxrunconfiguration.h"
|
#include "qnxrunconfiguration.h"
|
||||||
#include "qnxconstants.h"
|
#include "qnxconstants.h"
|
||||||
|
|
||||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
|
||||||
|
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@
|
|||||||
#include "qnxconstants.h"
|
#include "qnxconstants.h"
|
||||||
|
|
||||||
#include <debugger/debuggerengine.h>
|
#include <debugger/debuggerengine.h>
|
||||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
using namespace Qnx;
|
using namespace Qnx;
|
||||||
|
@@ -37,11 +37,11 @@
|
|||||||
#include "qnxdeviceconfigurationwizardpages.h"
|
#include "qnxdeviceconfigurationwizardpages.h"
|
||||||
#include "qnxdeviceconfiguration.h"
|
#include "qnxdeviceconfiguration.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
#include <remotelinux/genericlinuxdeviceconfigurationwizardpages.h>
|
#include <remotelinux/genericlinuxdeviceconfigurationwizardpages.h>
|
||||||
#include <remotelinux/linuxdevicetestdialog.h>
|
#include <remotelinux/linuxdevicetestdialog.h>
|
||||||
#include <remotelinux/linuxdevicetester.h>
|
#include <remotelinux/linuxdevicetester.h>
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
@@ -40,13 +40,12 @@ namespace QSsh { class SshConnectionParameters; }
|
|||||||
namespace Utils { class PortList; }
|
namespace Utils { class PortList; }
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal { class LinuxDeviceConfigurationPrivate; }
|
||||||
class LinuxDeviceConfigurationPrivate;
|
|
||||||
} // namespace Internal
|
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT LinuxDeviceConfiguration : public ProjectExplorer::IDevice
|
class REMOTELINUX_EXPORT LinuxDeviceConfiguration : public ProjectExplorer::IDevice
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::LinuxDeviceConfiguration)
|
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::LinuxDeviceConfiguration)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QSharedPointer<LinuxDeviceConfiguration> Ptr;
|
typedef QSharedPointer<LinuxDeviceConfiguration> Ptr;
|
||||||
typedef QSharedPointer<const LinuxDeviceConfiguration> ConstPtr;
|
typedef QSharedPointer<const LinuxDeviceConfiguration> ConstPtr;
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "linuxdevicetester.h"
|
#include "linuxdevicetester.h"
|
||||||
|
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <ssh/sshremoteprocess.h>
|
#include <ssh/sshremoteprocess.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
IDevice::ConstPtr deviceConfiguration;
|
IDevice::ConstPtr deviceConfiguration;
|
||||||
SshConnection *connection;
|
SshConnection *connection;
|
||||||
SshRemoteProcess::Ptr process;
|
SshRemoteProcess::Ptr process;
|
||||||
RemoteLinuxUsedPortsGatherer portsGatherer;
|
DeviceUsedPortsGatherer portsGatherer;
|
||||||
State state;
|
State state;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void GenericLinuxDeviceTester::stopTest()
|
|||||||
setFinished(TestFailure);
|
setFinished(TestFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer *GenericLinuxDeviceTester::usedPortsGatherer() const
|
DeviceUsedPortsGatherer *GenericLinuxDeviceTester::usedPortsGatherer() const
|
||||||
{
|
{
|
||||||
return &d->portsGatherer;
|
return &d->portsGatherer;
|
||||||
}
|
}
|
||||||
|
@@ -35,16 +35,12 @@
|
|||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
namespace QSsh {
|
namespace ProjectExplorer { class DeviceUsedPortsGatherer; }
|
||||||
class SshConnection;
|
namespace QSsh { class SshConnection; }
|
||||||
}
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class RemoteLinuxUsedPortsGatherer;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal { class GenericLinuxDeviceTesterPrivate; }
|
||||||
class GenericLinuxDeviceTesterPrivate;
|
|
||||||
}
|
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT AbstractLinuxDeviceTester : public QObject
|
class REMOTELINUX_EXPORT AbstractLinuxDeviceTester : public QObject
|
||||||
{
|
{
|
||||||
@@ -77,7 +73,7 @@ public:
|
|||||||
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
|
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
|
||||||
void stopTest();
|
void stopTest();
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
|
ProjectExplorer::DeviceUsedPortsGatherer *usedPortsGatherer() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
|
@@ -44,7 +44,6 @@ HEADERS += \
|
|||||||
remotelinuxenvironmentreader.h \
|
remotelinuxenvironmentreader.h \
|
||||||
sshkeydeployer.h \
|
sshkeydeployer.h \
|
||||||
typespecificdeviceconfigurationlistmodel.h \
|
typespecificdeviceconfigurationlistmodel.h \
|
||||||
remotelinuxusedportsgatherer.h \
|
|
||||||
remotelinuxutils.h \
|
remotelinuxutils.h \
|
||||||
deploymentsettingsassistant.h \
|
deploymentsettingsassistant.h \
|
||||||
remotelinuxdeployconfigurationwidget.h \
|
remotelinuxdeployconfigurationwidget.h \
|
||||||
@@ -92,7 +91,6 @@ SOURCES += \
|
|||||||
remotelinuxenvironmentreader.cpp \
|
remotelinuxenvironmentreader.cpp \
|
||||||
sshkeydeployer.cpp \
|
sshkeydeployer.cpp \
|
||||||
typespecificdeviceconfigurationlistmodel.cpp \
|
typespecificdeviceconfigurationlistmodel.cpp \
|
||||||
remotelinuxusedportsgatherer.cpp \
|
|
||||||
remotelinuxutils.cpp \
|
remotelinuxutils.cpp \
|
||||||
deploymentsettingsassistant.cpp \
|
deploymentsettingsassistant.cpp \
|
||||||
remotelinuxdeployconfigurationwidget.cpp \
|
remotelinuxdeployconfigurationwidget.cpp \
|
||||||
|
@@ -87,7 +87,6 @@ QtcPlugin {
|
|||||||
"remotelinuxrunconfigurationwidget.cpp",
|
"remotelinuxrunconfigurationwidget.cpp",
|
||||||
"remotelinuxrunconfigurationwidget.h",
|
"remotelinuxrunconfigurationwidget.h",
|
||||||
"remotelinuxruncontrol.h",
|
"remotelinuxruncontrol.h",
|
||||||
"remotelinuxusedportsgatherer.cpp",
|
|
||||||
"remotelinuxutils.cpp",
|
"remotelinuxutils.cpp",
|
||||||
"remotelinuxutils.h",
|
"remotelinuxutils.h",
|
||||||
"startgdbserverdialog.cpp",
|
"startgdbserverdialog.cpp",
|
||||||
@@ -105,7 +104,6 @@ QtcPlugin {
|
|||||||
"remotelinuxenvironmentreader.cpp",
|
"remotelinuxenvironmentreader.cpp",
|
||||||
"remotelinuxenvironmentreader.h",
|
"remotelinuxenvironmentreader.h",
|
||||||
"remotelinuxpackageinstaller.h",
|
"remotelinuxpackageinstaller.h",
|
||||||
"remotelinuxusedportsgatherer.h",
|
|
||||||
"sshkeydeployer.cpp",
|
"sshkeydeployer.cpp",
|
||||||
"sshkeydeployer.h",
|
"sshkeydeployer.h",
|
||||||
"typespecificdeviceconfigurationlistmodel.cpp",
|
"typespecificdeviceconfigurationlistmodel.cpp",
|
||||||
|
@@ -31,10 +31,10 @@
|
|||||||
|
|
||||||
#include "linuxdeviceconfiguration.h"
|
#include "linuxdeviceconfiguration.h"
|
||||||
#include "remotelinuxrunconfiguration.h"
|
#include "remotelinuxrunconfiguration.h"
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
|
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
state(Inactive)
|
state(Inactive)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer portsGatherer;
|
DeviceUsedPortsGatherer portsGatherer;
|
||||||
IDevice::ConstPtr devConfig;
|
IDevice::ConstPtr devConfig;
|
||||||
const QString remoteExecutable;
|
const QString remoteExecutable;
|
||||||
const QString appArguments;
|
const QString appArguments;
|
||||||
@@ -119,7 +119,7 @@ IDevice::ConstPtr AbstractRemoteLinuxApplicationRunner::devConfig() const
|
|||||||
return d->devConfig;
|
return d->devConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer *AbstractRemoteLinuxApplicationRunner::usedPortsGatherer() const
|
DeviceUsedPortsGatherer *AbstractRemoteLinuxApplicationRunner::usedPortsGatherer() const
|
||||||
{
|
{
|
||||||
return &d->portsGatherer;
|
return &d->portsGatherer;
|
||||||
}
|
}
|
||||||
|
@@ -26,26 +26,22 @@
|
|||||||
**
|
**
|
||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef REMOTELINUXAPPLICATIONRUNNER_H
|
#ifndef REMOTELINUXAPPLICATIONRUNNER_H
|
||||||
#define REMOTELINUXAPPLICATIONRUNNER_H
|
#define REMOTELINUXAPPLICATIONRUNNER_H
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include "remotelinux_export.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
#include <QObject>
|
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
namespace QSsh { class SshConnection; }
|
namespace QSsh { class SshConnection; }
|
||||||
namespace Utils { class PortList; }
|
namespace Utils { class PortList; }
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class RemoteLinuxRunConfiguration;
|
class RemoteLinuxRunConfiguration;
|
||||||
class RemoteLinuxUsedPortsGatherer;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal { class AbstractRemoteLinuxApplicationRunnerPrivate; }
|
||||||
class AbstractRemoteLinuxApplicationRunnerPrivate;
|
|
||||||
}
|
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT AbstractRemoteLinuxApplicationRunner : public QObject
|
class REMOTELINUX_EXPORT AbstractRemoteLinuxApplicationRunner : public QObject
|
||||||
{
|
{
|
||||||
@@ -63,7 +59,7 @@ public:
|
|||||||
|
|
||||||
ProjectExplorer::IDevice::ConstPtr devConfig() const;
|
ProjectExplorer::IDevice::ConstPtr devConfig() const;
|
||||||
QSsh::SshConnection *connection() const;
|
QSsh::SshConnection *connection() const;
|
||||||
RemoteLinuxUsedPortsGatherer *usedPortsGatherer() const;
|
ProjectExplorer::DeviceUsedPortsGatherer *usedPortsGatherer() const;
|
||||||
Utils::PortList *freePorts();
|
Utils::PortList *freePorts();
|
||||||
QString remoteExecutable() const;
|
QString remoteExecutable() const;
|
||||||
QString arguments() const;
|
QString arguments() const;
|
||||||
|
@@ -31,13 +31,13 @@
|
|||||||
|
|
||||||
#include "remotelinuxapplicationrunner.h"
|
#include "remotelinuxapplicationrunner.h"
|
||||||
#include "remotelinuxrunconfiguration.h"
|
#include "remotelinuxrunconfiguration.h"
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
|
||||||
|
|
||||||
#include <debugger/debuggerengine.h>
|
#include <debugger/debuggerengine.h>
|
||||||
#include <debugger/debuggerstartparameters.h>
|
#include <debugger/debuggerstartparameters.h>
|
||||||
#include <debugger/debuggerprofileinformation.h>
|
#include <debugger/debuggerprofileinformation.h>
|
||||||
#include <projectexplorer/abi.h>
|
#include <projectexplorer/abi.h>
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
#include <projectexplorer/profile.h>
|
#include <projectexplorer/profile.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
@@ -30,13 +30,13 @@
|
|||||||
|
|
||||||
#include "startgdbserverdialog.h"
|
#include "startgdbserverdialog.h"
|
||||||
|
|
||||||
#include "remotelinuxusedportsgatherer.h"
|
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <projectexplorer/profilechooser.h>
|
#include <projectexplorer/profilechooser.h>
|
||||||
#include <projectexplorer/profileinformation.h>
|
#include <projectexplorer/profileinformation.h>
|
||||||
#include <projectexplorer/devicesupport/deviceprocesslist.h>
|
#include <projectexplorer/devicesupport/deviceprocesslist.h>
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
|
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/portlist.h>
|
#include <utils/portlist.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
QPushButton *closeButton;
|
QPushButton *closeButton;
|
||||||
ProfileChooser *profileChooser;
|
ProfileChooser *profileChooser;
|
||||||
|
|
||||||
RemoteLinuxUsedPortsGatherer gatherer;
|
DeviceUsedPortsGatherer gatherer;
|
||||||
SshRemoteProcessRunner runner;
|
SshRemoteProcessRunner runner;
|
||||||
QSettings *settings;
|
QSettings *settings;
|
||||||
QString remoteCommandLine;
|
QString remoteCommandLine;
|
||||||
|
Reference in New Issue
Block a user