From 530119c2e36698ff05fc934551572cf7ba9085e5 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 21 Nov 2023 18:17:47 +0100 Subject: [PATCH] PerfProfiler: Remove warnings Remove warnings about unused arguments and [this] lambda captures. Change-Id: Ic1ab0808008cf628a9114d4fcc7c38890f33d4dd Reviewed-by: hjk --- src/plugins/perfprofiler/perfprofilerflamegraphview.cpp | 6 ++---- src/plugins/perfprofiler/perfprofilerflamegraphview.h | 2 +- src/plugins/perfprofiler/perfprofilerstatisticsview.cpp | 1 - src/plugins/perfprofiler/perfprofilerstatisticsview.h | 2 -- src/plugins/perfprofiler/perfprofilertool.cpp | 6 +++--- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/plugins/perfprofiler/perfprofilerflamegraphview.cpp b/src/plugins/perfprofiler/perfprofilerflamegraphview.cpp index 79d71b34395..076c9778882 100644 --- a/src/plugins/perfprofiler/perfprofilerflamegraphview.cpp +++ b/src/plugins/perfprofiler/perfprofilerflamegraphview.cpp @@ -3,8 +3,6 @@ #include "perfprofilerflamegraphmodel.h" #include "perfprofilerflamegraphview.h" -#include "perfprofilertool.h" -#include "perftimelinemodel.h" #include #include @@ -16,8 +14,8 @@ namespace PerfProfiler { namespace Internal { -PerfProfilerFlameGraphView::PerfProfilerFlameGraphView(QWidget *parent, PerfProfilerTool *tool) : - QQuickWidget(parent) +PerfProfilerFlameGraphView::PerfProfilerFlameGraphView(QWidget *parent) + : QQuickWidget(parent) { setObjectName(QLatin1String("PerfProfilerFlameGraphView")); diff --git a/src/plugins/perfprofiler/perfprofilerflamegraphview.h b/src/plugins/perfprofiler/perfprofilerflamegraphview.h index 945429440f0..e626ef8a17c 100644 --- a/src/plugins/perfprofiler/perfprofilerflamegraphview.h +++ b/src/plugins/perfprofiler/perfprofilerflamegraphview.h @@ -15,7 +15,7 @@ class PerfProfilerFlameGraphView : public QQuickWidget { Q_OBJECT public: - PerfProfilerFlameGraphView(QWidget *parent, PerfProfilerTool *tool); + PerfProfilerFlameGraphView(QWidget *parent); ~PerfProfilerFlameGraphView(); void selectByTypeId(int typeId); diff --git a/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp b/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp index 701308d3744..1ef10ca304a 100644 --- a/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp +++ b/src/plugins/perfprofiler/perfprofilerstatisticsview.cpp @@ -3,7 +3,6 @@ #include "perfprofilerstatisticsmodel.h" #include "perfprofilerstatisticsview.h" -#include "perfprofilertool.h" #include diff --git a/src/plugins/perfprofiler/perfprofilerstatisticsview.h b/src/plugins/perfprofiler/perfprofilerstatisticsview.h index 58c80499b80..e572eef7108 100644 --- a/src/plugins/perfprofiler/perfprofilerstatisticsview.h +++ b/src/plugins/perfprofiler/perfprofilerstatisticsview.h @@ -3,8 +3,6 @@ #pragma once -#include "perftimelinemodel.h" - #include namespace PerfProfiler { diff --git a/src/plugins/perfprofiler/perfprofilertool.cpp b/src/plugins/perfprofiler/perfprofilertool.cpp index e06adb88b7d..07847e3271b 100644 --- a/src/plugins/perfprofiler/perfprofilertool.cpp +++ b/src/plugins/perfprofiler/perfprofilertool.cpp @@ -100,7 +100,7 @@ PerfProfilerTool::PerfProfilerTool() command = Core::ActionManager::registerAction(m_showFullRange, Constants::PerfProfilerTaskFullRange, globalContext); - connect(m_showFullRange, &QAction::triggered, this, [this]() { + connect(m_showFullRange, &QAction::triggered, this, [] { traceManager().restrictByFilter(traceManager().rangeAndThreadFilter(-1, -1)); }); options->addAction(command); @@ -179,7 +179,7 @@ void PerfProfilerTool::createViews() m_statisticsView = new PerfProfilerStatisticsView; m_statisticsView->setWindowTitle(Tr::tr("Statistics")); - m_flameGraphView = new PerfProfilerFlameGraphView(nullptr, this); + m_flameGraphView = new PerfProfilerFlameGraphView(nullptr); m_flameGraphView->setWindowTitle(Tr::tr("Flame Graph")); connect(m_statisticsView, &PerfProfilerStatisticsView::gotoSourceLocation, @@ -500,7 +500,7 @@ void PerfProfilerTool::updateFilterMenu() if (thread.tid == 0) { action->setEnabled(false); } else { - connect(action, &QAction::toggled, this, [this, action](bool checked) { + connect(action, &QAction::toggled, this, [action](bool checked) { traceManager().setThreadEnabled(action->data().toUInt(), checked); }); connect(enableAll, &QAction::triggered,