diff options
| author | Martin Smith <martin.smith@nokia.com> | 2012-06-28 10:46:59 +0200 |
|---|---|---|
| committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-28 12:35:14 +0200 |
| commit | ba892305960b37846ee49a90c5684aa8dbfd3d72 (patch) | |
| tree | 1e4d6da961448ef7d9d155421c3d5dc4a3a7aa6c /src/tools/qdoc/main.cpp | |
| parent | a85759f07799ca57ffb436f103b863073cee315c (diff) | |
qdoc: Report multiple topic commands as an error
Some documenters are using two topic commands in a single qdoc
comment. This is only allowed for \qmlproperty so that multiple QML
properties can be documented with a single comment. qdoc now reports
an error for all other combinations of multiple topic commands.
Task Nr: QTBUG-26345
Change-Id: I1f9a6d2502ccffa76c2d41f961be3750014a0a56
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/tools/qdoc/main.cpp')
| -rw-r--r-- | src/tools/qdoc/main.cpp | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 4099a6e7299..7686bd3f648 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -348,32 +348,43 @@ static void processQdocconfFile(const QString &fileName) headerList = config.getAllFiles(CONFIG_HEADERS,CONFIG_HEADERDIRS,excludedDirs,excludedFiles); QMap<QString,QString> headers; - for (int i=0; i<headerList.size(); ++i) + QMultiMap<QString,QString> headerFileNames; + for (int i=0; i<headerList.size(); ++i) { headers.insert(headerList[i],headerList[i]); + QString t = headerList[i].mid(headerList[i].lastIndexOf('/')+1); + headerFileNames.insert(t,t); + } sourceList = config.getAllFiles(CONFIG_SOURCES,CONFIG_SOURCEDIRS,excludedDirs,excludedFiles); QMap<QString,QString> sources; - for (int i=0; i<sourceList.size(); ++i) + QMultiMap<QString,QString> sourceFileNames; + 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"); + QString t = sourceList[i].mid(sourceList[i].lastIndexOf('/')+1); + sourceFileNames.insert(t,t); + } + +#if 0 + QFile* files = new QFile("/Users/msmith/depot/qt5/qtdoc/inputlist.txt"); 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"; + QMultiMap<QString,QString>::ConstIterator i = headerFileNames.begin(); + while (i != headerFileNames.end()) { + (*filesout) << i.key() << "\n"; ++i; } - i = sources.begin(); - while (i != sources.end()) { - //(*filesout) << (*i).mid((*i).lastIndexOf('/')+1) << "\n"; + i = sourceFileNames.begin(); + while (i != sourceFileNames.end()) { + (*filesout) << i.key() << "\n"; ++i; } } - //filesout->flush(); - //files->close(); + filesout->flush(); + files->close(); #endif + /* Parse each header file in the set using the appropriate parser and add it to the big tree. @@ -388,7 +399,6 @@ static void processQdocconfFile(const QString &fileName) ++parsed; codeParser->parseHeaderFile(config.location(), h.key(), tree); usedParsers.insert(codeParser); - (*filesout) << (h.key()).mid((h.key()).lastIndexOf('/')+1) << "\n"; } ++h; } @@ -409,12 +419,9 @@ static void processQdocconfFile(const QString &fileName) ++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); @@ -452,6 +459,8 @@ static void processQdocconfFile(const QString &fileName) tree->generateTagFile(tagFile); } + //Generator::writeOutFileNames(); + tree->setVersion(QString()); Generator::terminate(); CodeParser::terminate(); |
