summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-08-03 16:45:39 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-08-03 16:45:39 (GMT)
commitd8d2e9571684ff02036c951f1755acf8d487e607 (patch)
tree2e6d41cdeced36727ce0dc43bf4e007debbef252 /tools/qdoc3
parentfc85af460c53ff0e02e749f9d15cd2f22b6c49b3 (diff)
parentd3f600eb98b681fd2fe5d968bef59dd10464cb32 (diff)
downloadQt-d8d2e9571684ff02036c951f1755acf8d487e607.zip
Qt-d8d2e9571684ff02036c951f1755acf8d487e607.tar.gz
Qt-d8d2e9571684ff02036c951f1755acf8d487e607.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/config.h1
-rw-r--r--tools/qdoc3/main.cpp48
2 files changed, 48 insertions, 1 deletions
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index b087b1c..7665f1a 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -119,6 +119,7 @@ class Config
};
#define CONFIG_ALIAS "alias"
+#define CONFIG_APPLICATION "application"
#define CONFIG_BASE "base" // ### don't document for now
#define CONFIG_CODEINDENT "codeindent"
#define CONFIG_DEFINES "defines"
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index ba3e387..47a4b67 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -105,6 +105,8 @@ static bool showInternal = false;
static bool obsoleteLinks = false;
static QStringList defines;
static QHash<QString, Tree *> trees;
+static QString application = "base"; //application
+static bool applicationArg = 0; //if 1, then the argument is provided and it will override the qdocconf file
/*!
Find the Tree for language \a lang and return a pointer to it.
@@ -192,6 +194,38 @@ static void processQdocconfFile(const QString &fileName)
config.load(fileName);
/*
+ Set the application to which qdoc will create the output.
+ The three applications are:
+ base: simple, basic html output. Best suited for offline viewing
+ creator: additional formatting.
+ online: full-featured online version with search and links to Qt topics
+
+ Note: This will override the offline, online, creator defines.
+ */
+ if(applicationArg == false){
+
+ QString appConfig = config.getString(CONFIG_APPLICATION);
+ if (!appConfig.isEmpty()){
+ application = appConfig;
+ }
+ }
+ if(application == "online"){
+ config.setStringList(CONFIG_ONLINE, QStringList("true"));
+ config.setStringList(CONFIG_OFFLINE, QStringList("false"));
+ config.setStringList(CONFIG_CREATOR, QStringList("false"));
+ }
+ else if(application == "creator"){
+ config.setStringList(CONFIG_ONLINE, QStringList("false"));
+ config.setStringList(CONFIG_OFFLINE, QStringList("true"));
+ config.setStringList(CONFIG_CREATOR, QStringList("false"));
+ }
+ else if(application == "base"){
+ config.setStringList(CONFIG_ONLINE, QStringList("false"));
+ config.setStringList(CONFIG_OFFLINE, QStringList("false"));
+ config.setStringList(CONFIG_CREATOR, QStringList("true"));
+ }
+
+ /*
Add the defines to the configuration variables.
*/
QStringList defs = defines + config.getStringList(CONFIG_DEFINES);
@@ -462,12 +496,24 @@ int main(int argc, char **argv)
else if (opt == "-obsoletelinks") {
obsoleteLinks = true;
}
+ else if (opt == "-base") {
+ application = "base";
+ applicationArg = true;
+ }
+ else if (opt == "-creator") {
+ application = "creator";
+ applicationArg = true;
+ }
+ else if (opt == "-online") {
+ application = "online";
+ applicationArg = true;
+ }
else {
qdocFiles.append(opt);
}
}
- if (qdocFiles.isEmpty()) {
+ if (qdocFiles.isEmpty()) {
printHelp();
return EXIT_FAILURE;
}