qdoc: Allow colon characters in manifest meta attribute values
The current implementation does not allow colons in attribute values, as it's already used as a separator in the form of 'name:value'. This change allows colons in the value string - one use case is to have URL attributes, as in 'imageUrl:qthelp://path.to.image'. Change-Id: I05c5cb32ffc79a39fbe5e4102f7a4b5bdcc2be53 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
parent
55b933e6fb
commit
78fe2b145e
@ -4182,11 +4182,12 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
|
|||||||
if (match) {
|
if (match) {
|
||||||
tags += manifestMetaContent[idx].tags;
|
tags += manifestMetaContent[idx].tags;
|
||||||
foreach (const QString &attr, manifestMetaContent[idx].attributes) {
|
foreach (const QString &attr, manifestMetaContent[idx].attributes) {
|
||||||
QStringList attrList = attr.split(QLatin1Char(':'), QString::SkipEmptyParts);
|
QLatin1Char div(':');
|
||||||
|
QStringList attrList = attr.split(div);
|
||||||
if (attrList.count() == 1)
|
if (attrList.count() == 1)
|
||||||
attrList.append(QStringLiteral("true"));
|
attrList.append(QStringLiteral("true"));
|
||||||
if (attrList.count() == 2)
|
QString attrName = attrList.takeFirst();
|
||||||
writer.writeAttribute(attrList[0], attrList[1]);
|
writer.writeAttribute(attrName, attrList.join(div));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user