summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/cppcodemarker.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-21 17:38:04 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-21 17:38:04 (GMT)
commitea41ba11fc848dbefecb0cde324478ab1986e555 (patch)
treea2a4dd1786ad4e3f0ffbfcb20ad3f964815e3049 /tools/qdoc3/cppcodemarker.cpp
parent9862f29b3c8d3f23113388b48b1c4b86523137dc (diff)
downloadQt-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.cpp9
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 &lt;<@headerfile>" + *inc + "</@headerfile>&gt;\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 +&lt;([^<>&]+)&gt;");
static QRegExp yHasTypeX("(?:^|\n *)([a-zA-Z_][a-zA-Z_0-9]*)"