Remove the real terminal uuid, and use instead the uuid of the terminal element itself

This commit is contained in:
joshua
2022-02-09 18:13:35 +01:00
parent c037d3ea0a
commit ffd904749e
4 changed files with 2 additions and 13 deletions

View File

@@ -263,15 +263,6 @@ QUuid RealTerminal::elementUuid() const {
}
}
/**
* @brief uuid
* @return the uuid of this real terminal
*/
QUuid RealTerminal::uuid() const {
return elementUuid();
return m_uuid;
}
/**
* @brief RealTerminal::RealTerminal::xmlTagName
* @return

View File

@@ -77,13 +77,11 @@ class RealTerminal
Element* element() const;
QUuid elementUuid() const;
QUuid uuid() const;
static QString xmlTagName();
private :
QPointer<Element> m_element;
QUuid m_uuid = QUuid::createUuid();
QWeakPointer<RealTerminal> m_this_weak;
QSharedPointer<PhysicalTerminal> m_physical_terminal;
};

View File

@@ -250,7 +250,7 @@ QSharedPointer<RealTerminal> TerminalStrip::realTerminal(Element *terminal) cons
QSharedPointer<RealTerminal> TerminalStrip::realTerminalForUuid(const QUuid &uuid) const
{
for (const auto &t : qAsConst(m_real_terminals)) {
if (t->uuid() == uuid) {
if (t->elementUuid() == uuid) {
return t;
}
}

View File

@@ -90,7 +90,7 @@ QDomElement TerminalStripBridge::toXml(QDomDocument &parent_document) const
if (real_t)
{
auto terminal_elmt = parent_document.createElement(QStringLiteral("real_terminal"));
terminal_elmt.setAttribute(QStringLiteral("uuid"), real_t->uuid().toString());
terminal_elmt.setAttribute(QStringLiteral("uuid"), real_t->elementUuid().toString());
terminals_elmt.appendChild(terminal_elmt);
}
}