summaryrefslogtreecommitdiffstats
path: root/src/qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc')
-rw-r--r--src/qdoc/config.cpp8
-rw-r--r--src/qdoc/doc/qdoc-manual-markupcmds.qdoc16
2 files changed, 14 insertions, 10 deletions
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp
index 55a23610b..934958910 100644
--- a/src/qdoc/config.cpp
+++ b/src/qdoc/config.cpp
@@ -724,8 +724,12 @@ QString Config::getIncludeFilePath(const QString &fileName) const
if (!includeFilesMap_.contains(ext)) {
QSet<QString> t;
QStringList result;
- const QStringList dirs = getCanonicalPathList(CONFIG_SOURCEDIRS);
- for (const auto &dir : dirs)
+ const auto sourceDirs = getCanonicalPathList(CONFIG_SOURCEDIRS);
+ for (const auto &dir : sourceDirs)
+ result += getFilesHere(dir, ext, location(), t, t);
+ // Append the include files from the exampledirs as well
+ const auto exampleDirs = getCanonicalPathList(CONFIG_EXAMPLEDIRS);
+ for (const auto &dir : exampleDirs)
result += getFilesHere(dir, ext, location(), t, t);
includeFilesMap_.insert(ext, result);
}
diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
index 51aa3c2cc..fb178c7cc 100644
--- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -3725,16 +3725,16 @@
The command is useful when some snippet of commands or text is to
be used in multiple places in the documentation. Use the \\include
command wherever you want to insert a snippet into the documentation.
- The file containing the snippet to include must be located under the
- path(s) listed in the \l{sourcedirs-variable}{sourcedirs} QDoc
- configuration variable. It can be either any source file parsed
- by QDoc (or even the same one where \\include command is used), or
- any other text file. To store snippets in a separate file that is
- not meant to be parsed by QDoc, use a file extension that is not
- listed in \l {sources.fileextensions-variable}{sources.fileextensions};
+ The file containing the snippet to include, must be located under the
+ path(s) listed in the \l{sourcedirs-variable}{sourcedirs} or
+ \l{exampledirs-variable}{exampledirs} QDoc configuration variable.
+ It can be either any source file parsed by QDoc (or even the same one
+ where \\include command is used), or any other text file. To store
+ snippets in a separate file that is not meant to be parsed by QDoc,
+ use a file extension that is not listed in
+ \l{sources.fileextensions-variable}{sources.fileextensions};
for example, \c .qdocinc.
-
The command can have either one or two arguments. The first
argument is always a file name. The contents of the file must be
QDoc input, in other words, a sequence of QDoc commands and text, but