diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-05-20 11:29:06 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-05-20 14:19:34 +0000 |
commit | b2f7529c394e2c7bcf03c1545ec0fd8d26e4da82 (patch) | |
tree | 76001eec5e8d164abc4847e128abe254058b3a2a /src/plugins/cppeditor/cppparsecontext.cpp | |
parent | c23aa1c6560f332fdcfdf80943b6abd709029e2c (diff) |
CppEditor: Avoid capturing everything by reference
Some things will go out of scope, and only 'this' is actually needed.
Change-Id: Icd5740f925b2c869d933e5e64e5b21e9a9fb918d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppeditor/cppparsecontext.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppparsecontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppparsecontext.cpp b/src/plugins/cppeditor/cppparsecontext.cpp index 7e89e9d02e..08b5362a0a 100644 --- a/src/plugins/cppeditor/cppparsecontext.cpp +++ b/src/plugins/cppeditor/cppparsecontext.cpp @@ -144,7 +144,7 @@ ParseContextWidget::ParseContextWidget(ParseContextModel &parseContextModel, QWi // Set up context menu with a clear action setContextMenuPolicy(Qt::ActionsContextMenu); m_clearPreferredAction = new QAction(tr("Clear Preferred Parse Context"), this); - connect(m_clearPreferredAction, &QAction::triggered,[&]() { + connect(m_clearPreferredAction, &QAction::triggered, this, [this]() { m_parseContextModel.clearPreferred(); }); addAction(m_clearPreferredAction); |