mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Revert "Try Clazy fix-its"
Segfault on old Qt versions!
This reverts commit dba7caed30.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user