Fix FTBFS for ubuntu Bionic Beaver

This commit is contained in:
joshua
2021-11-01 12:41:43 +01:00
parent 2252feca16
commit 58a3e72abe
2 changed files with 11 additions and 3 deletions

View File

@@ -161,7 +161,12 @@ class RealTerminal
auto is_draw = xml_element.attribute(QStringLiteral("is_draw")) == QLatin1String("true") auto is_draw = xml_element.attribute(QStringLiteral("is_draw")) == QLatin1String("true")
? true : false; ? true : false;
auto uuid_ = QUuid::fromString(xml_element.attribute(QStringLiteral("uuid")));
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
auto uuid_ = QUuid::fromString(xml_element.attribute(QLatin1String("uuid")));
#else
auto uuid_ = QUuid(xml_element.attribute(QStringLiteral("uuid")));
#endif
if (is_draw) { if (is_draw) {
for (auto terminal : terminal_vector) { for (auto terminal : terminal_vector) {

View File

@@ -60,8 +60,11 @@ bool TerminalStripData::fromXml(const QDomElement &xml_element)
"due to wrong tag name. Expected " << this->xmlTagName() << " used " << xml_element.tagName(); "due to wrong tag name. Expected " << this->xmlTagName() << " used " << xml_element.tagName();
return false; return false;
} }
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
m_uuid = QUuid::fromString(xml_element.attribute("uuid")); m_uuid = QUuid::fromString(xml_element.attribute(QLatin1String("uuid")));
#else
m_uuid = QUuid(xml_element.attribute(QStringLiteral("uuid")));
#endif
for (auto &xml_info : for (auto &xml_info :
QETXML::findInDomElement(xml_element.firstChildElement("informations"), QETXML::findInDomElement(xml_element.firstChildElement("informations"),