diff --git a/GUI/Model/Model/FitParameterModel.cpp b/GUI/Model/Model/FitParameterModel.cpp index b11177b6f8d68cf1af9a521803e2db5ddb1d145f..2395bf750c1055e8ad1f7e82bd2a840d015fdb21 100644 --- a/GUI/Model/Model/FitParameterModel.cpp +++ b/GUI/Model/Model/FitParameterModel.cpp @@ -33,7 +33,7 @@ FitParameterModel::FitParameterModel(FitParameterContainerItem* fitParContainer, connectContainer(); connect(fitParContainer, &QObject::destroyed, this, [this] { m_fitParameterContainer = nullptr; }); - connect(jobItem, &QObject::destroyed, this, [this] { m_jobItem = nullptr; }); + connect(jobItem, &QObject::destroyed, [this] { m_jobItem = nullptr; }); } Qt::ItemFlags FitParameterModel::flags(const QModelIndex& index) const diff --git a/GUI/Model/Sample/MaterialModel.cpp b/GUI/Model/Sample/MaterialModel.cpp index b10de3d454c661493d2a183ac5cf3641d7f41e58..cd95e6d36443db8fa2dd01a3f83ab16ba2a9f4af 100644 --- a/GUI/Model/Sample/MaterialModel.cpp +++ b/GUI/Model/Sample/MaterialModel.cpp @@ -86,7 +86,7 @@ MaterialItem* MaterialModel::addMaterialItem(MaterialItem* materialItem, bool si ASSERT(materialItem); materialItem->disconnect(this); m_materials << materialItem; - connect(materialItem, &MaterialItem::dataChanged, this, [this] { emit materialChanged(); }); + connect(materialItem, &MaterialItem::dataChanged, [this] { emit materialChanged(); }); if (signalAdding) emit materialAddedOrRemoved(); diff --git a/GUI/View/Access/DataAccessWidget.cpp b/GUI/View/Access/DataAccessWidget.cpp index ddf6fb5f9cbc5700f099ad42bc578f9198f002ce..73337bb843aced1d8e54893f336d2fefe0c271a9 100644 --- a/GUI/View/Access/DataAccessWidget.cpp +++ b/GUI/View/Access/DataAccessWidget.cpp @@ -32,7 +32,7 @@ void DataAccessWidget::setBaseItem(QObject* item) ASSERT(jobItem() || realItem()); disconnect(m_item, &QObject::destroyed, this, nullptr); - connect(m_item, &QObject::destroyed, this, [this] { m_item = nullptr; }); + connect(m_item, &QObject::destroyed, [this] { m_item = nullptr; }); } QList<QAction*> DataAccessWidget::actionList() diff --git a/GUI/View/Combo/ItemComboWidget.cpp b/GUI/View/Combo/ItemComboWidget.cpp index e271420d0960741e533f715a2d3454c4f4ed6c82..a20d6a8134d928725a480ebad797aaf9448df957 100644 --- a/GUI/View/Combo/ItemComboWidget.cpp +++ b/GUI/View/Combo/ItemComboWidget.cpp @@ -97,7 +97,7 @@ void ItemComboWidget::setTheItem(QObject* item) ASSERT(jobItem() || realItem()); disconnect(m_item, &QObject::destroyed, this, nullptr); - connect(m_item, &QObject::destroyed, this, [this] { m_item = nullptr; }); + connect(m_item, &QObject::destroyed, [this] { m_item = nullptr; }); setToolbarVisible(!itemPresentation().isEmpty()); m_toolbar->setPresentationList(presentationList(), activePresentationList()); diff --git a/GUI/View/Fit/FitSessionManager.cpp b/GUI/View/Fit/FitSessionManager.cpp index 9c61b822b912c46badab3ba9d2f59b69611a0284..d78afeb5ed2c2b67b9c60959f105e972ad393d2a 100644 --- a/GUI/View/Fit/FitSessionManager.cpp +++ b/GUI/View/Fit/FitSessionManager.cpp @@ -48,7 +48,7 @@ FitSessionController* FitSessionManager::sessionController(JobItem* jobItem) FitSessionController* FitSessionManager::createController(JobItem* jobItem) { - connect(jobItem, &JobItem::destroyed, this, [this, jobItem] { removeController(jobItem); }); + connect(jobItem, &JobItem::destroyed, [this, jobItem] { removeController(jobItem); }); auto* result = new FitSessionController(this); result->setJobItem(jobItem); diff --git a/GUI/View/FitControl/RunFitControlWidget.cpp b/GUI/View/FitControl/RunFitControlWidget.cpp index a5cb0aed3dfbddfc2415aa1fc730e0ef02a2b566..3184e43f839cd0479e0085f6a3d62bc7f8833ca2 100644 --- a/GUI/View/FitControl/RunFitControlWidget.cpp +++ b/GUI/View/FitControl/RunFitControlWidget.cpp @@ -86,8 +86,8 @@ RunFitControlWidget::RunFitControlWidget() setLayout(layout); connect(m_startButton, &QPushButton::clicked, [&] { emit startFittingPushed(); }); - connect(m_stopButton, &QPushButton::clicked, this, [&] { emit stopFittingPushed(); }); - connect(m_updButton, &QPushButton::clicked, this, [&] { emit updFromTreePushed(); }); + connect(m_stopButton, &QPushButton::clicked, [&] { emit stopFittingPushed(); }); + connect(m_updButton, &QPushButton::clicked, [&] { emit updFromTreePushed(); }); connect(m_intervalSlider, &QSlider::valueChanged, this, &RunFitControlWidget::onSliderValueChanged); diff --git a/GUI/View/JobControl/JobListModel.cpp b/GUI/View/JobControl/JobListModel.cpp index e2a27f28b83d407fedfd1c56d0a46649e9b101eb..cd23b0ab128e86a663f2503209728382d294c369 100644 --- a/GUI/View/JobControl/JobListModel.cpp +++ b/GUI/View/JobControl/JobListModel.cpp @@ -121,13 +121,13 @@ void JobListModel::onJobAdded() void JobListModel::enableJobNotification(JobItem* job) { // name - connect(job, &JobItem::jobNameChanged, this, [this, job] { emitJobListModelChanged(job); }); + connect(job, &JobItem::jobNameChanged, [this, job] { emitJobListModelChanged(job); }); // status - connect(job, &JobItem::jobStatusChanged, this, [this, job] { emitJobListModelChanged(job); }); + connect(job, &JobItem::jobStatusChanged, [this, job] { emitJobListModelChanged(job); }); // progress - connect(job, &JobItem::jobProgressChanged, this, [this, job] { emitJobListModelChanged(job); }); + connect(job, &JobItem::jobProgressChanged, [this, job] { emitJobListModelChanged(job); }); } void JobListModel::disableJobNotification(JobItem* job) diff --git a/GUI/View/JobControl/JobListing.cpp b/GUI/View/JobControl/JobListing.cpp index 700d217d28f99bd7c9162fb23213c71315e24446..ec4ff3790cf99242e60a112a35f7b947506ce0ec 100644 --- a/GUI/View/JobControl/JobListing.cpp +++ b/GUI/View/JobControl/JobListing.cpp @@ -219,7 +219,7 @@ void JobListing::showContextMenu(const QPoint&) for (const QModelIndex& index : indexes) { JobItem* job = m_model->jobItemForIndex(index); QAction* action = m_equalizeMenu->addAction(QString("to ").append(job->jobName())); - connect(action, &QAction::triggered, this, [this, job] { equalizeSelectedToJob(job); }); + connect(action, &QAction::triggered, [this, job] { equalizeSelectedToJob(job); }); } m_equalizeMenu->setEnabled(true); } else diff --git a/GUI/View/JobControl/JobPropertiesTableModel.cpp b/GUI/View/JobControl/JobPropertiesTableModel.cpp index 99bfce7a308788c2a49417b7906830133f566497..4c3814cd863b9344806e4a97b39deed2b6e5ad55 100644 --- a/GUI/View/JobControl/JobPropertiesTableModel.cpp +++ b/GUI/View/JobControl/JobPropertiesTableModel.cpp @@ -144,25 +144,25 @@ void JobPropertiesTableModel::setJobItem(JobItem* jobItem) void JobPropertiesTableModel::notifyJobPropertyChange() { // name - connect(m_item, &JobItem::jobNameChanged, this, [this](const QString&) { + connect(m_item, &JobItem::jobNameChanged, [this](const QString&) { emit dataChanged(index(Row::Name, Column::Value), index(Row::Name, Column::Value), {Qt::DisplayRole, Qt::EditRole}); }); // status - connect(m_item, &JobItem::jobStatusChanged, this, [this](const JobStatus) { + connect(m_item, &JobItem::jobStatusChanged, [this](const JobStatus) { emit dataChanged(index(Row::Status, Column::Value), index(Row::Status, Column::Value), {Qt::DisplayRole, Qt::EditRole}); }); // begin time - connect(m_item, &JobItem::jobBeginTimeChanged, this, [this](const QDateTime&) { + connect(m_item, &JobItem::jobBeginTimeChanged, [this](const QDateTime&) { emit dataChanged(index(Row::Begin, Column::Value), index(Row::Begin, Column::Value), {Qt::DisplayRole, Qt::EditRole}); }); // end time and duration - connect(m_item, &JobItem::jobEndTimeChanged, this, [this](const QDateTime&) { + connect(m_item, &JobItem::jobEndTimeChanged, [this](const QDateTime&) { emit dataChanged(index(Row::End, Column::Value), index(Row::Duration, Column::Value), {Qt::DisplayRole, Qt::EditRole}); }); diff --git a/GUI/View/JobControl/JobPropertiesWidget.cpp b/GUI/View/JobControl/JobPropertiesWidget.cpp index d329927bc93e3c5c01d6fbb8eb4d886ae0f916d1..007c4d1d6b20dc9b66d0372689f1d8299b34325c 100644 --- a/GUI/View/JobControl/JobPropertiesWidget.cpp +++ b/GUI/View/JobControl/JobPropertiesWidget.cpp @@ -103,7 +103,7 @@ void JobPropertiesWidget::setJobItem(JobItem* jobItem) void JobPropertiesWidget::notifyJobPropertyChange() { - connect(m_jobItem, &JobItem::jobCommentsChanged, this, [this](const QString&) { + connect(m_jobItem, &JobItem::jobCommentsChanged, [this](const QString&) { if (m_jobItem && m_jobItem->comments() != m_commentsEditor->toPlainText()) { m_commentsEditor->blockSignals(true); m_commentsEditor->setPlainText(m_jobItem->comments()); diff --git a/GUI/View/Main/ActionManager.cpp b/GUI/View/Main/ActionManager.cpp index d1e8cf3512073fd0e061e6bfe5734914706b0c52..770d0e24293bc3c9bf59acd82b781fe7bd8b05e7 100644 --- a/GUI/View/Main/ActionManager.cpp +++ b/GUI/View/Main/ActionManager.cpp @@ -245,7 +245,7 @@ void ActionManager::onAboutToShowSettingsMenu() radioButton->setStyleSheet(""); action->setDefaultWidget(radioButton); radioButton->setChecked(appSettings->currentStyle() == style); - connect(radioButton, &QRadioButton::toggled, this, [style] { + connect(radioButton, &QRadioButton::toggled, [style] { appSettings->setStyleToUse(style); appSettings->loadStyle(style); }); diff --git a/GUI/View/Plotter/ProjectionsPlot.cpp b/GUI/View/Plotter/ProjectionsPlot.cpp index 4ab70d7f31fd7bf4b61415fa9711436a51c77c22..7b64817ae779750508fd3468888b1c481c4a55c4 100644 --- a/GUI/View/Plotter/ProjectionsPlot.cpp +++ b/GUI/View/Plotter/ProjectionsPlot.cpp @@ -51,7 +51,7 @@ void ProjectionsPlot::setData2DItem(Data2DItem* item) // set nullptr at destruction if (m_data2DItem) { disconnect(m_data2DItem, &DataItem::destroyed, this, nullptr); - connect(m_data2DItem, &DataItem::destroyed, this, [this] { m_data2DItem = nullptr; }); + connect(m_data2DItem, &DataItem::destroyed, [this] { m_data2DItem = nullptr; }); } clearAll(); diff --git a/GUI/View/Plotter/SpecularPlot.cpp b/GUI/View/Plotter/SpecularPlot.cpp index 76f9dd60c74d3a6f6fadbd0f6e56770677f1806a..c902444a52464dfba454b8ecee72e53c44135b9a 100644 --- a/GUI/View/Plotter/SpecularPlot.cpp +++ b/GUI/View/Plotter/SpecularPlot.cpp @@ -56,7 +56,7 @@ void SpecularPlot::setData1DItems(const QList<Data1DItem*>& items) for (auto*& item : m_data_items) if (item) { disconnect(item, &DataItem::destroyed, this, nullptr); - connect(item, &DataItem::destroyed, this, [&item] { item = nullptr; }); + connect(item, &DataItem::destroyed, [&item] { item = nullptr; }); } initPlot();