PerfProfiler: Remove warnings

Remove warnings about unused arguments and [this] lambda captures.

Change-Id: Ic1ab0808008cf628a9114d4fcc7c38890f33d4dd
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-11-21 18:17:47 +01:00
parent 6b7d250744
commit 530119c2e3
5 changed files with 6 additions and 11 deletions

View File

@@ -3,8 +3,6 @@
#include "perfprofilerflamegraphmodel.h"
#include "perfprofilerflamegraphview.h"
#include "perfprofilertool.h"
#include "perftimelinemodel.h"
#include <tracing/flamegraph.h>
#include <tracing/timelinetheme.h>
@@ -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"));

View File

@@ -15,7 +15,7 @@ class PerfProfilerFlameGraphView : public QQuickWidget
{
Q_OBJECT
public:
PerfProfilerFlameGraphView(QWidget *parent, PerfProfilerTool *tool);
PerfProfilerFlameGraphView(QWidget *parent);
~PerfProfilerFlameGraphView();
void selectByTypeId(int typeId);

View File

@@ -3,7 +3,6 @@
#include "perfprofilerstatisticsmodel.h"
#include "perfprofilerstatisticsview.h"
#include "perfprofilertool.h"
#include <coreplugin/minisplitter.h>

View File

@@ -3,8 +3,6 @@
#pragma once
#include "perftimelinemodel.h"
#include <QWidget>
namespace PerfProfiler {

View File

@@ -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,