diff options
author | Martin Smith <martin.smith@digia.com> | 2012-09-28 11:23:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-29 02:31:35 +0200 |
commit | 42b88337121151a99b60d8a785e896437cdcd971 (patch) | |
tree | 8baf23273263f86542a9c0b0ad8255652b812b94 /src/tools/qdoc/main.cpp | |
parent | 8e90e0805f2981014d3382d8841617b4c56dfc50 (diff) |
qdoc: Augment imagedirs list
Modularization of examples has resulted in putting
all documentation and code for an example in each
example subdirectory. In particular, each example
subdirectory now contains a doc/images subdirectoy,
where images are stored that are linked to from the
example .qdoc files, which are in the doc/src
subdirectory of the example directory.
Because there are so many example subdirectories,
it would be difficult to list all the doc/images
directories in the imagedirs variable of the
qdocconf file. Therefore, qdoc now searches all
the directories listed in the exampledirs variable
to find all the doc/images subdirectories there,
and it adds these to the imagedirs variable for
use in finding images called out in \image and
\inlineimage commands.
Task Nr: QTBUG-27248
Change-Id: I070ba1a558ab32e1db06429a71c083b55f9dd0ea
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/main.cpp')
-rw-r--r-- | src/tools/qdoc/main.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index e9ab11d4d6..ea42b3f4f3 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -165,10 +165,8 @@ static void processQdocconfFile(const QString &fileName) ++i; } config.setStringList(CONFIG_SYNTAXHIGHLIGHTING, QStringList(highlighting ? "true" : "false")); - config.setStringList(CONFIG_SHOWINTERNAL, - QStringList(showInternal ? "true" : "false")); - config.setStringList(CONFIG_OBSOLETELINKS, - QStringList(obsoleteLinks ? "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 @@ -372,6 +370,18 @@ static void processQdocconfFile(const QString &fileName) } } + QSet<QString> exampleImageDirs; + QStringList exampleImageList = config.getExampleImageFiles(excludedDirs, excludedFiles); + for (int i=0; i<exampleImageList.size(); ++i) { + if (exampleImageList[i].contains("doc/images")) { + QString t = exampleImageList[i].left(exampleImageList[i].lastIndexOf("doc/images")+10); + if (!exampleImageDirs.contains(t)) { + exampleImageDirs.insert(t); + } + } + } + Generator::augmentImageDirs(exampleImageDirs); + /* Parse each header file in the set using the appropriate parser and add it to the big tree. |