From 14b07221664f95aea7603d6b7625c4467641b57c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 11 Jun 2012 11:29:31 +0200 Subject: 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 --- src/tools/qdoc/codeparser.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/tools/qdoc/codeparser.cpp') diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp index bfa00646315..1f82171d828 100644 --- a/src/tools/qdoc/codeparser.cpp +++ b/src/tools/qdoc/codeparser.cpp @@ -418,4 +418,28 @@ void CodeParser::createOutputSubdirectory(const Location& location, } } +/*! + Returns true if the file being parsed is a .h file. + */ +bool CodeParser::isParsingH() const +{ + return currentFile_.endsWith(".h"); +} + +/*! + Returns true if the file being parsed is a .cpp file. + */ +bool CodeParser::isParsingCpp() const +{ + return currentFile_.endsWith(".cpp"); +} + +/*! + Returns true if the file being parsed is a .qdoc file. + */ +bool CodeParser::isParsingQdoc() const +{ + return currentFile_.endsWith(".qdoc"); +} + QT_END_NAMESPACE -- cgit v1.2.3