aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/valgrind/valgrindengine.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-03-11 15:42:43 +0100
committerhjk <hjk@qt.io>2019-03-12 12:27:35 +0000
commit9ef0b97716e4ed73187470bc574a9c2a550d8901 (patch)
treead89a72d5947f14ac3342aed65961f31d7736169 /src/plugins/valgrind/valgrindengine.cpp
parent582f72f433c0b68ada35d0d2912f4c21146f17d7 (diff)
Avoid some visible uses of RunControl::runConfiguration()
For a long time, probably from the very beginning, a RunControl was meant to hold (a copy of) data needed for its operation, that was valid at the time of its construction, to be resilient in cases where RunConfiguration setting were changed while the RunControl was running, or to properly re-run with the original settings. Unfortunately, the task was repetitive, as RunConfiguration classes had no generic access to properties / "aspects" and there was was the runConfiguration() accessor (probably for mostly unrelated reasons in the output pane handling) which made the idea of just casting that to the original runConfiguration and access the data directly there appealing, with all the expected consequences. This patch here partially addresses the issue by copying some more of the related data at RunControl construction time and adjust the using code, avoiding most uses of the runConfiguration() accessor in a mostly mechanical matter. Complete removal appears possible, but will be less mechanical in "difficult" plugins like ios, so this is left for later. The new accessors in RunControl are very much ad-hoc, leaving room for improvement, e.g. by consolidating the access to the run config settings aspects with the other runconfig aspects or similar. For now the goal is to remove the runConfiguration() accessor, and to as much as possible fixed data after RunControl setup is finished. Next step would be to officially allow construction of RunControls without a specific RunConfiguration by setting the necessary data independently, removing the need for the various workarounds that are currently used for the purpose of faking (parts of) the effect of the non-existing RunConfiguration or refusing to operate at all, even if it would be possible. Change-Id: If8e5596da8422c70e90f97270389adbe6d0b46f2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/valgrind/valgrindengine.cpp')
-rw-r--r--src/plugins/valgrind/valgrindengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp
index 3aa2f78eac..b3d991fc26 100644
--- a/src/plugins/valgrind/valgrindengine.cpp
+++ b/src/plugins/valgrind/valgrindengine.cpp
@@ -86,7 +86,7 @@ void ValgrindToolRunner::start()
m_runner.setDevice(device());
m_runner.setDebuggee(runnable());
- if (auto aspect = runControl()->runConfiguration()->aspect<TerminalAspect>())
+ if (auto aspect = runControl()->aspect<TerminalAspect>())
m_runner.setUseTerminal(aspect->useTerminal());
connect(&m_runner, &ValgrindRunner::processOutputReceived,