summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2014-11-06 12:54:40 +0100
committerMartin Smith <martin.smith@digia.com>2014-11-12 08:11:15 +0100
commit623891acd600861338e2bdb4b4084c6b6451eb0a (patch)
treea593481f947facc0b424928f065f36d731ecd337 /src/tools
parent1936e4973f6309ece1b83a886c6c6d9211e2155e (diff)
qdoc: no longer autolinks symbols that begin with "__"
qdoc no longer tries to autolink symbols that begin with two underscores. There may be other cases where qdoc should not try to autolink. They should be handled in this same place. Change-Id: I5a39ea2bb0edec2289b8a4b1a9af1f33534093a1 Task-number: QTBUG-42441 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/doc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index ce77caec9c..c4a2c8029b 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -1611,12 +1611,14 @@ void DocParser::parse(const QString& source,
QString word = in.mid(startPos, pos - startPos);
// is word a C++ symbol or an English word?
if ((numInternalUppercase >= 1 && numLowercase >= 2)
- || numStrangeSymbols >= 1) {
- append(Atom::AutoLink, word);
+ || numStrangeSymbols > 0) {
+ if (word.startsWith(QString("__")))
+ appendWord(word);
+ else
+ append(Atom::AutoLink, word);
}
- else {
+ else
appendWord(word);
- }
}
}
}