summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/codemarker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qdoc/codemarker.cpp')
-rw-r--r--src/tools/qdoc/codemarker.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp
index 2253aca183..458799fc27 100644
--- a/src/tools/qdoc/codemarker.cpp
+++ b/src/tools/qdoc/codemarker.cpp
@@ -194,6 +194,22 @@ QString CodeMarker::protect(const QString& str)
return marked;
}
+void CodeMarker::appendProtectedString(QString *output, const QStringRef &str)
+{
+ int n = str.length();
+ output->reserve(output->size() + n * 2 + 30);
+ const QChar *data = str.constData();
+ for (int i = 0; i != n; ++i) {
+ switch (data[i].unicode()) {
+ case '&': *output += samp; break;
+ case '<': *output += slt; break;
+ case '>': *output += sgt; break;
+ case '"': *output += squot; break;
+ default : *output += data[i];
+ }
+ }
+}
+
QString CodeMarker::typified(const QString &string)
{
QString result;
@@ -361,8 +377,7 @@ QString CodeMarker::sortName(const Node *node, const QString* name)
else
sortNo = QLatin1String("E");
}
- return sortNo + nodeName + QLatin1Char(' ')
- + QString::number(func->overloadNumber(), 36);
+ return sortNo + nodeName + QLatin1Char(' ') + QString::number(func->overloadNumber(), 36);
}
if (node->type() == Node::Class)
@@ -390,7 +405,7 @@ void CodeMarker::insert(FastSection &fastSection,
bool irrelevant = false;
bool inheritedMember = false;
if (!node->relates()) {
- InnerNode* p = node->parent();
+ Aggregate* p = node->parent();
if (p->isQmlPropertyGroup())
p = p->parent();
if (p != fastSection.parent_) {
@@ -440,7 +455,7 @@ void CodeMarker::insert(FastSection &fastSection,
if (node->parent()->isClass() || node->parent()->isNamespace()) {
if (fastSection.inherited.isEmpty()
|| fastSection.inherited.last().first != node->parent()) {
- QPair<InnerNode *, int> p(node->parent(), 0);
+ QPair<Aggregate *, int> p(node->parent(), 0);
fastSection.inherited.append(p);
}
fastSection.inherited.last().second++;