diff --git a/sources/undocommand/deleteqgraphicsitemcommand.cpp b/sources/undocommand/deleteqgraphicsitemcommand.cpp index 5aa85ca42..632c64a9a 100644 --- a/sources/undocommand/deleteqgraphicsitemcommand.cpp +++ b/sources/undocommand/deleteqgraphicsitemcommand.cpp @@ -179,7 +179,7 @@ void DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements() //If a conductor was already created between these two terminals //in this undo command, from another removed element, we do nothing bool exist_ = false; - for (QPair pair : m_connected_terminals) + for (std::pair pair : m_connected_terminals) { if (pair.first == hub_terminal && pair.second == t) { exist_ = true; @@ -192,14 +192,8 @@ void DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements() if (exist_ == false) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove - m_connected_terminals.append(qMakePair(hub_terminal, t)); -#else -#if TODO_LIST -#pragma message("@TODO remove code for QT 6 or later") -#endif - qDebug()<<"Help code for QT 6 or later"; -#endif + m_connected_terminals.append(std::make_pair((Terminal *)hub_terminal, (Terminal *)t)); + qInfo() << "m_connected_terminals" << m_connected_terminals; Conductor *new_cond = new Conductor(hub_terminal, t); new_cond->setProperties(properties); new AddGraphicsObjectCommand(new_cond, t->diagram(), QPointF(), this); diff --git a/sources/undocommand/deleteqgraphicsitemcommand.h b/sources/undocommand/deleteqgraphicsitemcommand.h index 2f03ed050..c4ad2946b 100644 --- a/sources/undocommand/deleteqgraphicsitemcommand.h +++ b/sources/undocommand/deleteqgraphicsitemcommand.h @@ -52,7 +52,7 @@ class DeleteQGraphicsItemCommand : public QUndoCommand QHash > m_link_hash; /// keep linked element for each removed element linked to other element. QHash m_elmt_text_hash; /// Keep the parent element of each deleted dynamic element text item QHash m_grp_texts_hash; ///Keep the parent group of each deleted element text item - QList > m_connected_terminals; + QList > m_connected_terminals; QHash > m_table_scene_hash; bool m_remove_linked_table = false; };