From 42b88337121151a99b60d8a785e896437cdcd971 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 28 Sep 2012 11:23:52 +0200 Subject: 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 --- src/tools/qdoc/config.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/tools/qdoc/config.cpp') diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp index e86fb33930..1ecfb6ddaf 100644 --- a/src/tools/qdoc/config.cpp +++ b/src/tools/qdoc/config.cpp @@ -507,7 +507,7 @@ QStringList Config::getExampleQdocFiles(const QSet &excludedDirs, const QSet &excludedFiles) { QStringList result; - QStringList dirs = getStringList("exampledirs"); + QStringList dirs = getCanonicalRelativePathList("exampledirs"); QString nameFilter = " *.qdoc"; QStringList::ConstIterator d = dirs.constBegin(); @@ -518,6 +518,21 @@ QStringList Config::getExampleQdocFiles(const QSet &excludedDirs, return result; } +QStringList Config::getExampleImageFiles(const QSet &excludedDirs, + const QSet &excludedFiles) +{ + QStringList result; + QStringList dirs = getCanonicalRelativePathList("exampledirs"); + QString nameFilter = getString(CONFIG_EXAMPLES + dot + QLatin1String(CONFIG_IMAGEEXTENSIONS)); + + QStringList::ConstIterator d = dirs.constBegin(); + while (d != dirs.constEnd()) { + result += getFilesHere(*d, nameFilter, location(), excludedDirs, excludedFiles); + ++d; + } + return result; +} + /*! \a fileName is the path of the file to find. -- cgit v1.2.3