diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-30 07:08:43 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-30 07:08:43 (GMT) |
commit | f5acc7b83f79c0bce554a6e4fe2d9e6ebb4b582b (patch) | |
tree | 865471e5d53175f66e5a8e13926285c289ca1437 /tools/qdoc3 | |
parent | 0eaa3466077839b0cef2ad6c326d80f398eccae7 (diff) | |
parent | c1a90a535206e0a146e13c60d981a855178e69ca (diff) | |
download | Qt-f5acc7b83f79c0bce554a6e4fe2d9e6ebb4b582b.zip Qt-f5acc7b83f79c0bce554a6e4fe2d9e6ebb4b582b.tar.gz Qt-f5acc7b83f79c0bce554a6e4fe2d9e6ebb4b582b.tar.bz2 |
Merge branch 'master' of git://git-nokia.trolltech.com.au/qtsoftware/qt/qt
Diffstat (limited to 'tools/qdoc3')
-rw-r--r-- | tools/qdoc3/config.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 11 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.h | 1 | ||||
-rw-r--r-- | tools/qdoc3/main.cpp | 10 |
4 files changed, 18 insertions, 5 deletions
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index 4e97d9f..22cb671 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -140,6 +140,7 @@ class Config #define CONFIG_INDEXES "indexes" #define CONFIG_LANGUAGE "language" #define CONFIG_MACRO "macro" +#define CONFIG_OBSOLETELINKS "obsoletelinks" #define CONFIG_OUTPUTDIR "outputdir" #define CONFIG_OUTPUTLANGUAGE "outputlanguage" #define CONFIG_OUTPUTFORMATS "outputformats" diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index b1f8167..6590114 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -186,7 +186,7 @@ HtmlGenerator::HtmlGenerator() : helpProjectWriter(0), inLink(false), inContents(false), inSectionHeading(false), inTableHeader(false), numTableRows(0), threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"), - tre(0), slow(false) + tre(0), slow(false), obsoleteLinks(false) { } @@ -215,6 +215,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) }; Generator::initializeGenerator(config); + obsoleteLinks = config.getBool(QLatin1String(CONFIG_OBSOLETELINKS)); setImageFileExtensions(QStringList() << "png" << "jpg" << "jpeg" << "gif"); int i = 0; while (defaults[i].key) { @@ -3686,9 +3687,11 @@ QString HtmlGenerator::getLink(const Atom *atom, } QString name = marker->plainFullName(relative); if (!porting && !name.startsWith("Q3")) { - relative->doc().location().warning(tr("Link to obsolete item '%1' in %2") - .arg(atom->string()) - .arg(name)); + if (obsoleteLinks) { + relative->doc().location().warning(tr("Link to obsolete item '%1' in %2") + .arg(atom->string()) + .arg(name)); + } inObsoleteLink = true; } #if 0 diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 180c307..c22fe20 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -271,6 +271,7 @@ class HtmlGenerator : public PageGenerator QStringList customHeadElements; const Tree *tre; bool slow; + bool obsoleteLinks; QMap<QString, QMap<QString, const Node *> > moduleClassMap; QMap<QString, QMap<QString, const Node *> > moduleNamespaceMap; QMap<QString, const Node *> nonCompatClasses; diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 6425765..9338203 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -96,6 +96,7 @@ static const struct { static bool slow = false; static bool showInternal = false; +static bool obsoleteLinks = false; static QStringList defines; static QHash<QString, Tree *> trees; @@ -130,7 +131,9 @@ static void printHelp() " -slow " "Turn on features that slow down qdoc\n" " -showinternal " - "Include stuff marked internal") ); + "Include stuff marked internal\n" + " -obsoletelinks " + "Report links from obsolete items to non-obsolete items") ); } /*! @@ -165,6 +168,8 @@ static void processQdocconfFile(const QString &fileName) config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false")); config.setStringList(CONFIG_SHOWINTERNAL, QStringList(showInternal ? "true" : "false")); + config.setStringList(CONFIG_OBSOLETELINKS, + QStringList(obsoleteLinks ? "true" : "false")); /* With the default configuration values in place, load @@ -434,6 +439,9 @@ int main(int argc, char **argv) else if (opt == "-showinternal") { showInternal = true; } + else if (opt == "-obsoletelinks") { + obsoleteLinks = true; + } else { qdocFiles.append(opt); } |