summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-04-13 07:31:21 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-04-13 07:31:21 (GMT)
commit16fe5d5b87ed1d819bf0791fabbd121481d62d22 (patch)
tree5005d6b363923a6a0af05f482c73baeccd9eff85 /tools
parent932b28483f82f3fbc3a007ecdc5fbb152b504024 (diff)
downloadQt-16fe5d5b87ed1d819bf0791fabbd121481d62d22.zip
Qt-16fe5d5b87ed1d819bf0791fabbd121481d62d22.tar.gz
Qt-16fe5d5b87ed1d819bf0791fabbd121481d62d22.tar.bz2
qdoc: Last commit before merge into master.
Added a function to class Config to unload the qdocconf file. This is for the qdoc wizard.
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/config.cpp27
-rw-r--r--tools/qdoc3/config.h1
2 files changed, 27 insertions, 1 deletions
diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp
index 838f6ac..eaec327 100644
--- a/tools/qdoc3/config.cpp
+++ b/tools/qdoc3/config.cpp
@@ -48,7 +48,7 @@
#include <QFile>
#include <QTemporaryFile>
#include <QTextStream>
-
+#include <qdebug.h>
#include "config.h"
#include <stdlib.h>
@@ -175,6 +175,7 @@ Config::Config(const QString& programName)
}
/*!
+ The destructor has nothing special to do.
*/
Config::~Config()
{
@@ -202,6 +203,30 @@ void Config::load(const QString& fileName)
}
/*!
+ Writes the qdoc configuration data to the named file.
+ The previous contents of the file are overwritten.
+ */
+void Config::unload(const QString& fileName)
+{
+
+ QStringMultiMap::ConstIterator v = stringValueMap.begin();
+ while (v != stringValueMap.end()) {
+ qDebug() << v.key() << " = " << v.value();
+#if 0
+ 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());
+ }
+#endif
+ ++v;
+ }
+ qDebug() << "fileName:" << fileName;
+}
+
+/*!
Joins all the strings in \a values into a single string with the
individual \a values separated by ' '. Then it inserts the result
into the string list map with \a var as the key.
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index 8e19ed2..94f0060 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -63,6 +63,7 @@ class Config
~Config();
void load(const QString& fileName);
+ void unload(const QString& fileName);
void setStringList(const QString& var, const QStringList& values);
const QString& programName() const { return prog; }