diff options
author | David Boddie <david.boddie@nokia.com> | 2010-12-21 17:38:04 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-12-21 17:38:04 (GMT) |
commit | ea41ba11fc848dbefecb0cde324478ab1986e555 (patch) | |
tree | a2a4dd1786ad4e3f0ffbfcb20ad3f964815e3049 /tools/qdoc3/cppcodemarker.cpp | |
parent | 9862f29b3c8d3f23113388b48b1c4b86523137dc (diff) | |
download | Qt-ea41ba11fc848dbefecb0cde324478ab1986e555.zip Qt-ea41ba11fc848dbefecb0cde324478ab1986e555.tar.gz Qt-ea41ba11fc848dbefecb0cde324478ab1986e555.tar.bz2 |
Enabled error reporting and a plain text fallback for invalid QML.
The location of places where code is included in documentation is
now passed into each code marker when highlighted code is needed.
Diffstat (limited to 'tools/qdoc3/cppcodemarker.cpp')
-rw-r--r-- | tools/qdoc3/cppcodemarker.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 55a455f..8ea1c7f 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -157,9 +157,9 @@ QString CppCodeMarker::plainFullName(const Node *node, const Node *relative) QString CppCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(protect(code), relative, dirPath); + return addMarkUp(protect(code), relative, location); } QString CppCodeMarker::markedUpSynopsis(const Node *node, @@ -440,7 +440,8 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes) code += "#include <<@headerfile>" + *inc + "</@headerfile>>\n"; ++inc; } - return addMarkUp(code, 0, ""); + Location location; + return addMarkUp(code, 0, location); } QString CppCodeMarker::functionBeginRegExp(const QString& funcName) @@ -868,7 +869,7 @@ const Node *CppCodeMarker::resolveTarget(const QString& target, QString CppCodeMarker::addMarkUp(const QString& protectedCode, const Node * /* relative */, - const QString& /* dirPath */) + const Location & /* location */) { static QRegExp globalInclude("#include +<([^<>&]+)>"); static QRegExp yHasTypeX("(?:^|\n *)([a-zA-Z_][a-zA-Z_0-9]*)" |