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