aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/valgrind/valgrindengine.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2019-08-27 16:44:42 +0200
committerhjk <[email protected]>2019-09-05 13:45:25 +0000
commit758986ea0ec802018b41aece18a98c2dde3327b5 (patch)
tree0528bede9777773efee1fbb5a35ae11cf5b0cfcb /src/plugins/valgrind/valgrindengine.cpp
parentc9c214057e667beb345879bece5f780ee3287542 (diff)
ProjectExplorer: Store some aspect data by value in the RunControl
Change-Id: Idb7e119b5b0b483ce91efeb21fb415b654cfed4f Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/valgrind/valgrindengine.cpp')
-rw-r--r--src/plugins/valgrind/valgrindengine.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp
index 4b012e73304..486bbae244f 100644
--- a/src/plugins/valgrind/valgrindengine.cpp
+++ b/src/plugins/valgrind/valgrindengine.cpp
@@ -58,11 +58,7 @@ ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl)
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
setSupportsReRunning(false);
- m_settings =
- qobject_cast<ValgrindBaseSettings *>(runControl->settings(ANALYZER_VALGRIND_SETTINGS));
-
- if (!m_settings)
- m_settings = ValgrindGlobalSettings::instance();
+ m_settings.fromMap(runControl->settingsData(ANALYZER_VALGRIND_SETTINGS));
}
void ValgrindToolRunner::start()
@@ -81,7 +77,7 @@ void ValgrindToolRunner::start()
emit outputReceived(tr("Command line arguments: %1").arg(runnable().debuggeeArgs), DebugFormat);
#endif
- CommandLine valgrind{m_settings->valgrindExecutable()};
+ CommandLine valgrind{m_settings.valgrindExecutable()};
valgrind.addArgs(genericToolArguments());
valgrind.addArgs(toolArguments());
@@ -125,9 +121,9 @@ FilePath ValgrindToolRunner::executable() const
QStringList ValgrindToolRunner::genericToolArguments() const
{
- QTC_ASSERT(m_settings, return QStringList());
QString smcCheckValue;
- switch (m_settings->selfModifyingCodeDetection()) {
+
+ switch (m_settings.selfModifyingCodeDetection()) {
case ValgrindBaseSettings::DetectSmcNo:
smcCheckValue = "none";
break;
@@ -178,7 +174,7 @@ void ValgrindToolRunner::receiveProcessOutput(const QString &output, OutputForma
void ValgrindToolRunner::receiveProcessError(const QString &message, QProcess::ProcessError error)
{
if (error == QProcess::FailedToStart) {
- const QString valgrind = m_settings->valgrindExecutable();
+ const QString valgrind = m_settings.valgrindExecutable();
if (!valgrind.isEmpty())
appendMessage(tr("Error: \"%1\" could not be started: %2").arg(valgrind, message), ErrorMessageFormat);
else