From 09624c5a9bb97743a0ab77658a6ff151305c062a Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sun, 6 Mar 2022 11:52:48 +0100 Subject: [PATCH] Make the qtwaylandscanner fork build against Qt6 --- src/wayland/tools/qtwaylandscanner.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wayland/tools/qtwaylandscanner.cpp b/src/wayland/tools/qtwaylandscanner.cpp index 287822fc98..253d2fe303 100644 --- a/src/wayland/tools/qtwaylandscanner.cpp +++ b/src/wayland/tools/qtwaylandscanner.cpp @@ -223,7 +223,7 @@ Scanner::WaylandEvent Scanner::readEvent(QXmlStreamReader &xml, bool request) .arguments = {}, }; while (xml.readNextStartElement()) { - if (xml.name() == "arg") { + if (xml.name() == QLatin1String("arg")) { WaylandArgument argument = { .name = byteArrayValue(xml, "name"), .type = byteArrayValue(xml, "type"), @@ -247,7 +247,7 @@ Scanner::WaylandEnum Scanner::readEnum(QXmlStreamReader &xml) }; while (xml.readNextStartElement()) { - if (xml.name() == "entry") { + if (xml.name() == QLatin1String("entry")) { WaylandEnumEntry entry = { .name = byteArrayValue(xml, "name"), .value = byteArrayValue(xml, "value"), @@ -273,11 +273,11 @@ Scanner::WaylandInterface Scanner::readInterface(QXmlStreamReader &xml) }; while (xml.readNextStartElement()) { - if (xml.name() == "event") + if (xml.name() == QLatin1String("event")) interface.events.push_back(readEvent(xml, false)); - else if (xml.name() == "request") + else if (xml.name() == QLatin1String("request")) interface.requests.push_back(readEvent(xml, true)); - else if (xml.name() == "enum") + else if (xml.name() == QLatin1String("enum")) interface.enums.push_back(readEnum(xml)); else xml.skipCurrentElement(); @@ -438,7 +438,7 @@ bool Scanner::process() if (!m_xml->readNextStartElement()) return false; - if (m_xml->name() != "protocol") { + if (m_xml->name() != QLatin1String("protocol")) { m_xml->raiseError(QStringLiteral("The file is not a wayland protocol file.")); return false; } @@ -458,7 +458,7 @@ bool Scanner::process() std::vector interfaces; while (m_xml->readNextStartElement()) { - if (m_xml->name() == "interface") + if (m_xml->name() == QLatin1String("interface")) interfaces.push_back(readInterface(*m_xml)); else m_xml->skipCurrentElement();