mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-20 19:19:58 +01:00
Fixed deprecated qAsConst() to std::as_const()
This commit is contained in:
@@ -1069,7 +1069,7 @@ void QETElementEditor::updateAction()
|
||||
<< ui->m_revert_selection_action
|
||||
<< ui->m_paste_from_file_action
|
||||
<< ui->m_paste_from_element_action;
|
||||
for (auto action : qAsConst(ro_list)) {
|
||||
for (auto action : std::as_const(ro_list)) {
|
||||
action->setDisabled(m_read_only);
|
||||
}
|
||||
|
||||
@@ -1084,7 +1084,7 @@ void QETElementEditor::updateAction()
|
||||
<< ui->m_flip_action
|
||||
<< ui->m_mirror_action;
|
||||
auto items_selected = !m_read_only && m_elmt_scene->selectedItems().count();
|
||||
for (auto action : qAsConst(select_list)) {
|
||||
for (auto action : std::as_const(select_list)) {
|
||||
action->setEnabled(items_selected);
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ void TerminalEditor::activeConnections(bool active)
|
||||
m_editor_connections << connect(ui->m_type_cb, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &TerminalEditor::typeEdited);
|
||||
} else {
|
||||
for (auto const & con : qAsConst(m_editor_connections)) {
|
||||
for (auto const & con : std::as_const(m_editor_connections)) {
|
||||
QObject::disconnect(con);
|
||||
}
|
||||
m_editor_connections.clear();
|
||||
|
||||
@@ -84,7 +84,7 @@ void TextEditor::setUpChangeConnection(QPointer<PartText> part)
|
||||
|
||||
void TextEditor::disconnectChangeConnection()
|
||||
{
|
||||
for (const auto &connection : qAsConst(m_change_connection)) {
|
||||
for (const auto &connection : std::as_const(m_change_connection)) {
|
||||
disconnect(connection);
|
||||
}
|
||||
m_change_connection.clear();
|
||||
|
||||
Reference in New Issue
Block a user