summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitplugin.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2022-12-07 20:48:38 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2022-12-07 21:54:39 +0000
commit0313470db0d5333ea5eda2da81e15c682f3ab981 (patch)
tree85173b7a0e028ad134dbd89fe0fe478678b1ad0e /src/plugins/git/gitplugin.cpp
parent0d74be319af9425d6fba12a2f06cd3bc1c6ef28f (diff)
downloadqt-creator-0313470db0d5333ea5eda2da81e15c682f3ab981.tar.gz
VcsBase: Pass context object to lambda connections
Remove some unneeded lambda () brackets. Change-Id: I20e43625793401544e86efb627f5921c395026bb Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r--src/plugins/git/gitplugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 0a0a3c629c..ae3c98b42b 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -207,13 +207,13 @@ public:
QAction *copyToClipboardAction = new QAction;
copyToClipboardAction->setIcon(QIcon::fromTheme("edit-copy", Utils::Icons::COPY.icon()));
copyToClipboardAction->setToolTip(TextMark::tr("Copy SHA1 to Clipboard"));
- QObject::connect(copyToClipboardAction, &QAction::triggered, [info]() {
+ QObject::connect(copyToClipboardAction, &QAction::triggered, [info] {
Utils::setClipboardAndSelection(info.sha1);
});
QAction *showAction = new QAction;
showAction->setIcon(Utils::Icons::ZOOM.icon());
showAction->setToolTip(TextMark::tr("Show Commit %1").arg(info.sha1.left(8)));
- QObject::connect(showAction, &QAction::triggered, [info]() {
+ QObject::connect(showAction, &QAction::triggered, [info] {
GitClient::instance()->show(info.fileName, info.sha1);
});
return QList<QAction *>{copyToClipboardAction, showAction};
@@ -669,7 +669,7 @@ QAction *GitPluginPrivate::createRepositoryAction(ActionContainer *ac, const QSt
const Context &context, bool addToLocator,
GitClientMemberFunc func, const QKeySequence &keys)
{
- auto cb = [this, func]() -> void {
+ auto cb = [this, func] {
QTC_ASSERT(currentState().hasTopLevel(), return);
(m_gitClient.*func)(currentState().topLevel());
};
@@ -1575,7 +1575,7 @@ void GitPluginPrivate::instantBlame()
const VcsCommand *command = GitClient::instance()->vcsExec(
workingDirectory, {"blame", "-p", "-L", lineString, "--", filePath.toString()},
nullptr, false, RunFlags::NoOutput);
- connect(command, &VcsCommand::done, this, [command, filePath, line, this]() {
+ connect(command, &VcsCommand::done, this, [command, filePath, line, this] {
if (command->result() == ProcessResult::FinishedWithError &&
command->cleanedStdErr().contains("no such path")) {
disconnect(m_blameCursorPosConn);