forked from qt-creator/qt-creator
ClangTools: Pass context object to lambda connections
Remove some unneeded lambda () brackets. Change-Id: I502eb5cd89505fb77c02abf44b7ce19541a8ac2f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -125,7 +125,7 @@ void ClangCodeModelPlugin::createCompilationDBButton()
|
||||
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD);
|
||||
|
||||
connect(&m_generatorWatcher, &QFutureWatcher<GenerateCompilationDbResult>::finished,
|
||||
this, [this] () {
|
||||
this, [this] {
|
||||
const GenerateCompilationDbResult result = m_generatorWatcher.result();
|
||||
QString message;
|
||||
if (result.error.isEmpty()) {
|
||||
|
||||
@@ -483,7 +483,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
|
||||
return;
|
||||
const auto generatorWatcher = new QFutureWatcher<GenerateCompilationDbResult>;
|
||||
connect(generatorWatcher, &QFutureWatcher<GenerateCompilationDbResult>::finished,
|
||||
[this, project, projectInfo, jsonDbDir, generatorWatcher] {
|
||||
this, [this, project, projectInfo, jsonDbDir, generatorWatcher] {
|
||||
generatorWatcher->deleteLater();
|
||||
if (!isProjectDataUpToDate(project, projectInfo, jsonDbDir))
|
||||
return;
|
||||
@@ -781,7 +781,7 @@ void addFixItsActionsToMenu(QMenu *menu, const TextEditor::QuickFixOperations &f
|
||||
{
|
||||
for (const TextEditor::QuickFixOperation::Ptr &fixItOperation : fixItOperations) {
|
||||
QAction *action = menu->addAction(fixItOperation->description());
|
||||
QObject::connect(action, &QAction::triggered, [fixItOperation]() {
|
||||
QObject::connect(action, &QAction::triggered, [fixItOperation] {
|
||||
fixItOperation->perform();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ bool runClangBatchFile(const QString &filePath)
|
||||
QTC_ASSERT(parser.parse(), return false);
|
||||
const QVector<Command::Ptr> commands = parser.commands();
|
||||
|
||||
Utils::ExecuteOnDestruction closeAllEditors([](){
|
||||
Utils::ExecuteOnDestruction closeAllEditors([] {
|
||||
qWarning("ClangBatchFileProcessor: Finished, closing all documents.");
|
||||
QTC_CHECK(Core::EditorManager::closeAllEditors(/*askAboutModifiedEditors=*/ false));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user