summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/doc.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2012-06-11 11:29:31 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-12 04:29:31 +0200
commit14b07221664f95aea7603d6b7625c4467641b57c (patch)
treec77323108d2efc9e45f57e6a39a647248b54f906 /src/tools/qdoc/doc.cpp
parent9e1a9878aaeac75f5c9e73a0d0e1a4e489e13cbc (diff)
qdoc: Better error messages for QML command errors
Some error messages were not clear for these qdoc commands: \qmlclass, \qmlmodule, \inqmlmodule, and \qmlproperty. They have been made clearer now. Also, qdoc now parses input files in the same order all the time now. The order is alphabetic now. This might not be the optimal order. Change-Id: Id53a5ec8105009c71f4bbd41973a54aed7821099 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/tools/qdoc/doc.cpp')
-rw-r--r--src/tools/qdoc/doc.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index 15d194e0af..268c20d690 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -1626,6 +1626,9 @@ void DocParser::parse(const QString& source,
priv->text.stripFirstAtom();
}
+/*!
+ Returns the current location.
+ */
Location &DocParser::location()
{
while (!openedInputs.isEmpty() && openedInputs.top() <= pos) {
@@ -2868,6 +2871,23 @@ const Location &Doc::location() const
return priv == 0 ? dummy : priv->start_loc;
}
+/*!
+ Returns the starting location of a qdoc comment.
+ */
+const Location& Doc::startLocation() const
+{
+ return location();
+}
+
+/*!
+ Returns the ending location of a qdoc comment.
+ */
+const Location& Doc::endLocation() const
+{
+ static const Location dummy;
+ return priv == 0 ? dummy : priv->end_loc;
+}
+
const QString &Doc::source() const
{
static QString null;