Commit 09f084b5 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Fix "mad info" parsing for Qemu, part 2 of 2.

We now evaluate the "purpose" attribute of the "variable" tag and
the "option" attribute of the "value" tag.
parent d57584b6
......@@ -359,14 +359,20 @@ QPair<QString, QString> MaemoQemuRuntimeParserV2::handleVariableTag()
return var;
}
// TODO: Check for "purpose" attribute and handle "glbackend" in a special way
const bool isGlBackend = m_madInfoReader.attributes().value(QLatin1String("purpose"))
== QLatin1String("glbackend");
while (m_madInfoReader.readNextStartElement()) {
if (m_madInfoReader.name() == QLatin1String("name"))
const QXmlStreamAttributes &attrs = m_madInfoReader.attributes();
if (m_madInfoReader.name() == QLatin1String("name")) {
var.first = m_madInfoReader.readElementText();
else if (m_madInfoReader.name() == QLatin1String("value"))
} else if (m_madInfoReader.name() == QLatin1String("value")
&& attrs.value(QLatin1String("set")) != QLatin1String("false")
&& (!isGlBackend || attrs.value(QLatin1String("option"))
== QLatin1String("software-rendering"))) {
var.second = m_madInfoReader.readElementText();
else
} else {
m_madInfoReader.skipCurrentElement();
}
}
return var;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment