mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Work around a compiler ambiguity introduced by a new function overload added in Qt 5.8.
This commit is contained in:
parent
0e04bd991b
commit
dafa4841a9
@ -250,7 +250,7 @@ void UpdatesParser::readUpdates()
|
|||||||
Q_ASSERT(xml.isStartElement() && xml.name() == "Updates");
|
Q_ASSERT(xml.isStartElement() && xml.name() == "Updates");
|
||||||
|
|
||||||
while (xml.readNextStartElement()) {
|
while (xml.readNextStartElement()) {
|
||||||
if (xml.name().compare("PackageUpdate",Qt::CaseInsensitive)==0) {
|
if (xml.name().compare(QLatin1String("PackageUpdate"),Qt::CaseInsensitive)==0) {
|
||||||
readPackageUpdate();
|
readPackageUpdate();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Skipping Updates.xml tag" << xml.name();
|
qDebug() << "Skipping Updates.xml tag" << xml.name();
|
||||||
@ -262,52 +262,52 @@ void UpdatesParser::readUpdates()
|
|||||||
|
|
||||||
void UpdatesParser::readPackageUpdate()
|
void UpdatesParser::readPackageUpdate()
|
||||||
{
|
{
|
||||||
Q_ASSERT(xml.isStartElement() && (xml.name().compare("PackageUpdate",Qt::CaseInsensitive)==0));
|
Q_ASSERT(xml.isStartElement() && (xml.name().compare(QLatin1String("PackageUpdate"),Qt::CaseInsensitive)==0));
|
||||||
package = PackageUpdate();
|
package = PackageUpdate();
|
||||||
|
|
||||||
while (xml.readNextStartElement()) {
|
while (xml.readNextStartElement()) {
|
||||||
if (xml.name().compare("Name",Qt::CaseInsensitive)==0) {
|
if (xml.name().compare(QLatin1String("Name"),Qt::CaseInsensitive)==0) {
|
||||||
package.name = xml.readElementText().toLower();
|
package.name = xml.readElementText().toLower();
|
||||||
} else if (xml.name().compare("DisplayName",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("DisplayName"),Qt::CaseInsensitive)==0) {
|
||||||
package.displayName = xml.readElementText();
|
package.displayName = xml.readElementText();
|
||||||
} else if (xml.name().compare("Description",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("Description"),Qt::CaseInsensitive)==0) {
|
||||||
package.description = xml.readElementText();
|
package.description = xml.readElementText();
|
||||||
} else if (xml.name().compare("Version",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("Version"),Qt::CaseInsensitive)==0) {
|
||||||
package.versionString = xml.readElementText();
|
package.versionString = xml.readElementText();
|
||||||
} else if (xml.name().compare("ReleaseDate",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("ReleaseDate"),Qt::CaseInsensitive)==0) {
|
||||||
package.releaseDate = QDate().fromString(xml.readElementText(), "yyyy-MM-dd");
|
package.releaseDate = QDate().fromString(xml.readElementText(), "yyyy-MM-dd");
|
||||||
} else if (xml.name().compare("Default",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("Default"),Qt::CaseInsensitive)==0) {
|
||||||
package.defaultInstall = xml.readElementText().compare("true") == 0;
|
package.defaultInstall = xml.readElementText().compare("true") == 0;
|
||||||
} else if (xml.name().compare("ForcedInstallation",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("ForcedInstallation"),Qt::CaseInsensitive)==0) {
|
||||||
package.forcedInstall = xml.readElementText().compare("true") == 0;
|
package.forcedInstall = xml.readElementText().compare("true") == 0;
|
||||||
} else if (xml.name().compare("Script",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("Script"),Qt::CaseInsensitive)==0) {
|
||||||
package.script = xml.readElementText();
|
package.script = xml.readElementText();
|
||||||
} else if (xml.name().compare("Dependencies",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("Dependencies"),Qt::CaseInsensitive)==0) {
|
||||||
package.dependencies = xml.readElementText().split(",");
|
package.dependencies = xml.readElementText().split(",");
|
||||||
} else if (xml.name().compare("UpdateFile",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("UpdateFile"),Qt::CaseInsensitive)==0) {
|
||||||
for (int i=0; i<xml.attributes().size(); ++i) {
|
for (int i=0; i<xml.attributes().size(); ++i) {
|
||||||
const QXmlStreamAttribute & at = xml.attributes().at(i);
|
const QXmlStreamAttribute & at = xml.attributes().at(i);
|
||||||
if (at.name().compare("CompressedSize", Qt::CaseInsensitive)==0) {
|
if (at.name().compare(QLatin1String("CompressedSize"), Qt::CaseInsensitive)==0) {
|
||||||
package.compressedSize = at.value().toLong();
|
package.compressedSize = at.value().toLong();
|
||||||
} else if (at.name().compare("UncompressedSize",Qt::CaseInsensitive)==0) {
|
} else if (at.name().compare(QLatin1String("UncompressedSize"),Qt::CaseInsensitive)==0) {
|
||||||
package.uncompressedSize = at.value().toLong();
|
package.uncompressedSize = at.value().toLong();
|
||||||
} else if (at.name().compare("OS",Qt::CaseInsensitive)==0) {
|
} else if (at.name().compare(QLatin1String("OS"),Qt::CaseInsensitive)==0) {
|
||||||
package.os = at.value().toString();
|
package.os = at.value().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xml.skipCurrentElement();
|
xml.skipCurrentElement();
|
||||||
} else if (xml.name().compare("DownloadableArchives")==0) {
|
} else if (xml.name().compare(QLatin1String("DownloadableArchives"))==0) {
|
||||||
package.downloadArchives = xml.readElementText().split(",");
|
package.downloadArchives = xml.readElementText().split(",");
|
||||||
} else if (xml.name().compare("Licenses",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("Licenses"),Qt::CaseInsensitive)==0) {
|
||||||
while (xml.readNextStartElement()) {
|
while (xml.readNextStartElement()) {
|
||||||
if (xml.name().compare("License",Qt::CaseInsensitive)==0) {
|
if (xml.name().compare(QLatin1String("License"),Qt::CaseInsensitive)==0) {
|
||||||
QString name;
|
QString name;
|
||||||
QString file;
|
QString file;
|
||||||
for (int i=0; i<xml.attributes().size(); ++i) {
|
for (int i=0; i<xml.attributes().size(); ++i) {
|
||||||
const QXmlStreamAttribute & at = xml.attributes().at(i);
|
const QXmlStreamAttribute & at = xml.attributes().at(i);
|
||||||
if (at.name().compare("name", Qt::CaseInsensitive)==0) {
|
if (at.name().compare(QLatin1String("name"), Qt::CaseInsensitive)==0) {
|
||||||
name = at.value().toString();
|
name = at.value().toString();
|
||||||
} else if (at.name().compare("file",Qt::CaseInsensitive)==0) {
|
} else if (at.name().compare(QLatin1String("file"),Qt::CaseInsensitive)==0) {
|
||||||
file = at.value().toString();
|
file = at.value().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -319,7 +319,7 @@ void UpdatesParser::readPackageUpdate()
|
|||||||
xml.skipCurrentElement();
|
xml.skipCurrentElement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (xml.name().compare("SHA1",Qt::CaseInsensitive)==0) {
|
} else if (xml.name().compare(QLatin1String("SHA1"),Qt::CaseInsensitive)==0) {
|
||||||
package.sha1 = xml.readElementText();
|
package.sha1 = xml.readElementText();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "UP Skipping Updates.xml tag" << xml.name();
|
qDebug() << "UP Skipping Updates.xml tag" << xml.name();
|
||||||
|
Loading…
Reference in New Issue
Block a user