From d9768caf766a23137021833adc0f7505fc6d14c3 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 14 Jul 2023 11:49:37 +0200 Subject: [PATCH] PerFProfiler: Use aspects more directly Change-Id: I6d15d32d9cd02acd9a95bb96cbde72beff506931 Reviewed-by: Christian Stenger --- src/plugins/perfprofiler/perfconfigeventsmodel.cpp | 4 ++-- src/plugins/perfprofiler/perfsettings.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/perfprofiler/perfconfigeventsmodel.cpp b/src/plugins/perfprofiler/perfconfigeventsmodel.cpp index a235a6122db..ac7924cfe0e 100644 --- a/src/plugins/perfprofiler/perfconfigeventsmodel.cpp +++ b/src/plugins/perfprofiler/perfconfigeventsmodel.cpp @@ -22,7 +22,7 @@ PerfConfigEventsModel::PerfConfigEventsModel(PerfSettings *settings, QObject *pa int PerfConfigEventsModel::rowCount(const QModelIndex &parent) const { - return parent.isValid() ? 0 : m_settings->events.value().length(); + return parent.isValid() ? 0 : m_settings->events().length(); } int PerfConfigEventsModel::columnCount(const QModelIndex &parent) const @@ -40,7 +40,7 @@ QVariant PerfConfigEventsModel::data(const QModelIndex &index, int role) const return QVariant(); // ignore } - QString event = m_settings->events.value().value(index.row()); + QString event = m_settings->events().value(index.row()); const EventDescription description = parseEvent(event); switch (index.column()) { case ColumnEventType: { diff --git a/src/plugins/perfprofiler/perfsettings.cpp b/src/plugins/perfprofiler/perfsettings.cpp index 8851b19d777..6322f77fa12 100644 --- a/src/plugins/perfprofiler/perfsettings.cpp +++ b/src/plugins/perfprofiler/perfsettings.cpp @@ -99,10 +99,10 @@ void PerfSettings::addPerfRecordArguments(CommandLine *cmd) const { QString callgraphArg = callgraphMode.itemValue().toString(); if (callgraphArg == Constants::PerfCallgraphDwarf) - callgraphArg += "," + QString::number(stackSize.value()); + callgraphArg += "," + QString::number(stackSize()); QString events; - for (const QString &event : this->events.value()) { + for (const QString &event : this->events()) { if (!event.isEmpty()) { if (!events.isEmpty()) events.append(','); @@ -113,7 +113,7 @@ void PerfSettings::addPerfRecordArguments(CommandLine *cmd) const cmd->addArgs({"-e", events, "--call-graph", callgraphArg, sampleMode.itemValue().toString(), - QString::number(period.value())}); + QString::number(period())}); cmd->addArgs(extraArguments(), CommandLine::Raw); }