From 3784f69c9eb6aeb1636e865eb84fdf82caa88c9e Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 11 May 2022 10:21:38 +0200 Subject: [PATCH] Debugger: Fix compiler warnings Remove unused lambda captures Change-Id: Ibe3cc4477442ea77a86045666b629fee8f27d084 Reviewed-by: Qt CI Bot Reviewed-by: hjk Reviewed-by: --- src/plugins/debugger/debuggerplugin.cpp | 2 +- src/plugins/debugger/sourcefileshandler.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 8c63e86cba2..c41e9c8e8e4 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -812,7 +812,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments) vbox->insertWidget(0, label); }; - const auto addFontSizeAdaptation = [this](QWidget *widget) { + const auto addFontSizeAdaptation = [](QWidget *widget) { QObject::connect(TextEditorSettings::instance(), &TextEditorSettings::fontSettingsChanged, [widget](const FontSettings &settings) { if (!debuggerSettings()->fontSizeFollowsEditor.value()) diff --git a/src/plugins/debugger/sourcefileshandler.cpp b/src/plugins/debugger/sourcefileshandler.cpp index 36b35ec63fa..53ae125ba7e 100644 --- a/src/plugins/debugger/sourcefileshandler.cpp +++ b/src/plugins/debugger/sourcefileshandler.cpp @@ -120,12 +120,13 @@ bool SourceFilesHandler::setData(const QModelIndex &idx, const QVariant &data, i QModelIndex index = idx.sibling(idx.row(), 0); QString name = index.data().toString(); - auto addAction = [this, menu](const QString &display, bool on, const std::function &onTriggered) { - QAction *act = menu->addAction(display); - act->setEnabled(on); - QObject::connect(act, &QAction::triggered, onTriggered); - return act; - }; + auto addAction = + [menu](const QString &display, bool on, const std::function &onTriggered) { + QAction *act = menu->addAction(display); + act->setEnabled(on); + QObject::connect(act, &QAction::triggered, onTriggered); + return act; + }; addAction(tr("Reload Data"), m_engine->debuggerActionsEnabled(), [this] { m_engine->reloadSourceFiles(); });