Revert "Try Clazy fix-its"

Segfault on old Qt versions!
This reverts commit dba7caed30.
This commit is contained in:
Laurent Trinques
2025-02-14 16:17:58 +01:00
parent dba7caed30
commit 43f0107eb1
88 changed files with 409 additions and 512 deletions

View File

@@ -158,7 +158,7 @@ bool ElementInfoWidget::event(QEvent *event)
*/
void ElementInfoWidget::enableLiveEdit()
{
for (ElementInfoPartWidget* eipw : std::as_const(m_eipw_list))
for (ElementInfoPartWidget *eipw : m_eipw_list)
connect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
}
@@ -168,7 +168,7 @@ void ElementInfoWidget::enableLiveEdit()
*/
void ElementInfoWidget::disableLiveEdit()
{
for (ElementInfoPartWidget* eipw : std::as_const(m_eipw_list))
for (ElementInfoPartWidget *eipw : m_eipw_list)
disconnect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
}
@@ -185,14 +185,11 @@ void ElementInfoWidget::buildInterface()
keys = QETInformation::elementInfoKeys();
}
for (const auto& str : std::as_const(keys))
{
ElementInfoPartWidget* eipw = new ElementInfoPartWidget(
str,
QETInformation::translatedInfoKey(str),
this);
ui->scroll_vlayout->addWidget(eipw);
m_eipw_list << eipw;
for (auto str : keys)
{
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETInformation::translatedInfoKey(str), this);
ui->scroll_vlayout->addWidget(eipw);
m_eipw_list << eipw;
}
ui->scroll_vlayout->addStretch();
@@ -230,9 +227,8 @@ void ElementInfoWidget::updateUi()
if (m_live_edit) disableLiveEdit();
const auto element_info{m_element->elementInformations()};
for (ElementInfoPartWidget* eipw : std::as_const(m_eipw_list))
{
for (ElementInfoPartWidget *eipw : m_eipw_list) {
eipw -> setText (element_info[eipw->key()].toString());
}