boot2qt: Fix reading the perf record args

Change-Id: I0b181dc05a409a38cbd87366a0cb6631c900ed24
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Dominik Holland
2024-03-07 16:53:20 +01:00
parent 54205c1b62
commit 18e1c36648

View File

@@ -5,6 +5,8 @@
#include "qdbconstants.h" #include "qdbconstants.h"
#include <perfprofiler/perfprofilerconstants.h>
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runcontrol.h> #include <projectexplorer/runcontrol.h>
@@ -88,13 +90,10 @@ public:
upperPort = qmlServerPort; upperPort = qmlServerPort;
} }
if (m_usePerf) { if (m_usePerf) {
Store settingsData = runControl()->settingsData("Analyzer.Perf.Settings"); const Store perfArgs = runControl()->settingsData(PerfProfiler::Constants::PerfSettingsId);
QVariant perfRecordArgs = settingsData.value("Analyzer.Perf.RecordArguments"); const QString recordArgs = perfArgs[PerfProfiler::Constants::PerfRecordArgsId].toString();
QString args = Utils::transform(perfRecordArgs.toStringList(), [](QString arg) {
return arg.replace(',', ",,");
}).join(',');
cmd.addArg("--profile-perf"); cmd.addArg("--profile-perf");
cmd.addArg(args); cmd.addArgs(recordArgs, CommandLine::Raw);
lowerPort = upperPort = perfPort; lowerPort = upperPort = perfPort;
} }
cmd.addArg("--port-range"); cmd.addArg("--port-range");