summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qmlvisitor.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2012-05-08 13:13:14 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-09 02:28:44 +0200
commit025d544caa93afd2bc9af5f0bf8cebd2d988cc24 (patch)
tree72b64e4a1cb7b920a81a2031932534091afdc47d /src/tools/qdoc/qmlvisitor.cpp
parent3db8f5fbb381f009b111cd91af30bfa9bf159a5d (diff)
qdoc: Fixed qdoc error messages
qdoc prints many error messages without including the source file path and the line number for where the error occurs. This makes it difficult to find the place to fix the error. This update corrects some of those error messages. Further updates will fix the others. Change-Id: I9c0eed96482c61643a2d83c5135368413e63ae52 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/tools/qdoc/qmlvisitor.cpp')
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 1544227fc3..abbea236e4 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -254,7 +254,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
QSet<QString> metacommands = doc.metaCommandsUsed();
if (metacommands.count() > 0) {
QString topic;
- QStringList args;
+ ArgList args;
QSet<QString>::iterator i = metacommands.begin();
while (i != metacommands.end()) {
if (topics.contains(*i)) {
@@ -273,7 +273,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
QmlPropertyNode* qpn = static_cast<QmlPropertyNode*>(node);
qpn->setReadOnly(0);
if (qpn->dataType() == "alias") {
- QStringList part = args[0].split(QLatin1Char(' '));
+ QStringList part = args[0].first.split(QLatin1Char(' '));
qpn->setDataType(part[0]);
}
}
@@ -319,12 +319,12 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
QmlClassNode::insertQmlModuleMember(qmid, qcn);
}
else if (command == COMMAND_QMLINHERITS) {
- if (node->name() == args[0])
- doc.location().warning(tr("%1 tries to inherit itself").arg(args[0]));
+ if (node->name() == args[0].first)
+ doc.location().warning(tr("%1 tries to inherit itself").arg(args[0].first));
else {
- CodeParser::setLink(node, Node::InheritsLink, args[0]);
+ CodeParser::setLink(node, Node::InheritsLink, args[0].first);
if (node->subType() == Node::QmlClass) {
- QmlClassNode::addInheritedBy(args[0],node);
+ QmlClassNode::addInheritedBy(args[0].first,node);
}
}
}
@@ -341,10 +341,10 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
}
}
else if ((command == COMMAND_INGROUP) && !args.isEmpty()) {
- QStringList::ConstIterator arg = args.begin();
- while (arg != args.end()) {
- tree->addToGroup(node, *arg);
- ++arg;
+ ArgList::ConstIterator argsIter = args.begin();
+ while (argsIter != args.end()) {
+ tree->addToGroup(node, argsIter->first);
+ ++argsIter;
}
}
else if (command == COMMAND_INTERNAL) {
@@ -362,7 +362,7 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
node->setStatus(Node::Preliminary);
}
else if (command == COMMAND_SINCE) {
- QString arg = args.join(" ");
+ QString arg = args[0].first; //.join(" ");
node->setSince(arg);
}
else {