summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/main.cpp
diff options
context:
space:
mode:
authorMartin Smith <[email protected]>2012-06-11 11:29:31 +0200
committerQt by Nokia <[email protected]>2012-06-12 04:29:31 +0200
commit14b07221664f95aea7603d6b7625c4467641b57c (patch)
treec77323108d2efc9e45f57e6a39a647248b54f906 /src/tools/qdoc/main.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 <[email protected]>
Diffstat (limited to 'src/tools/qdoc/main.cpp')
-rw-r--r--src/tools/qdoc/main.cpp50
1 files changed, 39 insertions, 11 deletions
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp
index 9e1e3cddd03..41d2f44a68a 100644
--- a/src/tools/qdoc/main.cpp
+++ b/src/tools/qdoc/main.cpp
@@ -319,8 +319,6 @@ static void processQdocconfFile(const QString &fileName)
QSet<QString> excludedDirs;
QSet<QString> excludedFiles;
- QSet<QString> headers;
- QSet<QString> sources;
QStringList headerList;
QStringList sourceList;
QStringList excludedDirsList;
@@ -339,23 +337,48 @@ static void processQdocconfFile(const QString &fileName)
}
headerList = config.getAllFiles(CONFIG_HEADERS,CONFIG_HEADERDIRS,excludedDirs,excludedFiles);
- headers = QSet<QString>::fromList(headerList);
+ QMap<QString,QString> headers;
+ for (int i=0; i<headerList.size(); ++i)
+ headers.insert(headerList[i],headerList[i]);
sourceList = config.getAllFiles(CONFIG_SOURCES,CONFIG_SOURCEDIRS,excludedDirs,excludedFiles);
- sources = QSet<QString>::fromList(sourceList);
-
+ QMap<QString,QString> sources;
+ for (int i=0; i<sourceList.size(); ++i)
+ sources.insert(sourceList[i],sourceList[i]);
+ QFile* files = new QFile("/Users/msmith/depot/qt5/qtdoc/files.out");
+ files->open(QFile::WriteOnly);
+ QTextStream* filesout = new QTextStream(files);
+#if 0
+ {
+ QSet<QString>::ConstIterator i = headers.begin();
+ while (i != headers.end()) {
+ //(*filesout) << (*i).mid((*i).lastIndexOf('/')+1) << "\n";
+ ++i;
+ }
+ i = sources.begin();
+ while (i != sources.end()) {
+ //(*filesout) << (*i).mid((*i).lastIndexOf('/')+1) << "\n";
+ ++i;
+ }
+ }
+ //filesout->flush();
+ //files->close();
+#endif
/*
Parse each header file in the set using the appropriate parser and add it
to the big tree.
*/
QSet<CodeParser *> usedParsers;
- QSet<QString>::ConstIterator h = headers.constBegin();
+ int parsed = 0;
+ QMap<QString,QString>::ConstIterator h = headers.constBegin();
while (h != headers.constEnd()) {
- CodeParser *codeParser = CodeParser::parserForHeaderFile(*h);
+ CodeParser *codeParser = CodeParser::parserForHeaderFile(h.key());
if (codeParser) {
- codeParser->parseHeaderFile(config.location(), *h, tree);
+ ++parsed;
+ codeParser->parseHeaderFile(config.location(), h.key(), tree);
usedParsers.insert(codeParser);
+ (*filesout) << (h.key()).mid((h.key()).lastIndexOf('/')+1) << "\n";
}
++h;
}
@@ -368,15 +391,20 @@ static void processQdocconfFile(const QString &fileName)
Parse each source text file in the set using the appropriate parser and
add it to the big tree.
*/
- QSet<QString>::ConstIterator s = sources.constBegin();
+ parsed = 0;
+ QMap<QString,QString>::ConstIterator s = sources.constBegin();
while (s != sources.constEnd()) {
- CodeParser *codeParser = CodeParser::parserForSourceFile(*s);
+ CodeParser *codeParser = CodeParser::parserForSourceFile(s.key());
if (codeParser) {
- codeParser->parseSourceFile(config.location(), *s, tree);
+ ++parsed;
+ codeParser->parseSourceFile(config.location(), s.key(), tree);
usedParsers.insert(codeParser);
+ (*filesout) << s.key().mid((s.key()).lastIndexOf('/')+1) << "\n";
}
++s;
}
+ filesout->flush();
+ files->close();
foreach (CodeParser *codeParser, usedParsers)
codeParser->doneParsingSourceFiles(tree);