ProjectExplorer: Use std::function for SimpleTargetRunner::start()

This spares us the typical r = runnable(); modify(r); setRunnable(r)
roundtrip and the m_runnable storage that might or might not
be the same as runControl->runnable. Similar for m_device.

Change-Id: I8300260dd8dd7cd395e40bcd3d2ae45089085008
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-09-02 18:22:35 +02:00
parent 8d85a7c2bc
commit 4028a41d2e
17 changed files with 222 additions and 290 deletions

View File

@@ -166,15 +166,10 @@ public:
~GdbServerRunner() override;
void setRunnable(const ProjectExplorer::Runnable &runnable);
void setUseMulti(bool on);
void setAttachPid(Utils::ProcessHandle pid);
private:
void start() override;
GdbServerPortsGatherer *m_portsGatherer;
ProjectExplorer::Runnable m_runnable;
Utils::ProcessHandle m_pid;
bool m_useMulti = true;
};