summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/generator.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2013-04-16 15:03:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-17 12:29:55 +0200
commitc77f7229d5c7e5017ddf90b1e9445251761878bf (patch)
tree9813a8246a64795bab2f214443347863a5a2b963 /src/tools/qdoc/generator.cpp
parent3ae271523ff7fb951df16cfccfaf84c0aa298e16 (diff)
qdoc: Add index of obsolete members to obsolete page
qdoc has been modified to emit a compact list of the classes that have one or more obsolete members. The command is: \generatelist obsoletecppmembers This generates an index of all such classes, where each class name is a link to the class's subpage of obsolete members. A class's subpage of obsolete members is also accessible from the class's reference page, but now it is also accessible from this index. Also, The command shown has been added to the page obsoleteclasses.html in the generated output. This page already contains the index of obsolete classes. Currently, no such output is generated for QML types and QML types with obsolete members. But qdoc does accept commands for those: \generatelist obsoleteqmltypes and \generatelist obsoleteqmlmembers ...but qdoc doesn't know what to do with those commands yet. Task-number: QTBUG-30270 Change-Id: If19a3b977f64c948e4bd6f14a9e0a287419baa8a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/generator.cpp')
-rw-r--r--src/tools/qdoc/generator.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 47ebded1b1..dfa49e8563 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -68,6 +68,7 @@ QStringList Generator::imageDirs;
QStringList Generator::imageFiles;
QMap<QString, QStringList> Generator::imgFileExts;
QString Generator::outDir_;
+QString Generator::outSubdir_;
QSet<QString> Generator::outputFormats;
QHash<QString, QString> Generator::outputPrefixes;
QString Generator::project;
@@ -1474,10 +1475,13 @@ void Generator::initialize(const Config &config)
outputFormats = config.getOutputFormats();
if (!outputFormats.isEmpty()) {
outDir_ = config.getOutputDir();
-
- if (outDir_.isEmpty())
+ if (outDir_.isEmpty()) {
config.lastLocation().fatal(tr("No output directory specified in "
"configuration file or on the command line"));
+ }
+ else {
+ outSubdir_ = outDir_.mid(outDir_.lastIndexOf('/') + 1);
+ }
QDir dirInfo;
if (dirInfo.exists(outDir_)) {
@@ -1622,8 +1626,12 @@ void Generator::augmentImageDirs(QSet<QString>& moreImageDirs)
}
}
-void Generator::initializeGenerator(const Config & /* config */)
+/*!
+ Sets the generator's pointer to the Config instance.
+ */
+void Generator::initializeGenerator(const Config& config)
{
+ config_ = &config;
}
bool Generator::matchAhead(const Atom *atom, Atom::Type expectedAtomType)