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

@@ -51,9 +51,7 @@ DynamicTextFieldEditor::~DynamicTextFieldEditor()
{
delete ui;
if(!m_connection_list.isEmpty()) {
for (const QMetaObject::Connection& con :
std::as_const(m_connection_list))
{
for(const QMetaObject::Connection& con : m_connection_list) {
disconnect(con);
}
}
@@ -205,8 +203,7 @@ void DynamicTextFieldEditor::disconnectConnections()
{
//Remove previous connection
if(!m_connection_list.isEmpty())
for (const auto& connection : std::as_const(m_connection_list))
{
for(const auto &connection : m_connection_list) {
disconnect(connection);
}
m_connection_list.clear();

View File

@@ -171,8 +171,7 @@ void EllipseEditor::setUpChangeConnections()
*/
void EllipseEditor::disconnectChangeConnections()
{
for (const QMetaObject::Connection& c : std::as_const(m_change_connections))
{
for (QMetaObject::Connection c : m_change_connections) {
disconnect(c);
}
m_change_connections.clear();

View File

@@ -223,8 +223,7 @@ void LineEditor::setUpChangeConnections()
*/
void LineEditor::disconnectChangeConnections()
{
for (const auto& connection : std::as_const(m_change_connections))
{
for (auto connection : m_change_connections) {
disconnect(connection);
}

View File

@@ -76,8 +76,7 @@ void PolygonEditor::setUpChangeConnections()
void PolygonEditor::disconnectChangeConnections()
{
for (const QMetaObject::Connection& c : std::as_const(m_change_connections))
{
for (QMetaObject::Connection c : m_change_connections) {
disconnect(c);
}
m_change_connections.clear();

View File

@@ -545,7 +545,7 @@ void QETElementEditor::updateInformations()
QString selection_xml_name = part -> xmlName();
bool same_xml_name = true;
bool style_editable = true;
for (QGraphicsItem* qgi : std::as_const(selected_qgis))
for (QGraphicsItem *qgi: selected_qgis)
{
if (CustomElementPart *cep = dynamic_cast<CustomElementPart *>(qgi)) {
cep_list << cep;
@@ -582,11 +582,9 @@ void QETElementEditor::updateInformations()
bool equal = true;
QList<CustomElementPart*> parts = editor -> currentParts();
if (parts.length() == cep_list.length()) {
for (auto cep : std::as_const(cep_list))
{
for (auto cep: cep_list) {
bool part_found = false;
for (auto part : std::as_const(parts))
{
for (auto part: parts) {
if (part == cep) {
part_found = true;
break;
@@ -791,12 +789,12 @@ bool QETElementEditor::checkElement()
dialog_message += "<ol>";
QList<QETWarning> total = warnings << errors;
for (const QETWarning& warning : total)
for(QETWarning warning : total)
{
dialog_message += "<li>";
dialog_message +=
QString(tr("<b>%1</b> : %2", "warning title: warning description"))
.arg(warning.first, warning.second);
dialog_message += QString(
tr("<b>%1</b> : %2", "warning title: warning description")
).arg(warning.first).arg(warning.second);
dialog_message += "</li>";
}
dialog_message += "</ol>";

View File

@@ -59,8 +59,7 @@ void RectangleEditor::setUpChangeConnections()
void RectangleEditor::disconnectChangeConnections()
{
for (const QMetaObject::Connection& c : std::as_const(m_change_connections))
{
for (QMetaObject::Connection c : m_change_connections) {
disconnect(c);
}
m_change_connections.clear();

View File

@@ -92,9 +92,8 @@ void TextEditor::disconnectChangeConnection()
void TextEditor::disconnectEditConnection()
{
for (const QMetaObject::Connection& c : std::as_const(m_edit_connection))
{
disconnect(c);
for (QMetaObject::Connection c : m_edit_connection) {
disconnect(c);
}
m_edit_connection.clear();
}