QDoc: Also allow dependant modules to be specified on CLI.
authorCasper van Donderen <casper.vandonderen@nokia.com>
Mon, 11 Jun 2012 10:54:42 +0000 (12:54 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 12 Jun 2012 02:29:34 +0000 (04:29 +0200)
Change-Id: I25dfbadc788616a864ecbf322434a3ce45bb94e5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
src/tools/qdoc/main.cpp

index 41d2f44..9dd5384 100644 (file)
@@ -98,6 +98,7 @@ static bool highlighting = false;
 static bool showInternal = false;
 static bool obsoleteLinks = false;
 static QStringList defines;
+static QStringList dependModules;
 static QStringList indexDirs;
 static QHash<QString, Tree *> trees;
 
@@ -110,6 +111,8 @@ static void printHelp()
                              "Options:\n"
                              "    -D<name>       "
                              "Define <name> as a macro while parsing sources\n"
+                             "    -depends       "
+                             "Specify dependant modules\n"
                              "    -help          "
                              "Display this information and exit\n"
                              "    -highlighting  "
@@ -250,7 +253,7 @@ static void processQdocconfFile(const QString &fileName)
      */
     QStringList indexFiles = config.getStringList(CONFIG_INDEXES);
 
-    QStringList dependModules = config.getStringList(CONFIG_DEPENDS);
+    dependModules += config.getStringList(CONFIG_DEPENDS);
 
     if (dependModules.size() > 0) {
         if (indexDirs.size() > 0) {
@@ -516,6 +519,10 @@ int main(int argc, char **argv)
             QString define = opt.mid(2);
             defines += define;
         }
+        else if (opt == "-depends") {
+            dependModules += argv[i];
+            i++;
+        }
         else if (opt == "-highlighting") {
             highlighting = true;
         }