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

@@ -60,8 +60,7 @@ bool ChangeElementInformationCommand::mergeWith(const QUndoCommand *other)
//In case of other undo_undo have the same elements as keys
if (m_map.size() == other_undo->m_map.size())
{
for (const auto& key : other_undo->m_map.keys())
{
for (auto key : other_undo->m_map.keys()) {
if (!m_map.keys().contains(key)) {
return false;
}
@@ -70,13 +69,12 @@ bool ChangeElementInformationCommand::mergeWith(const QUndoCommand *other)
//Other_undo will be merged with this undo :
//Replace the new_info values of this m_map
//by the new_info values of other_undo's m_map
for (const auto& key : other_undo->m_map.keys())
{
m_map.insert(
key,
qMakePair(
m_map.value(key).first,
other_undo->m_map.value(key).second));
for (auto key : other_undo->m_map.keys())
{
m_map.insert(key,
qMakePair(
m_map.value(key).first,
other_undo->m_map.value(key).second));
}
return true;
}
@@ -115,7 +113,8 @@ void ChangeElementInformationCommand::updateProjectDB()
//need to have a list of element instead of QPointer<Element>
//for the function elementInfoChange of the database
QList<Element *> list_;
for (const auto& p_elmt : m_map.keys()) list_ << p_elmt.data();
for (auto p_elmt : m_map.keys())
list_ << p_elmt.data();
elmt->diagram()->project()->dataBase()->elementInfoChanged(list_);
}