summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/config.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-09-28 11:23:52 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-29 02:31:35 +0200
commit42b88337121151a99b60d8a785e896437cdcd971 (patch)
tree8baf23273263f86542a9c0b0ad8255652b812b94 /src/tools/qdoc/config.cpp
parent8e90e0805f2981014d3382d8841617b4c56dfc50 (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/config.cpp')
-rw-r--r--src/tools/qdoc/config.cpp17
1 files changed, 16 insertions, 1 deletions
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<QString> &excludedDirs,
const QSet<QString> &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<QString> &excludedDirs,
return result;
}
+QStringList Config::getExampleImageFiles(const QSet<QString> &excludedDirs,
+ const QSet<QString> &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.