forked from qt-creator/qt-creator
Debugger: Dissolve the DebugServerPortsGatherer::m_channelProviders[]
Try to simplify the structure. Lumping them together is not really needed. Change-Id: Ie31411448f66df29326219bcf652fb3da16a54bd Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -1110,23 +1110,23 @@ DebugServerPortsGatherer::DebugServerPortsGatherer(RunControl *runControl)
|
|||||||
setId("DebugServerPortsGatherer");
|
setId("DebugServerPortsGatherer");
|
||||||
auto portsGatherer = new PortsGatherer(runControl);
|
auto portsGatherer = new PortsGatherer(runControl);
|
||||||
|
|
||||||
for (int i = 0; i < 2; ++i) {
|
m_gdbChannelProvider = new Internal::SubChannelProvider(runControl, portsGatherer);
|
||||||
auto channelProvider = new Internal::SubChannelProvider(runControl, portsGatherer);
|
addStartDependency(m_gdbChannelProvider);
|
||||||
m_channelProviders[i] = channelProvider;
|
|
||||||
addStartDependency(channelProvider);
|
m_qmlChannelProvider = new Internal::SubChannelProvider(runControl, portsGatherer);
|
||||||
}
|
addStartDependency(m_qmlChannelProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugServerPortsGatherer::~DebugServerPortsGatherer() = default;
|
DebugServerPortsGatherer::~DebugServerPortsGatherer() = default;
|
||||||
|
|
||||||
QUrl DebugServerPortsGatherer::gdbServer() const
|
QUrl DebugServerPortsGatherer::gdbServer() const
|
||||||
{
|
{
|
||||||
return m_channelProviders[0]->channel();
|
return m_gdbChannelProvider->channel();
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl DebugServerPortsGatherer::qmlServer() const
|
QUrl DebugServerPortsGatherer::qmlServer() const
|
||||||
{
|
{
|
||||||
return m_channelProviders[1]->channel();
|
return m_qmlChannelProvider->channel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::startDebugServerIfNeededAndContinueStartup()
|
void DebuggerRunTool::startDebugServerIfNeededAndContinueStartup()
|
||||||
|
@@ -142,9 +142,10 @@ public:
|
|||||||
QUrl qmlServer() const;
|
QUrl qmlServer() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<Internal::SubChannelProvider *, 2> m_channelProviders;
|
|
||||||
bool m_useGdbServer = false;
|
bool m_useGdbServer = false;
|
||||||
bool m_useQmlServer = false;
|
bool m_useQmlServer = false;
|
||||||
|
Internal::SubChannelProvider *m_gdbChannelProvider;
|
||||||
|
Internal::SubChannelProvider *m_qmlChannelProvider;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebuggerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
class DebuggerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||||
|
Reference in New Issue
Block a user