summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/config.cpp')
-rw-r--r--tools/qdoc3/config.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp
index 08a8187..267a09c 100644
--- a/tools/qdoc3/config.cpp
+++ b/tools/qdoc3/config.cpp
@@ -329,7 +329,10 @@ QList<QRegExp> Config::getRegExpList(const QString& var) const
}
/*!
- This function is slower than it could be.
+ This function is slower than it could be. What it does is
+ find all the keys that begin with \a var + dot and return
+ the matching keys in a set, stripped of the matching prefix
+ and dot.
*/
QSet<QString> Config::subVars(const QString& var) const
{
@@ -350,6 +353,27 @@ QSet<QString> Config::subVars(const QString& var) const
}
/*!
+ Same as subVars(), but in this case we return a string map
+ with the matching keys (stripped of the prefix \a var and
+ mapped to their values. The pairs are inserted into \a t
+ */
+void Config::subVarsAndValues(const QString& var, QStringMap& t) const
+{
+ QString varDot = var + QLatin1Char('.');
+ QMap<QString, QString>::ConstIterator v = stringValueMap.begin();
+ while (v != stringValueMap.end()) {
+ if (v.key().startsWith(varDot)) {
+ QString subVar = v.key().mid(varDot.length());
+ int dot = subVar.indexOf(QLatin1Char('.'));
+ if (dot != -1)
+ subVar.truncate(dot);
+ t.insert(subVar,v.value());
+ }
+ ++v;
+ }
+}
+
+/*!
Builds and returns a list of file pathnames for the file
type specified by \a filesVar (e.g. "headers" or "sources").
The files are found in the directories specified by