From 8ab67ef24e8503ee297a4f850aa951503f1b8c90 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 11 Nov 2018 15:30:07 +0200 Subject: [PATCH] Debugger: Fix MSVC warning sourcefileshandler.cpp:127: warning: C4573: the usage of 'QObject::connect' requires the compiler to capture 'this' but the current default capture mode does not allow it Change-Id: Ic8ab7de11a91727dffac91d37b1b82e7ea933b65 Reviewed-by: Christian Stenger --- src/plugins/debugger/sourcefileshandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/sourcefileshandler.cpp b/src/plugins/debugger/sourcefileshandler.cpp index 3de9b483607..c7761c7b290 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);