Various plugins: Fix some more C++20 warnings about [=] captures

Change-Id: If20aac4320c84096a07d67cc137886638286acf8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2024-02-05 20:50:49 +01:00
parent 97e582c3c0
commit 8bcc78a044
23 changed files with 76 additions and 69 deletions

View File

@@ -227,7 +227,9 @@ public:
menu->addAction(Tr::tr("&Copy \"%1\"").arg(reference),
[reference] { setClipboardAndSelection(reference); });
QAction *action = menu->addAction(Tr::tr("&Describe Change %1").arg(reference),
[=] { vcsDescribe(workingDirectory, reference); });
[this, workingDirectory, reference] {
vcsDescribe(workingDirectory, reference);
});
menu->setDefaultAction(action);
GitClient::addChangeActions(menu, workingDirectory, reference);
}
@@ -741,7 +743,7 @@ GitPluginPrivate::GitPluginPrivate()
Tr::tr("Update Submodules"), "Git.SubmoduleUpdate",
context, true, std::bind(&GitPluginPrivate::updateSubmodules, this));
auto createAction = [=](const QString &text, Id id,
auto createAction = [this, localRepositoryMenu, context](const QString &text, Id id,
const std::function<void(const FilePath &)> &callback) {
auto actionHandler = [this, callback] {
if (!DocumentManager::saveAllModifiedDocuments())