aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-12-12 11:34:17 +0100
committerhjk <hjk@qt.io>2023-12-12 10:55:32 +0000
commit016936a45032f2b443c336855c8ebe5b7e0d7e08 (patch)
treefeff371aa38eaf9fa01904b78a2021806c71a959 /src/plugins
parent8d2cee31e4ecde69ae2577416d74cefdb891d8e8 (diff)
Clean up some lambdas
Change-Id: Id947c0935b1aa4579e1c64d3e510db41103fbe27 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/clangcodemodel/clangdquickfixes.cpp2
-rw-r--r--src/plugins/classview/classviewmanager.cpp2
-rw-r--r--src/plugins/coco/cocoplugin.cpp2
-rw-r--r--src/plugins/compilerexplorer/compilerexplorereditor.cpp4
-rw-r--r--src/plugins/debugger/dap/pydapengine.cpp2
-rw-r--r--src/plugins/debugger/loadcoredialog.cpp4
-rw-r--r--src/plugins/gitlab/gitlabclonedialog.cpp2
-rw-r--r--src/plugins/glsleditor/glsleditor.cpp3
-rw-r--r--src/plugins/help/docsettingspage.cpp2
-rw-r--r--src/plugins/help/helpwidget.cpp22
-rw-r--r--src/plugins/languageclient/client.cpp4
-rw-r--r--src/plugins/languageclient/languageclientformatter.cpp4
-rw-r--r--src/plugins/languageclient/semantichighlightsupport.cpp2
-rw-r--r--src/plugins/mcusupport/mcusupportplugin.cpp2
-rw-r--r--src/plugins/mesonprojectmanager/toolkitaspectwidget.cpp2
-rw-r--r--src/plugins/mesonprojectmanager/toolkitaspectwidget.h2
-rw-r--r--src/plugins/modeleditor/modeleditor.cpp24
-rw-r--r--src/plugins/perfprofiler/perfdatareader.cpp4
-rw-r--r--src/plugins/perfprofiler/perfprofilertool.cpp6
-rw-r--r--src/plugins/perfprofiler/perfprofilertracemanager.cpp2
-rw-r--r--src/plugins/perfprofiler/perfsettings.cpp2
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp2
-rw-r--r--src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp8
-rw-r--r--src/plugins/qmldesigner/components/annotationeditor/annotationtabwidget.cpp4
-rw-r--r--src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp2
-rw-r--r--src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp2
-rw-r--r--src/plugins/qmldesigner/components/connectioneditor/addnewbackenddialog.cpp2
-rw-r--r--src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp8
-rw-r--r--src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp20
-rw-r--r--src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp6
-rw-r--r--src/plugins/qmldesigner/components/connectioneditor/propertytreemodel.cpp4
-rw-r--r--src/plugins/qmldesigner/components/contentlibrary/contentlibrarybundleimporter.cpp2
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp2
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp12
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp2
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp6
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp2
-rw-r--r--src/plugins/qmldesigner/components/edit3d/bakelights.cpp4
-rw-r--r--src/plugins/qmldesigner/components/edit3d/edit3dview.cpp2
-rw-r--r--src/plugins/qmldesigner/components/edit3d/snapconfiguration.cpp2
-rw-r--r--src/plugins/qmldesigner/components/eventlist/eventlistpluginview.cpp4
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp4
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorview.cpp4
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp2
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocument.cpp2
-rw-r--r--src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp6
-rw-r--r--src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp34
-rw-r--r--src/plugins/qmldesigner/components/richtexteditor/richtexteditorproxy.cpp4
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp4
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp2
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp4
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp2
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelineitem.cpp2
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinepropertyitem.cpp12
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp10
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinesettingsdialog.cpp10
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp10
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinetoolbutton.cpp2
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp18
-rw-r--r--src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp8
-rw-r--r--src/plugins/qmldesigner/components/transitioneditor/transitioneditorgraphicsscene.cpp2
-rw-r--r--src/plugins/qmldesigner/components/transitioneditor/transitioneditorsectionitem.cpp4
-rw-r--r--src/plugins/qmldesigner/components/transitioneditor/transitioneditorsettingsdialog.cpp6
-rw-r--r--src/plugins/qmldesigner/components/transitioneditor/transitioneditortoolbar.cpp8
-rw-r--r--src/plugins/qmldesigner/components/transitioneditor/transitioneditorwidget.cpp4
-rw-r--r--src/plugins/qmldesigner/components/transitioneditor/transitionform.cpp6
-rw-r--r--src/plugins/qmldesigner/designmodewidget.cpp2
-rw-r--r--src/plugins/qmldesigner/qmldesignerprojectmanager.cpp2
-rw-r--r--src/plugins/qmldesigner/utils/filedownloader.cpp4
-rw-r--r--src/plugins/qmldesigner/utils/multifiledownloader.cpp10
-rw-r--r--src/plugins/qmldesignerbase/studio/studiosettingspage.cpp4
-rw-r--r--src/plugins/qmljseditor/qmljsoutline.cpp4
-rw-r--r--src/plugins/qmlpreview/qmlpreviewplugin.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp8
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceview.cpp4
-rw-r--r--src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp2
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.cpp2
-rw-r--r--src/plugins/screenrecorder/cropandtrim.cpp2
-rw-r--r--src/plugins/scxmleditor/common/navigatorslider.cpp2
-rw-r--r--src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp2
-rw-r--r--src/plugins/scxmleditor/plugin_interface/stateitem.cpp2
-rw-r--r--src/plugins/scxmleditor/plugin_interface/transitionitem.cpp2
-rw-r--r--src/plugins/studiowelcome/examplecheckout.cpp2
-rw-r--r--src/plugins/studiowelcome/qdsnewdialog.cpp2
-rw-r--r--src/plugins/studiowelcome/studiowelcomeplugin.cpp4
-rw-r--r--src/plugins/terminal/terminalwidget.cpp2
-rw-r--r--src/plugins/texteditor/bookmarkfilter.cpp2
-rw-r--r--src/plugins/texteditor/findinfiles.cpp2
-rw-r--r--src/plugins/texteditor/texteditor.cpp2
92 files changed, 220 insertions, 223 deletions
diff --git a/src/plugins/clangcodemodel/clangdquickfixes.cpp b/src/plugins/clangcodemodel/clangdquickfixes.cpp
index e993ecd909..b965665d43 100644
--- a/src/plugins/clangcodemodel/clangdquickfixes.cpp
+++ b/src/plugins/clangcodemodel/clangdquickfixes.cpp
@@ -60,7 +60,7 @@ private:
TextEditor::GenericProposal *handleCodeActionResult(const CodeActionResult &result) override
{
auto toOperation =
- [=](const std::variant<Command, CodeAction> &item) -> QuickFixOperation * {
+ [this](const std::variant<Command, CodeAction> &item) -> QuickFixOperation * {
if (auto action = std::get_if<CodeAction>(&item)) {
const std::optional<QList<Diagnostic>> diagnostics = action->diagnostics();
if (!diagnostics.has_value() || diagnostics->isEmpty())
diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp
index 90c834a621..ad2f75cf69 100644
--- a/src/plugins/classview/classviewmanager.cpp
+++ b/src/plugins/classview/classviewmanager.cpp
@@ -281,7 +281,7 @@ void Manager::initialize()
d->m_timer.start(400); // Accumulate multiple requests into one, restarts the timer
});
- connect(&d->m_timer, &QTimer::timeout, this, [this]() {
+ connect(&d->m_timer, &QTimer::timeout, this, [this] {
const QSet<FilePath> docsToBeUpdated = d->m_awaitingDocuments;
d->cancelScheduledUpdate();
if (!state() || d->disableCodeParser) // enabling any of them will trigger the total update
diff --git a/src/plugins/coco/cocoplugin.cpp b/src/plugins/coco/cocoplugin.cpp
index f192b70a62..c92f7785d4 100644
--- a/src/plugins/coco/cocoplugin.cpp
+++ b/src/plugins/coco/cocoplugin.cpp
@@ -96,7 +96,7 @@ void CocoPlugin::initialize()
Command *cmd = ActionManager::registerAction(startCoco, "Coco.startCoco");
menu->addAction(cmd, Debugger::Constants::G_ANALYZER_TOOLS);
- connect(startCoco, &QAction::triggered, this, [this]() { d->startCoco(); });
+ connect(startCoco, &QAction::triggered, this, [this] { d->startCoco(); });
}
}
diff --git a/src/plugins/compilerexplorer/compilerexplorereditor.cpp b/src/plugins/compilerexplorer/compilerexplorereditor.cpp
index e91725bd8c..dea0c439df 100644
--- a/src/plugins/compilerexplorer/compilerexplorereditor.cpp
+++ b/src/plugins/compilerexplorer/compilerexplorereditor.cpp
@@ -560,7 +560,7 @@ void EditorWidget::addCompiler(const std::shared_ptr<SourceSettings> &sourceSett
sourceSettings->compilers.removeItem(compilerSettings->shared_from_this());
});
- connect(compiler, &CompilerWidget::gotFocus, this, [this]() {
+ connect(compiler, &CompilerWidget::gotFocus, this, [this] {
m_actionHandler.updateCurrentEditor();
});
}
@@ -600,7 +600,7 @@ void EditorWidget::addSourceEditor(const std::shared_ptr<SourceSettings> &source
setupHelpWidget();
});
- connect(sourceEditor, &SourceEditorWidget::gotFocus, this, [this]() {
+ connect(sourceEditor, &SourceEditorWidget::gotFocus, this, [this] {
m_actionHandler.updateCurrentEditor();
});
diff --git a/src/plugins/debugger/dap/pydapengine.cpp b/src/plugins/debugger/dap/pydapengine.cpp
index 9f59d05f9e..2c2e3eb9d1 100644
--- a/src/plugins/debugger/dap/pydapengine.cpp
+++ b/src/plugins/debugger/dap/pydapengine.cpp
@@ -91,7 +91,7 @@ public:
m_timer = new QTimer(this);
m_timer->setInterval(100);
- connect(m_timer, &QTimer::timeout, this, [this]() {
+ connect(m_timer, &QTimer::timeout, this, [this] {
m_socket.connectToHost(m_hostName, m_port);
m_socket.waitForConnected();
diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp
index 80573b9891..4c00619970 100644
--- a/src/plugins/debugger/loadcoredialog.cpp
+++ b/src/plugins/debugger/loadcoredialog.cpp
@@ -253,12 +253,12 @@ void AttachCoreDialog::accepted()
AsyncTask<ResultType>{[this, copyFileAsync](auto &task) {
task.setConcurrentCallData(copyFileAsync, coreFile());
},
- [=](const Async<ResultType> &task) { d->coreFileResult = task.result(); },
+ [this](const Async<ResultType> &task) { d->coreFileResult = task.result(); },
CallDoneIf::Success},
AsyncTask<ResultType>{[this, copyFileAsync](auto &task) {
task.setConcurrentCallData(copyFileAsync, symbolFile());
},
- [=](const Async<ResultType> &task) { d->symbolFileResult = task.result(); },
+ [this](const Async<ResultType> &task) { d->symbolFileResult = task.result(); },
CallDoneIf::Success}
};
diff --git a/src/plugins/gitlab/gitlabclonedialog.cpp b/src/plugins/gitlab/gitlabclonedialog.cpp
index 0a884f5249..0ad5b4bef9 100644
--- a/src/plugins/gitlab/gitlabclonedialog.cpp
+++ b/src/plugins/gitlab/gitlabclonedialog.cpp
@@ -103,7 +103,7 @@ GitLabCloneDialog::GitLabCloneDialog(const Project &project, QWidget *parent)
connect(m_cloneButton, &QPushButton::clicked, this, &GitLabCloneDialog::cloneProject);
connect(m_cancelButton, &QPushButton::clicked,
this, &GitLabCloneDialog::cancel);
- connect(this, &QDialog::rejected, this, [this]() {
+ connect(this, &QDialog::rejected, this, [this] {
if (m_commandRunning) {
cancel();
QApplication::restoreOverrideCursor();
diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp
index 7d29f50b12..60420839f2 100644
--- a/src/plugins/glsleditor/glsleditor.cpp
+++ b/src/plugins/glsleditor/glsleditor.cpp
@@ -167,8 +167,7 @@ GlslEditorWidget::GlslEditorWidget()
connect(&m_updateDocumentTimer, &QTimer::timeout,
this, &GlslEditorWidget::updateDocumentNow);
- connect(this, &QPlainTextEdit::textChanged,
- [this]() { m_updateDocumentTimer.start(); });
+ connect(this, &QPlainTextEdit::textChanged, [this] { m_updateDocumentTimer.start(); });
m_outlineCombo = new QComboBox;
m_outlineCombo->setMinimumContentsLength(22);
diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp
index 2d0cc9de2b..6408166958 100644
--- a/src/plugins/help/docsettingspage.cpp
+++ b/src/plugins/help/docsettingspage.cpp
@@ -204,7 +204,7 @@ DocSettingsPageWidget::DocSettingsPageWidget()
&QSortFilterProxyModel::setFilterFixedString);
connect(addButton, &QAbstractButton::clicked, this, &DocSettingsPageWidget::addDocumentation);
- connect(removeButton, &QAbstractButton::clicked, this, [this]() {
+ connect(removeButton, &QAbstractButton::clicked, this, [this] {
removeDocumentation(currentSelection());
});
diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp
index c79bb052eb..5718321acb 100644
--- a/src/plugins/help/helpwidget.cpp
+++ b/src/plugins/help/helpwidget.cpp
@@ -240,7 +240,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
addSideBar();
m_toggleSideBarAction->setChecked(m_sideBar->isVisibleTo(this));
connect(m_toggleSideBarAction, &QAction::triggered, m_sideBar, &Core::SideBar::setVisible);
- connect(m_sideBar, &Core::SideBar::sideBarClosed, m_toggleSideBarAction, [this]() {
+ connect(m_sideBar, &Core::SideBar::sideBarClosed, m_toggleSideBarAction, [this] {
m_toggleSideBarAction->setChecked(false);
});
if (style == ExternalWindow) {
@@ -386,7 +386,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
m_printAction = new QAction(this);
Core::ActionManager::registerAction(m_printAction, Core::Constants::PRINT, context);
- connect(m_printAction, &QAction::triggered, this, [this]() { print(currentViewer()); });
+ connect(m_printAction, &QAction::triggered, this, [this] { print(currentViewer()); });
m_copy = new QAction(this);
Core::ActionManager::registerAction(m_copy, Core::Constants::COPY, context);
@@ -426,20 +426,20 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
openMenu->addAction(m_switchToHelp);
if (style != SideBarWidget) {
QAction *openSideBySide = openMenu->addAction(Tr::tr("Open in Edit Mode"));
- connect(openSideBySide, &QAction::triggered, this, [this]() {
+ connect(openSideBySide, &QAction::triggered, this, [this] {
postRequestShowHelpUrl(Core::HelpManager::SideBySideAlways);
});
}
if (supportsPages()) {
QAction *openPage = openMenu->addAction(Tr::tr("Open in New Page"));
- connect(openPage, &QAction::triggered, this, [this]() {
+ connect(openPage, &QAction::triggered, this, [this] {
if (HelpViewer *viewer = currentViewer())
openNewPage(viewer->source());
});
}
if (style != ExternalWindow) {
QAction *openExternal = openMenu->addAction(Tr::tr("Open in Window"));
- connect(openExternal, &QAction::triggered, this, [this]() {
+ connect(openExternal, &QAction::triggered, this, [this] {
postRequestShowHelpUrl(Core::HelpManager::ExternalHelpAlways);
});
}
@@ -458,7 +458,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
layout->addWidget(button);
QAction *reload = openMenu->addAction(Tr::tr("Reload"));
- connect(reload, &QAction::triggered, this, [this]() {
+ connect(reload, &QAction::triggered, this, [this] {
const int index = m_viewerStack->currentIndex();
HelpViewer *previous = currentViewer();
insertViewer(index, previous->source());
@@ -621,20 +621,20 @@ void HelpWidget::addSideBar()
m_sideBar->readSettings(Core::ICore::settings(), sideBarSettingsKey());
m_sideBarSplitter->setSizes(QList<int>() << m_sideBar->size().width() << 300);
- connect(m_contentsAction, &QAction::triggered, m_sideBar, [this]() {
+ connect(m_contentsAction, &QAction::triggered, m_sideBar, [this] {
m_sideBar->activateItem(Constants::HELP_CONTENTS);
});
- connect(m_indexAction, &QAction::triggered, m_sideBar, [this]() {
+ connect(m_indexAction, &QAction::triggered, m_sideBar, [this] {
m_sideBar->activateItem(Constants::HELP_INDEX);
});
- connect(m_bookmarkAction, &QAction::triggered, m_sideBar, [this]() {
+ connect(m_bookmarkAction, &QAction::triggered, m_sideBar, [this] {
m_sideBar->activateItem(Constants::HELP_BOOKMARKS);
});
- connect(m_searchAction, &QAction::triggered, m_sideBar, [this]() {
+ connect(m_searchAction, &QAction::triggered, m_sideBar, [this] {
m_sideBar->activateItem(Constants::HELP_SEARCH);
});
if (m_openPagesAction) {
- connect(m_openPagesAction, &QAction::triggered, m_sideBar, [this]() {
+ connect(m_openPagesAction, &QAction::triggered, m_sideBar, [this] {
m_sideBar->activateItem(Constants::HELP_OPENPAGES);
});
}
diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp
index 912bb62228..d046f187ff 100644
--- a/src/plugins/languageclient/client.cpp
+++ b/src/plugins/languageclient/client.cpp
@@ -166,7 +166,7 @@ public:
connect(m_clientInterface, &InterfaceController::messageReceived, q, &Client::handleMessage);
connect(m_clientInterface, &InterfaceController::error, q, &Client::setError);
connect(m_clientInterface, &InterfaceController::finished, q, &Client::finished);
- connect(m_clientInterface, &InterfaceController::started, this, [this]() {
+ connect(m_clientInterface, &InterfaceController::started, this, [this] {
LanguageClientManager::clientStarted(q);
});
connect(Core::EditorManager::instance(),
@@ -1479,7 +1479,7 @@ void Client::setCurrentProject(ProjectExplorer::Project *project)
d->m_project->disconnect(this);
d->m_project = project;
if (d->m_project) {
- connect(d->m_project, &ProjectExplorer::Project::destroyed, this, [this]() {
+ connect(d->m_project, &ProjectExplorer::Project::destroyed, this, [this] {
// the project of the client should already be null since we expect the session and
// the language client manager to reset it before it gets deleted.
QTC_ASSERT(d->m_project == nullptr, projectClosed(d->m_project));
diff --git a/src/plugins/languageclient/languageclientformatter.cpp b/src/plugins/languageclient/languageclientformatter.cpp
index c3790e42cb..52f35856af 100644
--- a/src/plugins/languageclient/languageclientformatter.cpp
+++ b/src/plugins/languageclient/languageclientformatter.cpp
@@ -24,7 +24,7 @@ LanguageClientFormatter::LanguageClientFormatter(TextEditor::TextDocument *docum
{
m_cancelConnection = QObject::connect(document->document(),
&QTextDocument::contentsChanged,
- [this]() {
+ [this] {
if (m_ignoreCancel)
m_ignoreCancel = false;
else
@@ -93,7 +93,7 @@ QFutureWatcher<ChangeSet> *LanguageClientFormatter::format(
m_ignoreCancel = true;
m_progress.reportStarted();
auto watcher = new QFutureWatcher<ChangeSet>();
- QObject::connect(watcher, &QFutureWatcher<ChangeSet>::canceled, [this]() {
+ QObject::connect(watcher, &QFutureWatcher<ChangeSet>::canceled, [this] {
cancelCurrentRequest();
});
watcher->setFuture(m_progress.future());
diff --git a/src/plugins/languageclient/semantichighlightsupport.cpp b/src/plugins/languageclient/semantichighlightsupport.cpp
index 655026c9c2..219fae1ac5 100644
--- a/src/plugins/languageclient/semantichighlightsupport.cpp
+++ b/src/plugins/languageclient/semantichighlightsupport.cpp
@@ -31,7 +31,7 @@ SemanticTokenSupport::SemanticTokenSupport(Client *client)
QObject::connect(TextEditorSettings::instance(),
&TextEditorSettings::fontSettingsChanged,
client,
- [this]() { updateFormatHash(); });
+ [this] { updateFormatHash(); });
QObject::connect(Core::EditorManager::instance(),
&Core::EditorManager::currentEditorChanged,
this,
diff --git a/src/plugins/mcusupport/mcusupportplugin.cpp b/src/plugins/mcusupport/mcusupportplugin.cpp
index 20edc2dd5d..5cecd3decc 100644
--- a/src/plugins/mcusupport/mcusupportplugin.cpp
+++ b/src/plugins/mcusupport/mcusupportplugin.cpp
@@ -212,7 +212,7 @@ void McuSupportPlugin::extensionsInitialized()
{
ProjectExplorer::DeviceManager::instance()->addDevice(McuSupportDevice::create());
- connect(KitManager::instance(), &KitManager::kitsLoaded, [this]() {
+ connect(KitManager::instance(), &KitManager::kitsLoaded, [this] {
McuKitManager::removeOutdatedKits();
McuKitManager::createAutomaticKits(dd->m_settingsHandler);
McuKitManager::fixExistingKits(dd->m_settingsHandler);
diff --git a/src/plugins/mesonprojectmanager/toolkitaspectwidget.cpp b/src/plugins/mesonprojectmanager/toolkitaspectwidget.cpp
index 6ae9d85129..8bd5f7072e 100644
--- a/src/plugins/mesonprojectmanager/toolkitaspectwidget.cpp
+++ b/src/plugins/mesonprojectmanager/toolkitaspectwidget.cpp
@@ -96,7 +96,7 @@ void ToolKitAspectWidget::loadTools()
void ToolKitAspectWidget::setToDefault()
{
- const MesonTools::Tool_t autoDetected = [this]() {
+ const MesonTools::Tool_t autoDetected = [this] {
if (m_type == ToolType::Meson)
return std::dynamic_pointer_cast<ToolWrapper>(MesonTools::mesonWrapper());
return std::dynamic_pointer_cast<ToolWrapper>(MesonTools::ninjaWrapper());
diff --git a/src/plugins/mesonprojectmanager/toolkitaspectwidget.h b/src/plugins/mesonprojectmanager/toolkitaspectwidget.h
index 1ca8d1f1e5..252e351ff7 100644
--- a/src/plugins/mesonprojectmanager/toolkitaspectwidget.h
+++ b/src/plugins/mesonprojectmanager/toolkitaspectwidget.h
@@ -44,7 +44,7 @@ private:
void refresh() override
{
- const auto id = [this]() {
+ const auto id = [this] {
if (m_type == ToolType::Meson)
return MesonToolKitAspect::mesonToolId(m_kit);
return NinjaToolKitAspect::ninjaToolId(m_kit);
diff --git a/src/plugins/modeleditor/modeleditor.cpp b/src/plugins/modeleditor/modeleditor.cpp
index 0229ceba00..bd91d445b7 100644
--- a/src/plugins/modeleditor/modeleditor.cpp
+++ b/src/plugins/modeleditor/modeleditor.cpp
@@ -307,25 +307,25 @@ void ModelEditor::init()
toolbarLayout->addStretch(1);
toolbarLayout->addWidget(createToolbarCommandButton(Core::Constants::ZOOM_RESET,
- [this]() { resetZoom(); },
+ [this] { resetZoom(); },
d->toolbar));
toolbarLayout->addWidget(createToolbarCommandButton(Core::Constants::ZOOM_IN,
- [this]() { zoomIn(); },
+ [this] { zoomIn(); },
d->toolbar));
toolbarLayout->addWidget(createToolbarCommandButton(Core::Constants::ZOOM_OUT,
- [this]() { zoomOut(); },
+ [this] { zoomOut(); },
d->toolbar));
toolbarLayout->addWidget(createToolbarCommandButton(Constants::ACTION_ADD_PACKAGE,
- [this]() { onAddPackage(); },
+ [this] { onAddPackage(); },
d->toolbar));
toolbarLayout->addWidget(createToolbarCommandButton(Constants::ACTION_ADD_COMPONENT,
- [this]() { onAddComponent(); },
+ [this] { onAddComponent(); },
d->toolbar));
toolbarLayout->addWidget(createToolbarCommandButton(Constants::ACTION_ADD_CLASS,
- [this]() { onAddClass(); },
+ [this] { onAddClass(); },
d->toolbar));
toolbarLayout->addWidget(createToolbarCommandButton(Constants::ACTION_ADD_CANVAS_DIAGRAM,
- [this]() { onAddCanvasDiagram(); },
+ [this] { onAddCanvasDiagram(); },
d->toolbar));
toolbarLayout->addSpacing(20);
@@ -871,7 +871,7 @@ void ModelEditor::onAddPackage()
qmt::MPackage *package = documentController->createNewPackage(d->modelTreeViewServant->selectedPackage());
d->modelTreeView->selectFromSourceModelIndex(documentController->treeModel()->indexOf(package));
- QTimer::singleShot(0, this, [this]() { onEditSelectedElement(); });
+ QTimer::singleShot(0, this, [this] { onEditSelectedElement(); });
}
void ModelEditor::onAddComponent()
@@ -880,7 +880,7 @@ void ModelEditor::onAddComponent()
qmt::MComponent *component = documentController->createNewComponent(d->modelTreeViewServant->selectedPackage());
d->modelTreeView->selectFromSourceModelIndex(documentController->treeModel()->indexOf(component));
- QTimer::singleShot(0, this, [this]() { onEditSelectedElement(); });
+ QTimer::singleShot(0, this, [this] { onEditSelectedElement(); });
}
void ModelEditor::onAddClass()
@@ -889,7 +889,7 @@ void ModelEditor::onAddClass()
qmt::MClass *klass = documentController->createNewClass(d->modelTreeViewServant->selectedPackage());
d->modelTreeView->selectFromSourceModelIndex(documentController->treeModel()->indexOf(klass));
- QTimer::singleShot(0, this, [this]() { onEditSelectedElement(); });
+ QTimer::singleShot(0, this, [this] { onEditSelectedElement(); });
}
void ModelEditor::onAddCanvasDiagram()
@@ -898,7 +898,7 @@ void ModelEditor::onAddCanvasDiagram()
qmt::MDiagram *diagram = documentController->createNewCanvasDiagram(d->modelTreeViewServant->selectedPackage());
d->modelTreeView->selectFromSourceModelIndex(documentController->treeModel()->indexOf(diagram));
- QTimer::singleShot(0, this, [this]() { onEditSelectedElement(); });
+ QTimer::singleShot(0, this, [this] { onEditSelectedElement(); });
}
void ModelEditor::onCurrentEditorChanged(Core::IEditor *editor)
@@ -987,7 +987,7 @@ void ModelEditor::onNewElementCreated(qmt::DElement *element, qmt::MDiagram *dia
documentController->diagramsManager()->diagramSceneModel(diagram)->selectElement(element);
qmt::MElement *melement = documentController->modelController()->findElement(element->modelUid());
if (!(melement && melement->flags().testFlag(qmt::MElement::ReverseEngineered)))
- QTimer::singleShot(0, this, [this]() { onEditSelectedElement(); });
+ QTimer::singleShot(0, this, [this] { onEditSelectedElement(); });
}
}
diff --git a/src/plugins/perfprofiler/perfdatareader.cpp b/src/plugins/perfprofiler/perfdatareader.cpp
index 8f4adf6f26..4ea37251ac 100644
--- a/src/plugins/perfprofiler/perfdatareader.cpp
+++ b/src/plugins/perfprofiler/perfdatareader.cpp
@@ -64,7 +64,7 @@ PerfDataReader::PerfDataReader(QObject *parent) :
});
connect(&m_input, &QIODevice::bytesWritten, this, &PerfDataReader::writeChunk);
- connect(&m_input, &QProcess::started, this, [this]() {
+ connect(&m_input, &QProcess::started, this, [this] {
emit processStarted();
if (m_input.isWritable()) {
writeChunk();
@@ -109,7 +109,7 @@ PerfDataReader::PerfDataReader(QObject *parent) :
});
connect(&m_input, &QProcess::readyReadStandardOutput, this, &PerfDataReader::readFromDevice);
- connect(&m_input, &QProcess::readyReadStandardError, this, [this]() {
+ connect(&m_input, &QProcess::readyReadStandardError, this, [this] {
Core::MessageManager::writeSilently(QString::fromLocal8Bit(m_input.readAllStandardError()));
});
diff --git a/src/plugins/perfprofiler/perfprofilertool.cpp b/src/plugins/perfprofiler/perfprofilertool.cpp
index 81a2e83c7a..6c6bb508dd 100644
--- a/src/plugins/perfprofiler/perfprofilertool.cpp
+++ b/src/plugins/perfprofiler/perfprofilertool.cpp
@@ -88,7 +88,7 @@ PerfProfilerTool::PerfProfilerTool()
m_limitToRange = new QAction(Tr::tr("Limit to Range Selected in Timeline"), options);
command = Core::ActionManager::registerAction(m_limitToRange, Constants::PerfProfilerTaskLimit,
globalContext);
- connect(m_limitToRange, &QAction::triggered, this, [this]() {
+ connect(m_limitToRange, &QAction::triggered, this, [this] {
traceManager().restrictByFilter(traceManager().rangeAndThreadFilter(
m_zoomControl->selectionStart(),
m_zoomControl->selectionEnd()));
@@ -271,12 +271,12 @@ void PerfProfilerTool::createViews()
errorDialog->show();
});
- connect(&traceManager(), &PerfProfilerTraceManager::loadFinished, this, [this]() {
+ connect(&traceManager(), &PerfProfilerTraceManager::loadFinished, this, [this] {
m_readerRunning = false;
updateRunActions();
});
- connect(&traceManager(), &PerfProfilerTraceManager::saveFinished, this, [this]() {
+ connect(&traceManager(), &PerfProfilerTraceManager::saveFinished, this, [this] {
setToolActionsEnabled(true);
});
diff --git a/src/plugins/perfprofiler/perfprofilertracemanager.cpp b/src/plugins/perfprofiler/perfprofilertracemanager.cpp
index ffe81dd2dc..7a3643660c 100644
--- a/src/plugins/perfprofiler/perfprofilertracemanager.cpp
+++ b/src/plugins/perfprofiler/perfprofilertracemanager.cpp
@@ -119,7 +119,7 @@ PerfProfilerTraceManager::PerfProfilerTraceManager()
&m_reparseTimer, QOverload<>::of(&QTimer::start));
connect(&m_reparseTimer, &QTimer::timeout,
- this, [this]() { restrictByFilter(rangeAndThreadFilter(traceStart(), traceEnd())); });
+ this, [this] { restrictByFilter(rangeAndThreadFilter(traceStart(), traceEnd())); });
resetAttributes();
}
diff --git a/src/plugins/perfprofiler/perfsettings.cpp b/src/plugins/perfprofiler/perfsettings.cpp
index 456f8909a9..3918e8969a 100644
--- a/src/plugins/perfprofiler/perfsettings.cpp
+++ b/src/plugins/perfprofiler/perfsettings.cpp
@@ -93,7 +93,7 @@ PerfConfigWidget::PerfConfigWidget(PerfSettings *settings, Target *target)
this, &PerfConfigWidget::readTracePoints);
auto addEventButton = new QPushButton(Tr::tr("Add Event"), this);
- connect(addEventButton, &QPushButton::pressed, this, [this]() {
+ connect(addEventButton, &QPushButton::pressed, this, [this] {
auto model = eventsView->model();
model->insertRow(model->rowCount());
});
diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp
index d04bd262d0..b5dd7bb037 100644
--- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp
@@ -1191,7 +1191,7 @@ void QmakeProFile::setupFutureWatcher()
QTC_ASSERT(!m_parseFutureWatcher, return);
m_parseFutureWatcher = new QFutureWatcher<Internal::QmakeEvalResultPtr>;
- QObject::connect(m_parseFutureWatcher, &QFutureWatcherBase::finished, [this]() {
+ QObject::connect(m_parseFutureWatcher, &QFutureWatcherBase::finished, [this] {
applyEvaluate(m_parseFutureWatcher->result());
cleanupFutureWatcher();
});
diff --git a/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp b/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp
index cef86f2696..3f60925d1e 100644
--- a/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp
+++ b/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp
@@ -91,7 +91,7 @@ AssetExportDialog::AssetExportDialog(const FilePath &exportPath,
m_exportPath->setPromptDialogTitle(tr("Choose Export File"));
m_exportPath->setPromptDialogFilter(tr("Metadata file (*.metadata)"));
m_exportPath->lineEdit()->setReadOnly(true);
- m_exportPath->addButton(tr("Open"), this, [this]() {
+ m_exportPath->addButton(tr("Open"), this, [this] {
Core::FileUtils::showInGraphicalShell(Core::ICore::dialogParent(), m_exportPath->filePath());
});
@@ -111,7 +111,7 @@ AssetExportDialog::AssetExportDialog(const FilePath &exportPath,
m_stackedWidget->addWidget(m_exportLogs);
switchView(false);
- connect(m_buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, [this]() {
+ connect(m_buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, [this] {
m_buttonBox->button(QDialogButtonBox::Cancel)->setEnabled(false);
m_assetExporter.cancel();
});
@@ -119,13 +119,13 @@ AssetExportDialog::AssetExportDialog(const FilePath &exportPath,
m_exportBtn = m_buttonBox->addButton(tr("Export"), QDialogButtonBox::AcceptRole);
m_exportBtn->setEnabled(false);
connect(m_exportBtn, &QPushButton::clicked, this, &AssetExportDialog::onExport);
- connect(&m_filePathModel, &FilePathModel::modelReset, this, [this]() {
+ connect(&m_filePathModel, &FilePathModel::modelReset, this, [this] {
m_exportProgress->setRange(0, 1000);
m_exportProgress->setValue(0);
m_exportBtn->setEnabled(true);
});
- connect(m_buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, [this]() {
+ connect(m_buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, [this] {
close();
});
m_buttonBox->button(QDialogButtonBox::Close)->setVisible(false);
diff --git a/src/plugins/qmldesigner/components/annotationeditor/annotationtabwidget.cpp b/src/plugins/qmldesigner/components/annotationeditor/annotationtabwidget.cpp
index 42ff3bcfd9..cb63abf36f 100644
--- a/src/plugins/qmldesigner/components/annotationeditor/annotationtabwidget.cpp
+++ b/src/plugins/qmldesigner/components/annotationeditor/annotationtabwidget.cpp
@@ -24,9 +24,9 @@ AnnotationTabWidget::AnnotationTabWidget(QWidget *parent)
tr("Add Comment")); //timeline icons?
auto *commentRemoveAction = new QAction(TimelineIcons::REMOVE_TIMELINE.icon(),
tr("Remove Comment")); //timeline icons?
- connect(commentAddAction, &QAction::triggered, this, [this]() { addCommentTab(); });
+ connect(commentAddAction, &QAction::triggered, this, [this] { addCommentTab(); });
- connect(commentRemoveAction, &QAction::triggered, this, [this]() {
+ connect(commentRemoveAction, &QAction::triggered, this, [this] {
int currentIndex = this->currentIndex();
QString currentTitle = tabText(currentIndex);
if (QMessageBox::question(this,
diff --git a/src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp b/src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp
index 6d6efbb5d2..28fed71b86 100644
--- a/src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp
+++ b/src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp
@@ -113,7 +113,7 @@ void AssetsLibraryView::setResourcePath(const QString &resourcePath)
AssetsLibraryView::ImageCacheData *AssetsLibraryView::imageCacheData()
{
std::call_once(imageCacheFlag,
- [this]() { m_imageCacheData = std::make_unique<ImageCacheData>(); });
+ [this] { m_imageCacheData = std::make_unique<ImageCacheData>(); });
return m_imageCacheData.get();
}
diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp b/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp
index 58917c0954..d2799425fb 100644
--- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp
@@ -54,7 +54,7 @@ BindingEditorWidget::BindingEditorWidget()
? tr("Meta+Space")
: tr("Ctrl+Space")));
- connect(m_completionAction, &QAction::triggered, this, [this]() {
+ connect(m_completionAction, &QAction::triggered, this, [this] {
invokeAssist(TextEditor::Completion);
});
}
diff --git a/src/plugins/qmldesigner/components/connectioneditor/addnewbackenddialog.cpp b/src/plugins/qmldesigner/components/connectioneditor/addnewbackenddialog.cpp
index 9f22b227f5..6f7e8ef5eb 100644
--- a/src/plugins/qmldesigner/components/connectioneditor/addnewbackenddialog.cpp
+++ b/src/plugins/qmldesigner/components/connectioneditor/addnewbackenddialog.cpp
@@ -16,7 +16,7 @@ AddNewBackendDialog::AddNewBackendDialog(QWidget *parent) :
connect(m_ui->comboBox, &QComboBox::currentTextChanged, this, &AddNewBackendDialog::invalidate);
- connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, [this]() {
+ connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, [this] {
m_applied = true;
close();
});
diff --git a/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp
index 8ba1347bbf..e3c47d996c 100644
--- a/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp
+++ b/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp
@@ -255,15 +255,15 @@ BindingModelBackendDelegate::BindingModelBackendDelegate(BindingModel *parent)
, m_sourceNode()
, m_sourceNodeProperty()
{
- connect(&m_sourceNode, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_sourceNode, &StudioQmlComboBoxBackend::activated, this, [this] {
sourceNodeChanged();
});
- connect(&m_sourceNodeProperty, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_sourceNodeProperty, &StudioQmlComboBoxBackend::activated, this, [this] {
sourcePropertyNameChanged();
});
- connect(&m_property, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_property, &StudioQmlComboBoxBackend::activated, this, [this] {
targetPropertyNameChanged();
});
}
@@ -373,7 +373,7 @@ void BindingModelBackendDelegate::sourcePropertyNameChanged() const
void BindingModelBackendDelegate::targetPropertyNameChanged() const
{
- auto commit = [this]() {
+ auto commit = [this] {
BindingModel *model = qobject_cast<BindingModel *>(parent());
QTC_ASSERT(model, return);
const PropertyName propertyName = m_property.currentText().toUtf8();
diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp
index dd6350f4e5..0193b5d5ea 100644
--- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp
+++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp
@@ -675,21 +675,21 @@ ConnectionModelBackendDelegate::ConnectionModelBackendDelegate(ConnectionModel *
m_propertyTreeModel(parent->connectionView()), m_propertyListProxyModel(&m_propertyTreeModel)
{
- connect(&m_signalDelegate, &PropertyTreeModelDelegate::commitData, this, [this]() {
+ connect(&m_signalDelegate, &PropertyTreeModelDelegate::commitData, this, [this] {
handleTargetChanged();
});
connect(&m_okStatementDelegate,
&ConnectionModelStatementDelegate::statementChanged,
this,
- [this]() { handleOkStatementChanged(); });
+ [this] { handleOkStatementChanged(); });
connect(&m_koStatementDelegate,
&ConnectionModelStatementDelegate::statementChanged,
this,
- [this]() { handleKOStatementChanged(); });
+ [this] { handleKOStatementChanged(); });
- connect(&m_conditionListModel, &ConditionListModel::conditionChanged, this, [this]() {
+ connect(&m_conditionListModel, &ConditionListModel::conditionChanged, this, [this] {
handleConditionChanged();
});
@@ -1209,27 +1209,27 @@ ConnectionModelStatementDelegate::ConnectionModelStatementDelegate(ConnectionMod
{
m_functionDelegate.setPropertyType(PropertyTreeModel::SlotType);
- connect(&m_functionDelegate, &PropertyTreeModelDelegate::commitData, this, [this]() {
+ connect(&m_functionDelegate, &PropertyTreeModelDelegate::commitData, this, [this] {
handleFunctionChanged();
});
- connect(&m_rhsAssignmentDelegate, &PropertyTreeModelDelegate::commitData, this, [this]() {
+ connect(&m_rhsAssignmentDelegate, &PropertyTreeModelDelegate::commitData, this, [this] {
handleRhsAssignmentChanged();
});
- connect(&m_lhsDelegate, &PropertyTreeModelDelegate::commitData, this, [this]() {
+ connect(&m_lhsDelegate, &PropertyTreeModelDelegate::commitData, this, [this] {
handleLhsChanged();
});
- connect(&m_stringArgument, &StudioQmlTextBackend::activated, this, [this]() {
+ connect(&m_stringArgument, &StudioQmlTextBackend::activated, this, [this] {
handleStringArgumentChanged();
});
- connect(&m_states, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_states, &StudioQmlComboBoxBackend::activated, this, [this] {
handleStateChanged();
});
- connect(&m_stateTargets, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_stateTargets, &StudioQmlComboBoxBackend::activated, this, [this] {
handleStateTargetsChanged();
});
}
diff --git a/src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp
index 560cecd3e1..5cf90ca6fd 100644
--- a/src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp
+++ b/src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp
@@ -388,9 +388,9 @@ DynamicPropertiesModelBackendDelegate::DynamicPropertiesModelBackendDelegate(Dyn
, m_internalNodeId(std::nullopt)
{
m_type.setModel({"int", "bool", "var", "real", "string", "url", "color"});
- connect(&m_type, &StudioQmlComboBoxBackend::activated, this, [this]() { handleTypeChanged(); });
- connect(&m_name, &StudioQmlTextBackend::activated, this, [this]() { handleNameChanged(); });
- connect(&m_value, &StudioQmlTextBackend::activated, this, [this]() { handleValueChanged(); });
+ connect(&m_type, &StudioQmlComboBoxBackend::activated, this, [this] { handleTypeChanged(); });
+ connect(&m_name, &StudioQmlTextBackend::activated, this, [this] { handleNameChanged(); });
+ connect(&m_value, &StudioQmlTextBackend::activated, this, [this] { handleValueChanged(); });
}
void DynamicPropertiesModelBackendDelegate::update(const AbstractProperty &property)
diff --git a/src/plugins/qmldesigner/components/connectioneditor/propertytreemodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/propertytreemodel.cpp
index 3ae89a3185..2b1f53243a 100644
--- a/src/plugins/qmldesigner/components/connectioneditor/propertytreemodel.cpp
+++ b/src/plugins/qmldesigner/components/connectioneditor/propertytreemodel.cpp
@@ -888,10 +888,10 @@ QString PropertyListProxyModel::parentName() const
PropertyTreeModelDelegate::PropertyTreeModelDelegate(ConnectionView *parent) : m_model(parent)
{
- connect(&m_nameCombboBox, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_nameCombboBox, &StudioQmlComboBoxBackend::activated, this, [this] {
handleNameChanged();
});
- connect(&m_idCombboBox, &StudioQmlComboBoxBackend::activated, this, [this]() {
+ connect(&m_idCombboBox, &StudioQmlComboBoxBackend::activated, this, [this] {
handleIdChanged();
});
diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibrarybundleimporter.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibrarybundleimporter.cpp
index 49e940ba22..9e6bdd03b9 100644
--- a/src/plugins/qmldesigner/components/contentlibrary/contentlibrarybundleimporter.cpp
+++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibrarybundleimporter.cpp
@@ -151,7 +151,7 @@ QString ContentLibraryBundleImporter::importComponent(const QString &qmlFile,
void ContentLibraryBundleImporter::handleImportTimer()
{
- auto handleFailure = [this]() {
+ auto handleFailure = [this] {
m_importTimer.stop();
m_fullReset = false;
m_importAddPending = false;
diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp
index 6858cc5088..e84623e26c 100644
--- a/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/curveeditor.cpp
@@ -57,7 +57,7 @@ CurveEditor::CurveEditor(CurveEditorModel *model, QWidget *parent)
box->addWidget(m_statusLine);
setLayout(box);
- connect(m_toolbar, &CurveEditorToolBar::unifyClicked, [this]() {
+ connect(m_toolbar, &CurveEditorToolBar::unifyClicked, [this] {
m_view->toggleUnified();
});
diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp
index 773abe1d90..72410ffb07 100644
--- a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp
@@ -75,16 +75,16 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent)
m_splineAction = addAction(Theme::iconFromName(Theme::bezier_medium), tr(m_splineLabel));
m_unifyAction = addAction(Theme::iconFromName(Theme::unify_medium), tr(m_unifyLabel));
- auto setLinearInterpolation = [this]() {
+ auto setLinearInterpolation = [this] {
emit interpolationClicked(Keyframe::Interpolation::Linear);
};
- auto setStepInterpolation = [this]() {
+ auto setStepInterpolation = [this] {
emit interpolationClicked(Keyframe::Interpolation::Step);
};
- auto setSplineInterpolation = [this]() {
+ auto setSplineInterpolation = [this] {
emit interpolationClicked(Keyframe::Interpolation::Bezier);
};
- auto toggleUnifyKeyframe = [this]() {
+ auto toggleUnifyKeyframe = [this] {
emit unifyClicked();
};
@@ -170,7 +170,7 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent)
tr("Zoom Out"),
QKeySequence(QKeySequence::ZoomOut));
- connect(zoomOut, &QAction::triggered, [this]() {
+ connect(zoomOut, &QAction::triggered, [this] {
m_zoomSlider->setValue(m_zoomSlider->value() - m_zoomSlider->pageStep());
});
@@ -179,7 +179,7 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent)
tr("Zoom In"),
QKeySequence(QKeySequence::ZoomIn));
- connect(zoomIn, &QAction::triggered, [this]() {
+ connect(zoomIn, &QAction::triggered, [this] {
m_zoomSlider->setValue(m_zoomSlider->value() + m_zoomSlider->pageStep());
});
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
index d41a25c43b..be1b10d865 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
@@ -410,7 +410,7 @@ void GraphicsView::contextMenuEvent(QContextMenuEvent *event)
if (event->modifiers() != Qt::NoModifier)
return;
- auto openStyleEditor = [this]() { m_dialog.show(); };
+ auto openStyleEditor = [this] { m_dialog.show(); };
QMenu menu;
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp
index 14f30208a9..a1c229f57e 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp
@@ -193,7 +193,7 @@ void KeyframeItem::setKeyframe(const Keyframe &keyframe)
m_frame = keyframe;
if (needsConnection) {
- auto updatePosition = [this]() { this->updatePosition(true); };
+ auto updatePosition = [this] { this->updatePosition(true); };
connect(this, &QGraphicsObject::xChanged, updatePosition);
connect(this, &QGraphicsObject::yChanged, updatePosition);
}
@@ -201,7 +201,7 @@ void KeyframeItem::setKeyframe(const Keyframe &keyframe)
if (m_frame.hasLeftHandle()) {
if (!m_left) {
m_left = new HandleItem(this, HandleItem::Slot::Left);
- auto updateLeftHandle = [this]() { updateHandle(m_left); };
+ auto updateLeftHandle = [this] { updateHandle(m_left); };
connect(m_left, &QGraphicsObject::xChanged, updateLeftHandle);
connect(m_left, &QGraphicsObject::yChanged, updateLeftHandle);
}
@@ -214,7 +214,7 @@ void KeyframeItem::setKeyframe(const Keyframe &keyframe)
if (m_frame.hasRightHandle()) {
if (!m_right) {
m_right = new HandleItem(this, HandleItem::Slot::Right);
- auto updateRightHandle = [this]() { updateHandle(m_right); };
+ auto updateRightHandle = [this] { updateHandle(m_right); };
connect(m_right, &QGraphicsObject::xChanged, updateRightHandle);
connect(m_right, &QGraphicsObject::yChanged, updateRightHandle);
}
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp
index 82d8e2dd99..1f09e4c771 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp
@@ -26,7 +26,7 @@ TreeView::TreeView(CurveEditorModel *model, QWidget *parent)
setModel(model);
- auto expandItems = [this]() { expandAll(); };
+ auto expandItems = [this] { expandAll(); };
connect(model, &QAbstractItemModel::modelReset, expandItems);
setItemDelegate(new TreeItemDelegate(model->style(), this));
diff --git a/src/plugins/qmldesigner/components/edit3d/bakelights.cpp b/src/plugins/qmldesigner/components/edit3d/bakelights.cpp
index 88e7ad379d..35d59f07ef 100644
--- a/src/plugins/qmldesigner/components/edit3d/bakelights.cpp
+++ b/src/plugins/qmldesigner/components/edit3d/bakelights.cpp
@@ -183,7 +183,7 @@ void BakeLights::bakeLights()
m_view->resetPuppet();
};
- auto crashCallback = [this]() {
+ auto crashCallback = [this] {
m_progressDialog->raise();
emit progress(tr("Baking process crashed, baking aborted."));
emit finished();
@@ -232,7 +232,7 @@ void BakeLights::apply()
void BakeLights::rebake()
{
- QTimer::singleShot(0, this, [this]() {
+ QTimer::singleShot(0, this, [this] {
cleanup();
showSetupDialog();
});
diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp
index 9cf849bc4c..43efa6c567 100644
--- a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp
+++ b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp
@@ -1054,7 +1054,7 @@ void Edit3DView::createEdit3DActions()
if (!m_snapConfiguration) {
m_snapConfiguration = new SnapConfiguration(this);
connect(m_snapConfiguration.data(), &SnapConfiguration::posIntChanged,
- this, [this]() {
+ this, [this] {
// Notify every change of position interval as that causes visible changes in grid
rootModelNode().setAuxiliaryData(edit3dSnapPosIntProperty,
m_snapConfiguration->posInt());
diff --git a/src/plugins/qmldesigner/components/edit3d/snapconfiguration.cpp b/src/plugins/qmldesigner/components/edit3d/snapconfiguration.cpp
index f1d8889364..26c5fe0eb2 100644
--- a/src/plugins/qmldesigner/components/edit3d/snapconfiguration.cpp
+++ b/src/plugins/qmldesigner/components/edit3d/snapconfiguration.cpp
@@ -235,7 +235,7 @@ void SnapConfiguration::setScaleInt(double value)
void SnapConfiguration::asyncClose()
{
- QTimer::singleShot(0, this, [this]() {
+ QTimer::singleShot(0, this, [this] {
if (!m_configDialog.isNull() && m_configDialog->isVisible())
m_configDialog->close();
});
diff --git a/src/plugins/qmldesigner/components/eventlist/eventlistpluginview.cpp b/src/plugins/qmldesigner/components/eventlist/eventlistpluginview.cpp
index 72205bd760..1c67136fe2 100644
--- a/src/plugins/qmldesigner/components/eventlist/eventlistpluginview.cpp
+++ b/src/plugins/qmldesigner/components/eventlist/eventlistpluginview.cpp
@@ -51,7 +51,7 @@ void EventListPluginView::registerActions()
&SelectionContextFunctors::always,
&SelectionContextFunctors::always));
auto eventListAction = new EventListAction();
- connect(eventListAction->action(), &QAction::triggered, [this]() {
+ connect(eventListAction->action(), &QAction::triggered, [this] {
if (!m_eventListDialog)
m_eventListDialog = new EventListDialog(Core::ICore::dialogParent());
@@ -62,7 +62,7 @@ void EventListPluginView::registerActions()
designerActionManager.addDesignerAction(eventListAction);
auto assignEventAction = new AssignEventEditorAction();
- connect(assignEventAction->action(), &QAction::triggered, [this]() {
+ connect(assignEventAction->action(), &QAction::triggered, [this] {
if (!m_assigner)
m_assigner = new AssignEventDialog(Core::ICore::dialogParent());
if (!m_eventListDialog)
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp
index 557c9a5d3e..35a48a6b6d 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp
@@ -182,11 +182,11 @@ void FormEditorAnnotationIcon::mouseReleaseEvent(QGraphicsSceneMouseEvent * even
void FormEditorAnnotationIcon::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
QMenu menu;
- menu.addAction(tr("Edit Annotation"), [this]() {
+ menu.addAction(tr("Edit Annotation"), [this] {
createAnnotationEditor();
});
- menu.addAction(tr("Remove Annotation"), [this]() {
+ menu.addAction(tr("Remove Annotation"), [this] {
removeAnnotationDialog();
});
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
index 9ddec21f35..4b63d9ced8 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
@@ -208,7 +208,7 @@ void FormEditorView::createFormEditorWidget()
auto formEditorContext = new Internal::FormEditorContext(m_formEditorWidget.data());
Core::ICore::addContextObject(formEditorContext);
- connect(m_formEditorWidget->zoomAction(), &ZoomAction::zoomLevelChanged, [this]() {
+ connect(m_formEditorWidget->zoomAction(), &ZoomAction::zoomLevelChanged, [this] {
m_currentTool->formEditorItemsChanged(scene()->allFormEditorItems());
});
@@ -223,7 +223,7 @@ void FormEditorView::temporaryBlockView(int duration)
timer->setSingleShot(true);
timer->start(duration);
- connect(timer, &QTimer::timeout, this, [this]() {
+ connect(timer, &QTimer::timeout, this, [this] {
if (m_formEditorWidget && m_formEditorWidget->graphicsView())
m_formEditorWidget->graphicsView()->setUpdatesEnabled(true);
});
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
index e75a95cfb0..a6f49e4012 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
@@ -162,7 +162,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
const QIcon zoomOutIcon = Theme::iconFromName(Theme::Icon::zoomOut_medium);
const QIcon reloadIcon = Theme::iconFromName(Theme::Icon::reload_medium);
- auto writeZoomLevel = [this]() {
+ auto writeZoomLevel = [this] {
double level = m_graphicsView->transform().m11();
if (level == 1.0) {
m_formEditorView->rootModelNode().removeAuxiliaryData(formeditorZoomProperty);
diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp
index 91ac4d8f16..bbc5562307 100644
--- a/src/plugins/qmldesigner/components/integration/designdocument.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp
@@ -574,7 +574,7 @@ void DesignDocument::deleteSelected()
return;
}
- rewriterView()->executeInTransaction("DesignDocument::deleteSelected", [this]() {
+ rewriterView()->executeInTransaction("DesignDocument::deleteSelected", [this] {
const QList<ModelNode> toDelete = view()->selectedModelNodes();
for (ModelNode node : toDelete) {
if (node.isValid() && !node.isRootNode() && QmlObjectNode::isValidQmlObjectNode(node))
diff --git a/src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp b/src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
index 7c2ca0abba..76ae09a453 100644
--- a/src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
+++ b/src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
@@ -235,7 +235,7 @@ void MaterialBrowserView::modelAttached(Model *model)
// Project load is already very busy and may even trigger puppet reset, so let's wait a moment
// before refreshing the model
- QTimer::singleShot(1000, model, [this]() {
+ QTimer::singleShot(1000, model, [this] {
refreshModel(true);
loadPropertyGroups(); // Needs the delay because it uses metaInfo
});
@@ -523,7 +523,7 @@ void MaterialBrowserView::customNotification(const AbstractView *view,
m_widget->focusMaterialSection(false);
}
} else if (identifier == "refresh_material_browser") {
- QTimer::singleShot(0, model(), [this]() {
+ QTimer::singleShot(0, model(), [this] {
refreshModel(true);
});
} else if (identifier == "delete_selected_material") {
@@ -557,7 +557,7 @@ void MaterialBrowserView::instancesCompleted(const QVector<ModelNode> &completed
// We use root node completion as indication of puppet reset
if (node.isRootNode()) {
m_puppetResetPending = false;
- QTimer::singleShot(1000, this, [this]() {
+ QTimer::singleShot(1000, this, [this] {
if (!model() || !model()->nodeInstanceView())
return;
const QList<ModelNode> materials = m_widget->materialBrowserModel()->materials();
diff --git a/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp b/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp
index 645d5fe5b9..8a9ed00c40 100644
--- a/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp
+++ b/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp
@@ -143,7 +143,7 @@ RichTextEditor::RichTextEditor(QWidget *parent)
this, &RichTextEditor::cursorPositionChanged);
connect(m_textEdit, &QTextEdit::textChanged,
this, &RichTextEditor::onTextChanged);
- connect(m_linkDialog, &QDialog::accepted, [this]() {
+ connect(m_linkDialog, &QDialog::accepted, [this] {
QTextCharFormat oldFormat = m_textEdit->textCursor().charFormat();
QTextCursor tcursor = m_textEdit->textCursor();
@@ -392,7 +392,7 @@ void RichTextEditor::setupTextActions()
void RichTextEditor::setupImageActions()
{
- auto insertImage = [this]() {
+ auto insertImage = [this] {
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setWindowTitle(tr("Select Image"));
@@ -417,7 +417,7 @@ void RichTextEditor::setupImageActions()
void RichTextEditor::setupHyperlinkActions()
{
const QIcon bulletIcon(getIcon(Theme::Icon::actionIconBinding));
- m_actionHyperlink = m_toolBar->addAction(bulletIcon, tr("Hyperlink Settings"), [this]() {
+ m_actionHyperlink = m_toolBar->addAction(bulletIcon, tr("Hyperlink Settings"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
QTextCharFormat linkFormat = cursor.charFormat();
if (linkFormat.isAnchor()) {
@@ -440,25 +440,25 @@ void RichTextEditor::setupHyperlinkActions()
void RichTextEditor::setupAlignActions()
{
const QIcon leftIcon(getIcon(Theme::Icon::textAlignLeft));
- m_actionAlignLeft = m_toolBar->addAction(leftIcon, tr("&Left"), [this]() { m_textEdit->setAlignment(Qt::AlignLeft | Qt::AlignAbsolute); });
+ m_actionAlignLeft = m_toolBar->addAction(leftIcon, tr("&Left"), [this] { m_textEdit->setAlignment(Qt::AlignLeft | Qt::AlignAbsolute); });
m_actionAlignLeft->setShortcut(Qt::CTRL | Qt::Key_L);
m_actionAlignLeft->setCheckable(true);
m_actionAlignLeft->setPriority(QAction::LowPriority);
const QIcon centerIcon(getIcon(Theme::Icon::textAlignCenter));
- m_actionAlignCenter = m_toolBar->addAction(centerIcon, tr("C&enter"), [this]() { m_textEdit->setAlignment(Qt::AlignHCenter); });
+ m_actionAlignCenter = m_toolBar->addAction(centerIcon, tr("C&enter"), [this] { m_textEdit->setAlignment(Qt::AlignHCenter); });
m_actionAlignCenter->setShortcut(Qt::CTRL | Qt::Key_E);
m_actionAlignCenter->setCheckable(true);
m_actionAlignCenter->setPriority(QAction::LowPriority);
const QIcon rightIcon(getIcon(Theme::Icon::textAlignRight));
- m_actionAlignRight = m_toolBar->addAction(rightIcon, tr("&Right"), [this]() { m_textEdit->setAlignment(Qt::AlignRight | Qt::AlignAbsolute); });
+ m_actionAlignRight = m_toolBar->addAction(rightIcon, tr("&Right"), [this] { m_textEdit->setAlignment(Qt::AlignRight | Qt::AlignAbsolute); });
m_actionAlignRight->setShortcut(Qt::CTRL | Qt::Key_R);
m_actionAlignRight->setCheckable(true);
m_actionAlignRight->setPriority(QAction::LowPriority);
const QIcon fillIcon(getIcon(Theme::Icon::textFullJustification));
- m_actionAlignJustify = m_toolBar->addAction(fillIcon, tr("&Justify"), [this]() { m_textEdit->setAlignment(Qt::AlignJustify); });
+ m_actionAlignJustify = m_toolBar->addAction(fillIcon, tr("&Justify"), [this] { m_textEdit->setAlignment(Qt::AlignJustify); });
m_actionAlignJustify->setShortcut(Qt::CTRL | Qt::Key_J);
m_actionAlignJustify->setCheckable(true);
m_actionAlignJustify->setPriority(QAction::LowPriority);
@@ -515,7 +515,7 @@ void RichTextEditor::setupFontActions()
{
QPixmap colorBox(drawColorBox(m_textEdit->textColor(), m_tableBar->iconSize()));
- m_actionTextColor = m_toolBar->addAction(colorBox, tr("&Color..."), [this]() {
+ m_actionTextColor = m_toolBar->addAction(colorBox, tr("&Color..."), [this] {
QColor col = QColorDialog::getColor(m_textEdit->textColor(), this);
if (!col.isValid())
return;
@@ -580,7 +580,7 @@ void RichTextEditor::setupTableActions()
//table bar:
const QIcon createTableIcon(getIcon(Theme::Icon::addTable));
- m_actionCreateTable = m_tableBar->addAction(createTableIcon, tr("Create Table"), [this]() {
+ m_actionCreateTable = m_tableBar->addAction(createTableIcon, tr("Create Table"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
cursorEditBlock(cursor, [&] () {
//format table cells to look a bit better:
@@ -598,7 +598,7 @@ void RichTextEditor::setupTableActions()
m_actionCreateTable->setCheckable(false);
const QIcon removeTableIcon(getIcon(Theme::Icon::deleteTable));
- m_actionRemoveTable = m_tableBar->addAction(removeTableIcon, tr("Remove Table"), [this]() {
+ m_actionRemoveTable = m_tableBar->addAction(removeTableIcon, tr("Remove Table"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = m_textEdit->textCursor().currentTable()) {
cursorEditBlock(cursor, [&] () {
@@ -611,7 +611,7 @@ void RichTextEditor::setupTableActions()
m_tableBar->addSeparator();
const QIcon addRowIcon(getIcon(Theme::Icon::addRowAfter)); //addRowAfter
- m_actionAddRow = m_tableBar->addAction(addRowIcon, tr("Add Row"), [this]() {
+ m_actionAddRow = m_tableBar->addAction(addRowIcon, tr("Add Row"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = m_textEdit->textCursor().currentTable()) {
cursorEditBlock(cursor, [&] () {
@@ -622,7 +622,7 @@ void RichTextEditor::setupTableActions()
m_actionAddRow->setCheckable(false);
const QIcon addColumnIcon(getIcon(Theme::Icon::addColumnAfter)); //addColumnAfter
- m_actionAddColumn = m_tableBar->addAction(addColumnIcon, tr("Add Column"), [this]() {
+ m_actionAddColumn = m_tableBar->addAction(addColumnIcon, tr("Add Column"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = m_textEdit->textCursor().currentTable()) {
cursorEditBlock(cursor, [&] () {
@@ -633,7 +633,7 @@ void RichTextEditor::setupTableActions()
m_actionAddColumn->setCheckable(false);
const QIcon removeRowIcon(getIcon(Theme::Icon::deleteRow));
- m_actionRemoveRow = m_tableBar->addAction(removeRowIcon, tr("Remove Row"), [this]() {
+ m_actionRemoveRow = m_tableBar->addAction(removeRowIcon, tr("Remove Row"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = cursor.currentTable()) {
cursorEditBlock(cursor, [&] () {
@@ -657,7 +657,7 @@ void RichTextEditor::setupTableActions()
m_actionRemoveRow->setCheckable(false);
const QIcon removeColumnIcon(getIcon(Theme::Icon::deleteColumn));
- m_actionRemoveColumn = m_tableBar->addAction(removeColumnIcon, tr("Remove Column"), [this]() {
+ m_actionRemoveColumn = m_tableBar->addAction(removeColumnIcon, tr("Remove Column"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = cursor.currentTable()) {
cursorEditBlock(cursor, [&] () {
@@ -681,7 +681,7 @@ void RichTextEditor::setupTableActions()
m_tableBar->addSeparator();
const QIcon mergeCellsIcon(getIcon(Theme::Icon::mergeCells));
- m_actionMergeCells = m_tableBar->addAction(mergeCellsIcon, tr("Merge Cells"), [this]() {
+ m_actionMergeCells = m_tableBar->addAction(mergeCellsIcon, tr("Merge Cells"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = cursor.currentTable()) {
if (cursor.hasSelection()) {
@@ -694,7 +694,7 @@ void RichTextEditor::setupTableActions()
m_actionMergeCells->setCheckable(false);
const QIcon splitRowIcon(getIcon(Theme::Icon::splitRows));
- m_actionSplitRow = m_tableBar->addAction(splitRowIcon, tr("Split Row"), [this]() {
+ m_actionSplitRow = m_tableBar->addAction(splitRowIcon, tr("Split Row"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = cursor.currentTable()) {
cursorEditBlock(cursor, [&] () {
@@ -707,7 +707,7 @@ void RichTextEditor::setupTableActions()
m_actionSplitRow->setCheckable(false);
const QIcon splitColumnIcon(getIcon(Theme::Icon::splitColumns));
- m_actionSplitColumn = m_tableBar->addAction(splitColumnIcon, tr("Split Column"), [this]() {
+ m_actionSplitColumn = m_tableBar->addAction(splitColumnIcon, tr("Split Column"), [this] {
QTextCursor cursor = m_textEdit->textCursor();
if (QTextTable *currentTable = cursor.currentTable()) {
cursorEditBlock(cursor, [&] () {
diff --git a/src/plugins/qmldesigner/components/richtexteditor/richtexteditorproxy.cpp b/src/plugins/qmldesigner/components/richtexteditor/richtexteditorproxy.cpp
index 8f2918d86c..185a406005 100644
--- a/src/plugins/qmldesigner/components/richtexteditor/richtexteditorproxy.cpp
+++ b/src/plugins/qmldesigner/components/richtexteditor/richtexteditorproxy.cpp
@@ -34,8 +34,8 @@ RichTextEditorProxy::RichTextEditorProxy(QObject *parent)
m_dialog->setLayout(layout);
- connect(m_dialog, &QDialog::accepted, [this]() { emit accepted(); });
- connect(m_dialog, &QDialog::rejected, [this]() { emit rejected(); });
+ connect(m_dialog, &QDialog::accepted, [this] { emit accepted(); });
+ connect(m_dialog, &QDialog::rejected, [this] { emit rejected(); });
}
RichTextEditorProxy::~RichTextEditorProxy()
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
index 606e136de0..2ff5adedbe 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
@@ -34,7 +34,7 @@ StatesEditorModel::StatesEditorModel(StatesEditorView *view)
, m_hasExtend(false)
, m_extendedStates()
{
- QObject::connect(this, &StatesEditorModel::dataChanged, [this]() { emit baseStateChanged(); });
+ QObject::connect(this, &StatesEditorModel::dataChanged, [this] { emit baseStateChanged(); });
}
int StatesEditorModel::count() const
@@ -363,7 +363,7 @@ void StatesEditorModel::removeStateGroup()
if (m_statesEditorView->activeStatesGroupNode().isRootNode())
return;
- m_statesEditorView->executeInTransaction("removeStateGroup", [this]() {
+ m_statesEditorView->executeInTransaction("removeStateGroup", [this] {
m_statesEditorView->activeStatesGroupNode().destroy();
});
}
diff --git a/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp b/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp
index 730b4f6157..d535b50369 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp
@@ -63,7 +63,7 @@ CanvasStyleDialog::CanvasStyleDialog(const CanvasStyle &style, QWidget *parent)
setLayout(layout);
- auto emitValueChanged = [this]() {
+ auto emitValueChanged = [this] {
CanvasStyle out;
out.aspect = m_aspect->value();
out.thinLineWidth = m_thinLineWidth->value();
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp
index 188bd49619..b3d408dc0d 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp
@@ -82,7 +82,7 @@ TimelineForm::TimelineForm(QWidget *parent)
expressionBindingL, m_expressionBindingLineEdit, br,
}.attachTo(this);
- connect(m_expressionBindingLineEdit, &QLineEdit::editingFinished, [this]() {
+ connect(m_expressionBindingLineEdit, &QLineEdit::editingFinished, [this] {
QTC_ASSERT(m_timeline.isValid(), return );
const QString bindingText = m_expressionBindingLineEdit->text();
@@ -107,7 +107,7 @@ TimelineForm::TimelineForm(QWidget *parent)
}
});
- connect(m_idLineEdit, &QLineEdit::editingFinished, [this]() {
+ connect(m_idLineEdit, &QLineEdit::editingFinished, [this] {
QTC_ASSERT(m_timeline.isValid(), return );
static QString lastString;
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp
index f116d96223..63169e8ff5 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp
@@ -76,7 +76,7 @@ TimelineGraphicsScene::TimelineGraphicsScene(TimelineWidget *parent,
setSceneRect(m_layout->geometry());
- connect(m_layout, &QGraphicsWidget::geometryChanged, this, [this]() {
+ connect(m_layout, &QGraphicsWidget::geometryChanged, this, [this] {
auto rect = m_layout->geometry();
setSceneRect(rect);
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineitem.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineitem.cpp
index e3602decbd..288a7daee0 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelineitem.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelineitem.cpp
@@ -46,7 +46,7 @@ TimelineFrameHandle::TimelineFrameHandle(TimelineItem *parent)
m_timer.setSingleShot(true);
m_timer.setInterval(15);
- QObject::connect(&m_timer, &QTimer::timeout, [this]() {
+ QObject::connect(&m_timer, &QTimer::timeout, [this] {
if (QApplication::mouseButtons() == Qt::LeftButton)
scrollOutOfBounds();
});
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinepropertyitem.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinepropertyitem.cpp
index 6dcb39f2a0..698ef0f03b 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinepropertyitem.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinepropertyitem.cpp
@@ -406,7 +406,7 @@ void TimelinePropertyItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *even
const ModelNode currentFrameNode = getModelNodeForFrame(m_frames, currentFrame());
QAction *insertAction = mainMenu.addAction(tr("Insert Keyframe"));
- QObject::connect(insertAction, &QAction::triggered, [this]() {
+ QObject::connect(insertAction, &QAction::triggered, [this] {
timelineScene()->handleKeyframeInsertion(m_frames.target(), propertyName().toUtf8());
});
@@ -442,8 +442,8 @@ void TimelinePropertyItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *even
QMenu mainMenu;
QAction *deleteAction = mainMenu.addAction(tr("Remove Property"));
- QObject::connect(deleteAction, &QAction::triggered, [this]() {
- auto deleteKeyframeGroup = [this]() { timelineScene()->deleteKeyframeGroup(m_frames); };
+ QObject::connect(deleteAction, &QAction::triggered, [this] {
+ auto deleteKeyframeGroup = [this] { timelineScene()->deleteKeyframeGroup(m_frames); };
QTimer::singleShot(0, deleteKeyframeGroup);
});
@@ -627,12 +627,12 @@ void TimelineKeyframeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *even
{
QMenu mainMenu;
QAction *removeAction = mainMenu.addAction(tr("Delete Keyframe"));
- QObject::connect(removeAction, &QAction::triggered, [this]() {
+ QObject::connect(removeAction, &QAction::triggered, [this] {
timelineGraphicsScene()->handleKeyframeDeletion();
});
QAction *editEasingAction = mainMenu.addAction(tr("Edit Easing Curve..."));
- QObject::connect(editEasingAction, &QAction::triggered, [this]() {
+ QObject::connect(editEasingAction, &QAction::triggered, [this] {
const QList<ModelNode> keys = Utils::transform(abstractScrollGraphicsScene()->selectedKeyframes(),
&TimelineKeyframeItem::m_frame);
@@ -640,7 +640,7 @@ void TimelineKeyframeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *even
});
QAction *editValueAction = mainMenu.addAction(tr("Edit Keyframe..."));
- QObject::connect(editValueAction, &QAction::triggered, [this]() {
+ QObject::connect(editValueAction, &QAction::triggered, [this] {
std::pair<qreal, qreal> timelineRange = {timelineGraphicsScene()->currentTimeline().startKeyframe(),
timelineGraphicsScene()->currentTimeline().endKeyframe()};
editValue(m_frame, timelineRange, propertyItem()->propertyName());
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp
index b67c70bb0b..1aeb97e677 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp
@@ -361,25 +361,25 @@ void TimelineSectionItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event
QAction *removeAction = mainMenu.addAction(
TimelineConstants::timelineDeleteKeyframesDisplayName);
- QObject::connect(removeAction, &QAction::triggered, [this]() {
+ QObject::connect(removeAction, &QAction::triggered, [this] {
timelineScene()->deleteAllKeyframesForTarget(m_targetNode);
});
QAction *addKeyframesAction = mainMenu.addAction(
TimelineConstants::timelineInsertKeyframesDisplayName);
- QObject::connect(addKeyframesAction, &QAction::triggered, [this]() {
+ QObject::connect(addKeyframesAction, &QAction::triggered, [this] {
timelineScene()->insertAllKeyframesForTarget(m_targetNode);
});
QAction *copyAction = mainMenu.addAction(
TimelineConstants::timelineCopyKeyframesDisplayName);
- QObject::connect(copyAction, &QAction::triggered, [this]() {
+ QObject::connect(copyAction, &QAction::triggered, [this] {
timelineScene()->copyAllKeyframesForTarget(m_targetNode);
});
QAction *pasteAction = mainMenu.addAction(
TimelineConstants::timelinePasteKeyframesDisplayName);
- QObject::connect(pasteAction, &QAction::triggered, [this]() {
+ QObject::connect(pasteAction, &QAction::triggered, [this] {
timelineScene()->pasteKeyframesToTarget(m_targetNode);
});
@@ -1074,7 +1074,7 @@ void TimelineBarItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
QObject::connect(overrideColor, &QAction::triggered, setColor);
QAction* resetColor = menu.addAction(tr("Reset Color"));
- auto reset = [this]() {
+ auto reset = [this] {
ModelNode target = sectionItem()->targetNode();
target.removeAuxiliaryData(timelineOverrideColorProperty);
};
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsdialog.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsdialog.cpp
index e07d394dc1..f8dfc495cd 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsdialog.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsdialog.cpp
@@ -93,11 +93,11 @@ TimelineSettingsDialog::TimelineSettingsDialog(QWidget *parent, TimelineView *vi
auto *timelineRemoveAction = new QAction(TimelineIcons::REMOVE_TIMELINE.icon(),
tr("Remove Timeline"));
- connect(timelineAddAction, &QAction::triggered, this, [this]() {
+ connect(timelineAddAction, &QAction::triggered, this, [this] {
setupTimelines(m_timelineView->addNewTimeline());
});
- connect(timelineRemoveAction, &QAction::triggered, this, [this]() {
+ connect(timelineRemoveAction, &QAction::triggered, this, [this] {
QmlTimeline timeline = getTimelineFromTabWidget(m_timelineTab);
if (timeline.isValid()) {
timeline.destroy();
@@ -119,11 +119,11 @@ TimelineSettingsDialog::TimelineSettingsDialog(QWidget *parent, TimelineView *vi
animationCornerWidget->addAction(animationAddAction);
animationCornerWidget->addAction(animationRemoveAction);
- connect(animationAddAction, &QAction::triggered, this, [this]() {
+ connect(animationAddAction, &QAction::triggered, this, [this] {
setupAnimations(m_timelineView->addAnimation(m_currentTimeline));
});
- connect(animationRemoveAction, &QAction::triggered, this, [this]() {
+ connect(animationRemoveAction, &QAction::triggered, this, [this] {
ModelNode node = getAnimationFromTabWidget(m_animationTab);
if (node.isValid()) {
node.destroy();
@@ -156,7 +156,7 @@ TimelineSettingsDialog::TimelineSettingsDialog(QWidget *parent, TimelineView *vi
setupTimelines(QmlTimeline());
setupAnimations(m_currentTimeline);
- connect(m_timelineTab, &QTabWidget::currentChanged, this, [this]() {
+ connect(m_timelineTab, &QTabWidget::currentChanged, this, [this] {
m_currentTimeline = getTimelineFromTabWidget(m_timelineTab);
setupAnimations(m_currentTimeline);
});
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
index 1d0c84a3b8..7c0e69d9ce 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
@@ -359,7 +359,7 @@ void TimelineToolBar::createCenterControls()
m_currentFrame = createToolBarLineEdit(this);
addWidget(m_currentFrame);
- auto emitCurrentChanged = [this]() { emit currentFrameChanged(m_currentFrame->text().toInt()); };
+ auto emitCurrentChanged = [this] { emit currentFrameChanged(m_currentFrame->text().toInt()); };
connect(m_currentFrame, &QLineEdit::editingFinished, emitCurrentChanged);
addSeparator();
@@ -419,7 +419,7 @@ void TimelineToolBar::createRightControls()
m_firstFrame = createToolBarLineEdit(this);
addWidget(m_firstFrame);
- auto emitStartChanged = [this]() { emit startFrameChanged(m_firstFrame->text().toInt()); };
+ auto emitStartChanged = [this] { emit startFrameChanged(m_firstFrame->text().toInt()); };
connect(m_firstFrame, &QLineEdit::editingFinished, emitStartChanged);
addSeparator();
@@ -431,7 +431,7 @@ void TimelineToolBar::createRightControls()
tr("Zoom Out"),
QKeySequence(QKeySequence::ZoomOut));
- connect(zoomOut, &QAction::triggered, [this]() {
+ connect(zoomOut, &QAction::triggered, [this] {
m_scale->setValue(m_scale->value() - m_scale->pageStep());
});
addAction(zoomOut);
@@ -458,7 +458,7 @@ void TimelineToolBar::createRightControls()
tr("Zoom In"),
QKeySequence(QKeySequence::ZoomIn));
- connect(zoomIn, &QAction::triggered, [this]() {
+ connect(zoomIn, &QAction::triggered, [this] {
m_scale->setValue(m_scale->value() + m_scale->pageStep());
});
addAction(zoomIn);
@@ -470,7 +470,7 @@ void TimelineToolBar::createRightControls()
m_lastFrame = createToolBarLineEdit(this);
addWidget(m_lastFrame);
- auto emitEndChanged = [this]() { emit endFrameChanged(m_lastFrame->text().toInt()); };
+ auto emitEndChanged = [this] { emit endFrameChanged(m_lastFrame->text().toInt()); };
connect(m_lastFrame, &QLineEdit::editingFinished, emitEndChanged);
addSeparator();
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbutton.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbutton.cpp
index 8ebeae675f..6b21ee6822 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbutton.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbutton.cpp
@@ -24,7 +24,7 @@ TimelineToolButton::TimelineToolButton(QAction *action, QGraphicsItem *parent)
resize(TimelineConstants::toolButtonSize, TimelineConstants::toolButtonSize);
setPreferredSize(size());
setAcceptHoverEvents(true);
- connect(action, &QAction::changed, this, [this]() {
+ connect(action, &QAction::changed, this, [this] {
setVisible(m_action->isVisible());
update();
});
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp
index b05083ff05..591926d3f5 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp
@@ -238,7 +238,7 @@ TimelineWidget::TimelineWidget(TimelineView *view)
connectToolbar();
- auto setScrollOffset = [this]() { graphicsScene()->setScrollOffset(m_scrollbar->value()); };
+ auto setScrollOffset = [this] { graphicsScene()->setScrollOffset(m_scrollbar->value()); };
connect(m_scrollbar, &QSlider::valueChanged, this, setScrollOffset);
connect(graphicsScene(),
@@ -246,7 +246,7 @@ TimelineWidget::TimelineWidget(TimelineView *view)
this,
[this](const QString &message) { m_statusBar->setText(message); });
- connect(m_addButton, &QPushButton::clicked, this, [this]() {
+ connect(m_addButton, &QPushButton::clicked, this, [this] {
m_timelineView->addNewTimelineDialog();
});
@@ -268,9 +268,7 @@ TimelineWidget::TimelineWidget(TimelineView *view)
auto playAnimation = [this](QVariant frame) { graphicsScene()->setCurrentFrame(qRound(frame.toDouble())); };
connect(m_playbackAnimation, &QVariantAnimation::valueChanged, playAnimation);
- auto updatePlaybackLoopValues = [this]() {
- updatePlaybackValues();
- };
+ auto updatePlaybackLoopValues = [this] { updatePlaybackValues(); };
connect(graphicsScene()->layoutRuler(), &TimelineRulerSectionItem::playbackLoopValuesChanged, updatePlaybackLoopValues);
auto setPlaybackState = [this](QAbstractAnimation::State newState,
@@ -279,7 +277,7 @@ TimelineWidget::TimelineWidget(TimelineView *view)
};
connect(m_playbackAnimation, &QVariantAnimation::stateChanged, setPlaybackState);
- auto onFinish = [this]() { graphicsScene()->setCurrentFrame(m_playbackAnimation->startValue().toInt()); };
+ auto onFinish = [this] { graphicsScene()->setCurrentFrame(m_playbackAnimation->startValue().toInt()); };
connect(m_playbackAnimation, &QVariantAnimation::finished, onFinish);
TimeLineNS::TimelineScrollAreaSupport::support(m_graphicsView, m_scrollbar);
@@ -297,22 +295,22 @@ void TimelineWidget::connectToolbar()
auto setZoomFactor = [this](int val) { m_graphicsScene->setZoom(val); };
connect(m_toolbar, &TimelineToolBar::scaleFactorChanged, setZoomFactor);
- auto setToFirstFrame = [this]() {
+ auto setToFirstFrame = [this] {
graphicsScene()->setCurrentFrame(graphicsScene()->startFrame());
};
connect(m_toolbar, &TimelineToolBar::toFirstFrameTriggered, setToFirstFrame);
- auto setToLastFrame = [this]() {
+ auto setToLastFrame = [this] {
graphicsScene()->setCurrentFrame(graphicsScene()->endFrame());
};
connect(m_toolbar, &TimelineToolBar::toLastFrameTriggered, setToLastFrame);
- auto setToPreviousFrame = [this]() {
+ auto setToPreviousFrame = [this] {
graphicsScene()->setCurrentFrame(adjacentFrame(&previous));
};
connect(m_toolbar, &TimelineToolBar::previousFrameTriggered, setToPreviousFrame);
- auto setToNextFrame = [this]() { graphicsScene()->setCurrentFrame(adjacentFrame(&next)); };
+ auto setToNextFrame = [this] { graphicsScene()->setCurrentFrame(adjacentFrame(&next)); };
connect(m_toolbar, &TimelineToolBar::nextFrameTriggered, setToNextFrame);
auto setCurrentFrame = [this](int frame) { graphicsScene()->setCurrentFrame(frame); };
diff --git a/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp b/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp
index 5a9431677d..e680a892bf 100644
--- a/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp
+++ b/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp
@@ -139,7 +139,7 @@ WorkspaceModel::WorkspaceModel(QObject *)
if (!dockManager)
return false;
- connect(dockManager, &ADS::DockManager::workspaceListChanged, this, [this]() {
+ connect(dockManager, &ADS::DockManager::workspaceListChanged, this, [this] {
beginResetModel();
endResetModel();
});
@@ -323,7 +323,7 @@ ToolBarBackend::ToolBarBackend(QObject *parent)
auto editorManager = Core::EditorManager::instance();
- connect(editorManager, &Core::EditorManager::documentClosed, this, [this]() {
+ connect(editorManager, &Core::EditorManager::documentClosed, this, [this] {
if (isInDesignMode() && Core::DocumentModel::entryCount() == 0) {
QTimer::singleShot(0,
Core::ModeManager::instance(),
@@ -340,7 +340,7 @@ ToolBarBackend::ToolBarBackend(QObject *parent)
});
});
- connect(Core::ModeManager::instance(), &Core::ModeManager::currentModeChanged, this, [this]() {
+ connect(Core::ModeManager::instance(), &Core::ModeManager::currentModeChanged, this, [this] {
emit isInDesignModeChanged();
emit isInEditModeChanged();
emit isInSessionModeChanged();
@@ -381,7 +381,7 @@ void ToolBarBackend::registerDeclarativeType()
void ToolBarBackend::triggerModeChange()
{
QmlDesignerPlugin::emitUsageStatistics(Constants::EVENT_TOOLBAR_MODE_CHANGE);
- QTimer::singleShot(0, this, [this]() { //Do not trigger mode change directly from QML
+ QTimer::singleShot(0, this, [this] { //Do not trigger mode change directly from QML
bool qmlFileOpen = false;
if (!projectOpened()) {
diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorgraphicsscene.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorgraphicsscene.cpp
index 908fe3e122..e8c04ae38b 100644
--- a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorgraphicsscene.cpp
+++ b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorgraphicsscene.cpp
@@ -63,7 +63,7 @@ TransitionEditorGraphicsScene::TransitionEditorGraphicsScene(TransitionEditorWid
setSceneRect(m_layout->geometry());
- connect(m_layout, &QGraphicsWidget::geometryChanged, this, [this]() {
+ connect(m_layout, &QGraphicsWidget::geometryChanged, this, [this] {
auto rect = m_layout->geometry();
setSceneRect(rect);
diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsectionitem.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsectionitem.cpp
index e12b6e915b..cbe0e0b1c1 100644
--- a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsectionitem.cpp
+++ b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsectionitem.cpp
@@ -559,7 +559,7 @@ void TransitionEditorBarItem::commitPosition(const QPointF & /*point*/)
if (m_handle != Location::Undefined) {
sectionItem()
->view()
- ->executeInTransaction("TransitionEditorBarItem::commitPosition", [this]() {
+ ->executeInTransaction("TransitionEditorBarItem::commitPosition", [this] {
qreal scaleFactor = rect().width() / m_oldRect.width();
qreal moved = (rect().topLeft().x() - m_oldRect.topLeft().x()) / rulerScaling();
@@ -574,7 +574,7 @@ void TransitionEditorBarItem::commitPosition(const QPointF & /*point*/)
if (m_handle != Location::Undefined) {
propertyItem()
->view()
- ->executeInTransaction("TransitionEditorBarItem::commitPosition", [this]() {
+ ->executeInTransaction("TransitionEditorBarItem::commitPosition", [this] {
qreal scaleFactor = rect().width() / m_oldRect.width();
qreal moved = (rect().topLeft().x() - m_oldRect.topLeft().x()) / rulerScaling();
qreal supposedFirstFrame = qRound(moved);
diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsettingsdialog.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsettingsdialog.cpp
index 21318e3f38..0f7bff6c82 100644
--- a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsettingsdialog.cpp
+++ b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorsettingsdialog.cpp
@@ -71,11 +71,11 @@ TransitionEditorSettingsDialog::TransitionEditorSettingsDialog(QWidget *parent,
auto *transitionRemoveAction = new QAction(TimelineIcons::REMOVE_TIMELINE.icon(),
tr("Remove Transition"));
- connect(transitionAddAction, &QAction::triggered, this, [this]() {
+ connect(transitionAddAction, &QAction::triggered, this, [this] {
setupTransitions(m_transitionEditorView->addNewTransition());
});
- connect(transitionRemoveAction, &QAction::triggered, this, [this]() {
+ connect(transitionRemoveAction, &QAction::triggered, this, [this] {
if (ModelNode transition = getTransitionFromTabWidget(ui->timelineTab)) {
transition.destroy();
setupTransitions({});
@@ -89,7 +89,7 @@ TransitionEditorSettingsDialog::TransitionEditorSettingsDialog(QWidget *parent,
setupTransitions({});
- connect(ui->timelineTab, &QTabWidget::currentChanged, this, [this]() {
+ connect(ui->timelineTab, &QTabWidget::currentChanged, this, [this] {
m_currentTransition = getTransitionFromTabWidget(ui->timelineTab);
});
}
diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitioneditortoolbar.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitioneditortoolbar.cpp
index 194a4ad221..d466d9aafc 100644
--- a/src/plugins/qmldesigner/components/transitioneditor/transitioneditortoolbar.cpp
+++ b/src/plugins/qmldesigner/components/transitioneditor/transitioneditortoolbar.cpp
@@ -182,7 +182,7 @@ void TransitionEditorToolBar::createLeftControls()
m_transitionComboBox = new QComboBox(this);
addWidgetToGroup(m_transitionComboBox);
- connect(m_transitionComboBox, &QComboBox::currentTextChanged, this, [this]() {
+ connect(m_transitionComboBox, &QComboBox::currentTextChanged, this, [this] {
emit currentTransitionChanged(m_transitionComboBox->currentText());
});
}
@@ -242,7 +242,7 @@ void TransitionEditorToolBar::createRightControls()
tr("Zoom Out"),
QKeySequence(QKeySequence::ZoomOut));
- connect(zoomOut, &QAction::triggered, [this]() {
+ connect(zoomOut, &QAction::triggered, [this] {
m_scale->setValue(m_scale->value() - m_scale->pageStep());
});
addAction(zoomOut);
@@ -269,7 +269,7 @@ void TransitionEditorToolBar::createRightControls()
tr("Zoom In"),
QKeySequence(QKeySequence::ZoomIn));
- connect(zoomIn, &QAction::triggered, [this]() {
+ connect(zoomIn, &QAction::triggered, [this] {
m_scale->setValue(m_scale->value() + m_scale->pageStep());
});
addAction(zoomIn);
@@ -281,7 +281,7 @@ void TransitionEditorToolBar::createRightControls()
m_duration = createToolBarLineEdit(this);
addWidget(m_duration);
- auto emitEndChanged = [this]() { emit durationChanged(m_duration->text().toInt()); };
+ auto emitEndChanged = [this] { emit durationChanged(m_duration->text().toInt()); };
connect(m_duration, &QLineEdit::editingFinished, emitEndChanged);
addSpacing(5);
diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorwidget.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorwidget.cpp
index 235722e4c8..57bb295d0c 100644
--- a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorwidget.cpp
@@ -198,7 +198,7 @@ TransitionEditorWidget::TransitionEditorWidget(TransitionEditorView *view)
connectToolbar();
- auto setScrollOffset = [this]() { graphicsScene()->setScrollOffset(m_scrollbar->value()); };
+ auto setScrollOffset = [this] { graphicsScene()->setScrollOffset(m_scrollbar->value()); };
connect(m_scrollbar, &QSlider::valueChanged, this, setScrollOffset);
connect(graphicsScene(),
@@ -206,7 +206,7 @@ TransitionEditorWidget::TransitionEditorWidget(TransitionEditorView *view)
this,
[this](const QString &message) { m_statusBar->setText(message); });
- connect(m_addButton, &QPushButton::clicked, this, [this]() {
+ connect(m_addButton, &QPushButton::clicked, this, [this] {
m_transitionEditorView->addNewTransition();
});
diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitionform.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitionform.cpp
index c58bdf61d5..1770ba63fc 100644
--- a/src/plugins/qmldesigner/components/transitioneditor/transitionform.cpp
+++ b/src/plugins/qmldesigner/components/transitioneditor/transitionform.cpp
@@ -27,7 +27,7 @@ TransitionForm::TransitionForm(QWidget *parent)
{
ui->setupUi(this);
- connect(ui->idLineEdit, &QLineEdit::editingFinished, [this]() {
+ connect(ui->idLineEdit, &QLineEdit::editingFinished, [this] {
QTC_ASSERT(m_transition.isValid(), return );
static QString lastString;
@@ -62,7 +62,7 @@ TransitionForm::TransitionForm(QWidget *parent)
}
});
- connect(ui->listWidgetTo, &QListWidget::itemChanged, this, [this]() {
+ connect(ui->listWidgetTo, &QListWidget::itemChanged, this, [this] {
QTC_ASSERT(m_transition.isValid(), return );
const QmlItemNode root(m_transition.view()->rootModelNode());
QTC_ASSERT(root.isValid(), return );
@@ -86,7 +86,7 @@ TransitionForm::TransitionForm(QWidget *parent)
});
});
- connect(ui->listWidgetFrom, &QListWidget::itemChanged, this, [this]() {
+ connect(ui->listWidgetFrom, &QListWidget::itemChanged, this, [this] {
QTC_ASSERT(m_transition.isValid(), return );
const QmlItemNode root(m_transition.view()->rootModelNode());
QTC_ASSERT(root.isValid(), return );
diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp
index 04be9afc5d..d88e51e4e5 100644
--- a/src/plugins/qmldesigner/designmodewidget.cpp
+++ b/src/plugins/qmldesigner/designmodewidget.cpp
@@ -491,7 +491,7 @@ void DesignModeWidget::aboutToShowWorkspaces()
});
QAction *resetWorkspace = menu->addAction(tr("Reset Active"));
- connect(resetWorkspace, &QAction::triggered, this, [this]() {
+ connect(resetWorkspace, &QAction::triggered, this, [this] {
if (m_dockManager->resetWorkspacePreset(m_dockManager->activeWorkspace()->fileName()))
m_dockManager->reloadActiveWorkspace();
});
diff --git a/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp b/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
index 3cae3ecab4..5031e811bd 100644
--- a/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
+++ b/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
@@ -499,7 +499,7 @@ void QmlDesignerProjectManager::generatePreview()
QmlDesignerProjectManager::ImageCacheData *QmlDesignerProjectManager::imageCacheData()
{
- std::call_once(imageCacheFlag, [this]() {
+ std::call_once(imageCacheFlag, [this] {
m_imageCacheData = std::make_unique<ImageCacheData>(m_externalDependencies);
auto setTargetInImageCache =
[imageCacheData = m_imageCacheData.get()](ProjectExplorer::Target *target) {
diff --git a/src/plugins/qmldesigner/utils/filedownloader.cpp b/src/plugins/qmldesigner/utils/filedownloader.cpp
index 38f0caeeb3..2b0dacea2d 100644
--- a/src/plugins/qmldesigner/utils/filedownloader.cpp
+++ b/src/plugins/qmldesigner/utils/filedownloader.cpp
@@ -16,12 +16,12 @@ namespace QmlDesigner {
FileDownloader::FileDownloader(QObject *parent)
: QObject(parent)
{
- QObject::connect(this, &FileDownloader::downloadFailed, this, [this]() {
+ QObject::connect(this, &FileDownloader::downloadFailed, this, [this] {
if (m_outputFile.exists())
m_outputFile.remove();
});
- QObject::connect(this, &FileDownloader::downloadCanceled, this, [this]() {
+ QObject::connect(this, &FileDownloader::downloadCanceled, this, [this] {
if (m_outputFile.exists())
m_outputFile.remove();
});
diff --git a/src/plugins/qmldesigner/utils/multifiledownloader.cpp b/src/plugins/qmldesigner/utils/multifiledownloader.cpp
index 6a452d6b09..f0a3201c04 100644
--- a/src/plugins/qmldesigner/utils/multifiledownloader.cpp
+++ b/src/plugins/qmldesigner/utils/multifiledownloader.cpp
@@ -16,30 +16,30 @@ void MultiFileDownloader::setDownloader(FileDownloader *downloader)
{
m_downloader = downloader;
- QObject::connect(this, &MultiFileDownloader::downloadStarting, [this]() {
+ QObject::connect(this, &MultiFileDownloader::downloadStarting, [this] {
m_nextFile = 0;
if (m_files.length() > 0)
m_downloader->start();
});
- QObject::connect(m_downloader, &FileDownloader::progressChanged, this, [this]() {
+ QObject::connect(m_downloader, &FileDownloader::progressChanged, this, [this] {
double curProgress = m_downloader->progress() / 100.0;
double totalProgress = (m_nextFile + curProgress) / m_files.size();
m_progress = totalProgress * 100;
emit progressChanged();
});
- QObject::connect(m_downloader, &FileDownloader::downloadFailed, this, [this]() {
+ QObject::connect(m_downloader, &FileDownloader::downloadFailed, this, [this] {
m_failed = true;
emit downloadFailed();
});
- QObject::connect(m_downloader, &FileDownloader::downloadCanceled, this, [this]() {
+ QObject::connect(m_downloader, &FileDownloader::downloadCanceled, this, [this] {
m_canceled = true;
emit downloadCanceled();
});
- QObject::connect(m_downloader, &FileDownloader::finishedChanged, this, [this]() {
+ QObject::connect(m_downloader, &FileDownloader::finishedChanged, this, [this] {
switchToNextFile();
});
}
diff --git a/src/plugins/qmldesignerbase/studio/studiosettingspage.cpp b/src/plugins/qmldesignerbase/studio/studiosettingspage.cpp
index 05db597c5b..5fcd77481c 100644
--- a/src/plugins/qmldesignerbase/studio/studiosettingspage.cpp
+++ b/src/plugins/qmldesignerbase/studio/studiosettingspage.cpp
@@ -122,7 +122,7 @@ StudioSettingsPage::StudioSettingsPage()
m_pathChooserExamples->setFilePath(Utils::FilePath::fromString(Paths::examplesPathSetting()));
auto examplesResetButton = new QPushButton(tr("Reset Path"));
- connect(examplesResetButton, &QPushButton::clicked, this, [this]() {
+ connect(examplesResetButton, &QPushButton::clicked, this, [this] {
m_pathChooserExamples->setFilePath(Paths::defaultExamplesPath());
});
@@ -141,7 +141,7 @@ StudioSettingsPage::StudioSettingsPage()
m_pathChooserBundles->setFilePath(Utils::FilePath::fromString(Paths::bundlesPathSetting()));
QPushButton *bundlesResetButton = new QPushButton(tr("Reset Path"));
- connect(bundlesResetButton, &QPushButton::clicked, this, [this]() {
+ connect(bundlesResetButton, &QPushButton::clicked, this, [this] {
m_pathChooserBundles->setFilePath(Paths::defaultBundlesPath());
});
diff --git a/src/plugins/qmljseditor/qmljsoutline.cpp b/src/plugins/qmljseditor/qmljsoutline.cpp
index 73a9b2b0b3..51dfb56fa2 100644
--- a/src/plugins/qmljseditor/qmljsoutline.cpp
+++ b/src/plugins/qmljseditor/qmljsoutline.cpp
@@ -131,11 +131,11 @@ void QmlJSOutlineWidget::setEditor(QmlJSEditorWidget *editor)
m_filterModel->setSourceModel(m_editor->qmlJsEditorDocument()->outlineModel());
m_treeView->expandAll();
- connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QAbstractItemModel::modelAboutToBeReset, m_treeView, [this]() {
+ connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QAbstractItemModel::modelAboutToBeReset, m_treeView, [this] {
if (m_treeView->selectionModel())
m_treeView->selectionModel()->blockSignals(true);
});
- connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QAbstractItemModel::modelReset, m_treeView, [this]() {
+ connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QAbstractItemModel::modelReset, m_treeView, [this] {
if (m_treeView->selectionModel())
m_treeView->selectionModel()->blockSignals(false);
});
diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp
index e4c0adc7d0..3a5ec69aed 100644
--- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp
+++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp
@@ -160,7 +160,7 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent)
action->setEnabled(ProjectManager::startupProject() != nullptr);
connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, action,
&QAction::setEnabled);
- connect(action, &QAction::triggered, this, [this]() {
+ connect(action, &QAction::triggered, this, [this] {
if (auto multiLanguageAspect = QmlProjectManager::QmlMultiLanguageAspect::current())
m_localeIsoCode = multiLanguageAspect->currentLocale();
bool skipDeploy = false;
diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
index 4dcfb91743..7c65e68550 100644
--- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
@@ -91,11 +91,11 @@ void QmlProfilerClientManager::createClients()
m_clientPlugin.data(), &QmlProfilerTraceClient::setRecording);
QObject::connect(this, &QmlDebug::QmlDebugConnectionManager::connectionOpened,
- m_clientPlugin.data(), [this]() {
+ m_clientPlugin.data(), [this] {
m_clientPlugin->setRecording(m_profilerState->clientRecording());
});
QObject::connect(this, &QmlDebug::QmlDebugConnectionManager::connectionClosed,
- m_clientPlugin.data(), [this]() {
+ m_clientPlugin.data(), [this] {
m_profilerState->setServerRecording(false);
});
}
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
index 92126d42e3..4d3a73d4dc 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
@@ -86,7 +86,7 @@ void QmlProfilerStatisticsModel::restrictToFeatures(quint64 features)
m_modelManager->replayQmlEvents(filter(std::bind(&QmlProfilerStatisticsModel::loadEvent, this,
std::placeholders::_1, std::placeholders::_2)),
std::bind(&QmlProfilerStatisticsModel::beginResetModel, this),
- [this]() {
+ [this] {
finalize();
notesChanged(QmlProfilerStatisticsModel::s_invalidTypeId); // Reload notes
}, [this](const QString &message) {
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 14369b6500..aa2397a18a 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -188,7 +188,7 @@ QmlProfilerTool::QmlProfilerTool()
d->m_searchButton->setEnabled(false);
connect(d->m_searchButton, &QToolButton::clicked, this, &QmlProfilerTool::showTimeLineSearch);
- connect(d->m_viewContainer, &QmlProfilerViewManager::viewsCreated, this, [this]() {
+ connect(d->m_viewContainer, &QmlProfilerViewManager::viewsCreated, this, [this] {
d->m_searchButton->setEnabled(d->m_viewContainer->traceView()->isUsable());
});
@@ -241,7 +241,7 @@ QmlProfilerTool::QmlProfilerTool()
});
}
- auto updateRecordButton = [this]() {
+ auto updateRecordButton = [this] {
const bool recording =
d->m_profilerState->currentState() != QmlProfilerStateManager::AppRunning
? d->m_profilerState->clientRecording() : d->m_profilerState->serverRecording();
@@ -738,7 +738,7 @@ void QmlProfilerTool::clientsDisconnected()
// ... and return to the "base" state
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying) {
- QTimer::singleShot(0, d->m_profilerState, [this]() {
+ QTimer::singleShot(0, d->m_profilerState, [this] {
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
});
}
@@ -855,7 +855,7 @@ void QmlProfilerTool::profilerStateChanged()
d->m_profilerConnections->stopRecording();
} else {
// Directly transition to idle
- QTimer::singleShot(0, d->m_profilerState, [this]() {
+ QTimer::singleShot(0, d->m_profilerState, [this] {
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
});
}
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index 290dc00dd8..eccc52fd86 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -74,7 +74,7 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag
setObjectName("QmlProfiler.Timeline.Dock");
d->m_zoomControl = new Timeline::TimelineZoomControl(this);
- modelManager->registerFeatures(0, QmlProfilerModelManager::QmlEventLoader(), [this]() {
+ modelManager->registerFeatures(0, QmlProfilerModelManager::QmlEventLoader(), [this] {
if (d->m_suspendedModels.isEmpty()) {
// Temporarily remove the models, while we're changing them
d->m_suspendedModels = d->m_modelProxy->models();
@@ -90,7 +90,7 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag
d->m_zoomControl->setRange(start, start + (end - start) / 10);
d->m_modelProxy->setModels(d->m_suspendedModels);
d->m_suspendedModels.clear();
- }, [this]() {
+ }, [this] {
d->m_zoomControl->clear();
if (!d->m_suspendedModels.isEmpty()) {
d->m_modelProxy->setModels(d->m_suspendedModels);
diff --git a/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp b/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp
index 60107e469e..f49b507972 100644
--- a/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp
+++ b/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp
@@ -87,7 +87,7 @@ QmlBuildSystem::QmlBuildSystem(Target *target)
refresh(RefreshOptions::NoFileRefresh);
updateMcuBuildStep(target, qtForMCUs());
});
- connect(target->project(), &Project::projectFileIsDirty, this, [this]() {
+ connect(target->project(), &Project::projectFileIsDirty, this, [this] {
refresh(RefreshOptions::Project);
updateMcuBuildStep(project()->activeTarget(), qtForMCUs());
});
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 18e6146228..591f3896c5 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -211,7 +211,7 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
if (!qmlRuntime.isEmpty())
return qmlRuntime;
}
- auto hasDeployStep = [this]() {
+ auto hasDeployStep = [this] {
return target()->activeDeployConfiguration() &&
!target()->activeDeployConfiguration()->stepList()->isEmpty();
};
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index baa05697b2..e32cc5a476 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -80,7 +80,7 @@ ResourceEditorW::ResourceEditorW(const Core::Context &context,
connect(m_resourceEditor, &QrcEditor::itemActivated,
this, &ResourceEditorW::openFile);
connect(m_resourceEditor->commandHistory(), &QUndoStack::indexChanged,
- m_resourceDocument, [this]() { m_resourceDocument->setShouldAutoSave(true); });
+ m_resourceDocument, [this] { m_resourceDocument->setShouldAutoSave(true); });
if (debugResourceEditorW)
qDebug() << "ResourceEditorW::ResourceEditorW()";
}
diff --git a/src/plugins/screenrecorder/cropandtrim.cpp b/src/plugins/screenrecorder/cropandtrim.cpp
index 819f0e285b..53be6a267b 100644
--- a/src/plugins/screenrecorder/cropandtrim.cpp
+++ b/src/plugins/screenrecorder/cropandtrim.cpp
@@ -541,7 +541,7 @@ TrimWidget::TrimWidget(const ClipInfo &clip, QWidget *parent)
noMargin(),
}.attachTo(this);
- connect(m_frameSlider, &QSlider::valueChanged, this, [this]() {
+ connect(m_frameSlider, &QSlider::valueChanged, this, [this] {
m_currentTime->setFrame(currentFrame());
updateTrimWidgets();
emit positionChanged();
diff --git a/src/plugins/scxmleditor/common/navigatorslider.cpp b/src/plugins/scxmleditor/common/navigatorslider.cpp
index ab3738bc06..18d57e7dad 100644
--- a/src/plugins/scxmleditor/common/navigatorslider.cpp
+++ b/src/plugins/scxmleditor/common/navigatorslider.cpp
@@ -41,7 +41,7 @@ NavigatorSlider::NavigatorSlider(QWidget *parent)
connect(zoomOut, &QToolButton::clicked, this, &NavigatorSlider::zoomOut);
connect(zoomIn, &QToolButton::clicked, this, &NavigatorSlider::zoomIn);
- connect(m_slider, &QSlider::valueChanged, this, [=](int newValue){
+ connect(m_slider, &QSlider::valueChanged, this, [this](int newValue) {
emit valueChanged(newValue);
});
}
diff --git a/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp b/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp
index 94bd8b41ed..12b9949f94 100644
--- a/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp
+++ b/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp
@@ -885,7 +885,7 @@ void GraphicsScene::addChild(BaseItem *item)
{
if (!m_baseItems.contains(item)) {
connect(item, &BaseItem::selectedStateChanged, this, &GraphicsScene::selectionChanged);
- connect(item, &BaseItem::openToDifferentView, this, [=](BaseItem *item){
+ connect(item, &BaseItem::openToDifferentView, this, [this](BaseItem *item) {
emit openStateView(item);
}, Qt::QueuedConnection);
m_baseItems << item;
diff --git a/src/plugins/scxmleditor/plugin_interface/stateitem.cpp b/src/plugins/scxmleditor/plugin_interface/stateitem.cpp
index 0dc525e644..ec13794ea8 100644
--- a/src/plugins/scxmleditor/plugin_interface/stateitem.cpp
+++ b/src/plugins/scxmleditor/plugin_interface/stateitem.cpp
@@ -43,7 +43,7 @@ StateItem::StateItem(const QPointF &pos, BaseItem *parent)
checkWarningItems();
- connect(m_stateNameItem, &TextItem::selected, this, [=](bool sel){
+ connect(m_stateNameItem, &TextItem::selected, this, [this](bool sel) {
setItemSelected(sel);
});
connect(m_stateNameItem, &TextItem::textChanged, this, &StateItem::updateTextPositions);
diff --git a/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp b/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp
index 71535fbfed..0614c51b8a 100644
--- a/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp
+++ b/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp
@@ -50,7 +50,7 @@ TransitionItem::TransitionItem(BaseItem *parent)
<< QPointF(0, 1);
m_eventTagItem = new TagTextItem(this);
- connect(m_eventTagItem, &TagTextItem::selected, this, [=](bool sel){
+ connect(m_eventTagItem, &TagTextItem::selected, this, [this](bool sel) {
setItemSelected(sel);
});
connect(m_eventTagItem, &TagTextItem::textReady, this, &TransitionItem::textHasChanged);
diff --git a/src/plugins/studiowelcome/examplecheckout.cpp b/src/plugins/studiowelcome/examplecheckout.cpp
index d0e3082491..ea3b964c8c 100644
--- a/src/plugins/studiowelcome/examplecheckout.cpp
+++ b/src/plugins/studiowelcome/examplecheckout.cpp
@@ -115,7 +115,7 @@ DataModelDownloader::DataModelDownloader(QObject * /* parent */)
&DataModelDownloader::targetPathMustChange);
}
- connect(&m_fileDownloader, &QmlDesigner::FileDownloader::finishedChanged, this, [this]() {
+ connect(&m_fileDownloader, &QmlDesigner::FileDownloader::finishedChanged, this, [this] {
m_started = false;
if (m_fileDownloader.finished()) {
diff --git a/src/plugins/studiowelcome/qdsnewdialog.cpp b/src/plugins/studiowelcome/qdsnewdialog.cpp
index 91c03828d2..671670f609 100644
--- a/src/plugins/studiowelcome/qdsnewdialog.cpp
+++ b/src/plugins/studiowelcome/qdsnewdialog.cpp
@@ -94,7 +94,7 @@ QdsNewDialog::QdsNewDialog(QWidget *parent)
deleteLater();
});
- QObject::connect(m_styleModel.data(), &StyleModel::modelAboutToBeReset, this, [this]() {
+ QObject::connect(m_styleModel.data(), &StyleModel::modelAboutToBeReset, this, [this] {
m_qmlStyleIndex = -1;
});
}
diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp
index d9b29ffb95..aa8bb370b0 100644
--- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp
+++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp
@@ -509,7 +509,7 @@ void ProjectModel::resetProjects()
void ProjectModel::delayedResetProjects()
{
- QTimer::singleShot(2000, this, [this]() {
+ QTimer::singleShot(2000, this, [this] {
beginResetModel();
endResetModel();
m_blockOpenRecent = false;
@@ -768,7 +768,7 @@ WelcomeMode::WelcomeMode()
m_modeWidget->layout()->addWidget(m_quickWidget);
});
- connect(m_dataModelDownloader, &DataModelDownloader::downloadFailed, this, [this]() {
+ connect(m_dataModelDownloader, &DataModelDownloader::downloadFailed, this, [this] {
m_quickWidget->setEnabled(true);
});
diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp
index 64a1212e4a..60a8656cc9 100644
--- a/src/plugins/terminal/terminalwidget.cpp
+++ b/src/plugins/terminal/terminalwidget.cpp
@@ -145,7 +145,7 @@ void TerminalWidget::setupPty()
if (m_shellIntegration)
m_shellIntegration->prepareProcess(*m_process.get());
- connect(m_process.get(), &Process::readyReadStandardOutput, this, [this]() {
+ connect(m_process.get(), &Process::readyReadStandardOutput, this, [this] {
onReadyRead(false);
});
diff --git a/src/plugins/texteditor/bookmarkfilter.cpp b/src/plugins/texteditor/bookmarkfilter.cpp
index c56ddff617..8f787e2e4e 100644
--- a/src/plugins/texteditor/bookmarkfilter.cpp
+++ b/src/plugins/texteditor/bookmarkfilter.cpp
@@ -31,7 +31,7 @@ LocatorMatcherTasks BookmarkFilter::matchers()
Storage<LocatorStorage> storage;
- const auto onSetup = [=] { storage->reportOutput(match(storage->input())); };
+ const auto onSetup = [this, storage] { storage->reportOutput(match(storage->input())); };
return {{Sync(onSetup), storage}};
}
diff --git a/src/plugins/texteditor/findinfiles.cpp b/src/plugins/texteditor/findinfiles.cpp
index bf4856fd48..440ae069a7 100644
--- a/src/plugins/texteditor/findinfiles.cpp
+++ b/src/plugins/texteditor/findinfiles.cpp
@@ -154,7 +154,7 @@ QWidget *FindInFiles::createConfigWidget()
for (const QString &dir: legacyHistory)
completer->addEntry(dir);
}
- m_directory->addButton("Current", this, [this]() {
+ m_directory->addButton("Current", this, [this] {
const IDocument *document = EditorManager::instance()->currentDocument();
if (!document)
return;
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 0d0f66e6b1..742a2a748a 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -1076,7 +1076,7 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent)
connect(&m_codeAssistant, &CodeAssistant::finished,
q, &TextEditorWidget::assistFinished);
- connect(q, &QPlainTextEdit::blockCountChanged, this, [this]() { slotUpdateExtraAreaWidth(); });
+ connect(q, &QPlainTextEdit::blockCountChanged, this, [this] { slotUpdateExtraAreaWidth(); });
connect(q, &QPlainTextEdit::modificationChanged,
m_extraArea, QOverload<>::of(&QWidget::update));