diff --git a/src/plugins/debugger/sourcefileshandler.cpp b/src/plugins/debugger/sourcefileshandler.cpp index 49bba486eea..ba39fbd1b12 100644 --- a/src/plugins/debugger/sourcefileshandler.cpp +++ b/src/plugins/debugger/sourcefileshandler.cpp @@ -121,7 +121,7 @@ bool SourceFilesHandler::setData(const QModelIndex &idx, const QVariant &data, i QModelIndex index = idx.sibling(idx.row(), 0); QString name = index.data().toString(); - auto addAction = [menu](const QString &display, bool on, const std::function &onTriggered) { + 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);