forked from qt-creator/qt-creator
Introduce a ChannelProvider run worker
... to provide a set of urls indicating usable connection points for 'server-using' tools (typically one, like gdbserver and the Qml tooling, but two for mixed debugging). Urls can describe local or tcp servers that are directly accessible to the host tools, if needed port forwarding could be set up when needed. Use it as new base for GdbServerPortsGatherer for starters. Note: Since none of the customization points for actual port forwarding are currently provided by device implementations only non-forwarding cases are working right now. Incidentally this does not affect existing setups, as the only case where it would be needed (Android/adb) have a complete custom implementation. The medium-term plan there is of course to use this new setup here and have the AndroidDevice implementation only provide the forwarding, not the whole debugging (etc...) Change-Id: I42c9783348cd430b1c435bbca56329c678ac485c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -147,7 +147,7 @@ private:
|
||||
bool m_isDying = false;
|
||||
};
|
||||
|
||||
class DEBUGGER_EXPORT GdbServerPortsGatherer : public ProjectExplorer::RunWorker
|
||||
class DEBUGGER_EXPORT GdbServerPortsGatherer : public ProjectExplorer::ChannelProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -157,25 +157,19 @@ public:
|
||||
|
||||
void setUseGdbServer(bool useIt) { m_useGdbServer = useIt; }
|
||||
bool useGdbServer() const { return m_useGdbServer; }
|
||||
Utils::Port gdbServerPort() const { return m_gdbServerPort; }
|
||||
Utils::Port gdbServerPort() const;
|
||||
QString gdbServerChannel() const;
|
||||
|
||||
void setUseQmlServer(bool useIt) { m_useQmlServer = useIt; }
|
||||
bool useQmlServer() const { return m_useQmlServer; }
|
||||
Utils::Port qmlServerPort() const { return m_qmlServerPort; }
|
||||
Utils::Port qmlServerPort() const;
|
||||
QUrl qmlServer() const;
|
||||
|
||||
void setDevice(ProjectExplorer::IDevice::ConstPtr device);
|
||||
|
||||
private:
|
||||
void start() override;
|
||||
void handlePortListReady();
|
||||
|
||||
ProjectExplorer::DeviceUsedPortsGatherer m_portsGatherer;
|
||||
bool m_useGdbServer = false;
|
||||
bool m_useQmlServer = false;
|
||||
Utils::Port m_gdbServerPort;
|
||||
Utils::Port m_qmlServerPort;
|
||||
ProjectExplorer::IDevice::ConstPtr m_device;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user