mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Revert "Try Clazy fix-its"
Segfault on old Qt versions!
This reverts commit dba7caed30.
This commit is contained in:
@@ -160,8 +160,7 @@ void projectDataBase::removeElement(Element *element)
|
||||
void projectDataBase::elementInfoChanged(Element *element)
|
||||
{
|
||||
auto hash = elementInfoToString(element);
|
||||
for (const auto& str : QETInformation::elementInfoKeys())
|
||||
{
|
||||
for (auto str : QETInformation::elementInfoKeys()) {
|
||||
m_update_element_query.bindValue(":" + str, hash.value(str));
|
||||
}
|
||||
m_update_element_query.bindValue(":uuid", element->uuid().toString());
|
||||
@@ -541,8 +540,7 @@ void projectDataBase::prepareQuery()
|
||||
|
||||
//UPDATE DIAGRAM INFO
|
||||
QString update_diagram_str("UPDATE diagram_info SET ");
|
||||
for (const auto& str : QETInformation::diagramInfoKeys())
|
||||
{
|
||||
for (auto str : QETInformation::diagramInfoKeys()) {
|
||||
update_diagram_str.append(str + " = :" + str + ", ");
|
||||
}
|
||||
update_diagram_str.remove(update_diagram_str.length()-2, 2); //Remove the last ", "
|
||||
@@ -582,8 +580,7 @@ void projectDataBase::prepareQuery()
|
||||
|
||||
//UPDATE ELEMENT INFO
|
||||
QString update_str("UPDATE element_info SET ");
|
||||
for (const auto& string : QETInformation::elementInfoKeys())
|
||||
{
|
||||
for (auto string : QETInformation::elementInfoKeys()) {
|
||||
update_str.append(string + " = :" + string + ", ");
|
||||
}
|
||||
update_str.remove(update_str.length()-2, 2); //Remove the last ", "
|
||||
@@ -600,7 +597,7 @@ void projectDataBase::prepareQuery()
|
||||
QHash<QString, QString> projectDataBase::elementInfoToString(Element *elmt)
|
||||
{
|
||||
QHash<QString, QString> hash; //Store the value for each columns
|
||||
for (const auto& key : QETInformation::elementInfoKeys())
|
||||
for (auto key : QETInformation::elementInfoKeys())
|
||||
{
|
||||
if (key == "label") {
|
||||
hash.insert(key, elmt->actualLabel());
|
||||
|
||||
Reference in New Issue
Block a user