From 623891acd600861338e2bdb4b4084c6b6451eb0a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 6 Nov 2014 12:54:40 +0100 Subject: [PATCH] qdoc: no longer autolinks symbols that begin with "__" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- src/tools/qdoc/doc.cpp | 10 ++++++---- 1 file 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); - } } } }