summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/main.cpp')
-rw-r--r--tools/qdoc3/main.cpp76
1 files changed, 21 insertions, 55 deletions
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 3244932..1525efb 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -95,11 +95,11 @@ static const struct {
};
static bool slow = false;
+static bool showInternal = false;
+static bool obsoleteLinks = false;
static QStringList defines;
static QHash<QString, Tree *> trees;
-//static int doxygen = 0;
-
/*!
Find the Tree for language \a lang and return a pointer to it.
If there is no Tree for language \a lang in the Tree table, add
@@ -122,14 +122,18 @@ static void printHelp()
{
Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n"
"Options:\n"
- " -help "
+ " -help "
"Display this information and exit\n"
- " -version "
+ " -version "
"Display version of qdoc and exit\n"
- " -D<name> "
+ " -D<name> "
"Define <name> as a macro while parsing sources\n"
- " -slow "
- "Turn on features that slow down qdoc") );
+ " -slow "
+ "Turn on features that slow down qdoc\n"
+ " -showinternal "
+ "Include stuff marked internal\n"
+ " -obsoletelinks "
+ "Report links from obsolete items to non-obsolete items") );
}
/*!
@@ -162,6 +166,10 @@ static void processQdocconfFile(const QString &fileName)
++i;
}
config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false"));
+ config.setStringList(CONFIG_SHOWINTERNAL,
+ QStringList(showInternal ? "true" : "false"));
+ config.setStringList(CONFIG_OBSOLETELINKS,
+ QStringList(obsoleteLinks ? "true" : "false"));
/*
With the default configuration values in place, load
@@ -224,18 +232,6 @@ static void processQdocconfFile(const QString &fileName)
QString lang = config.getString(CONFIG_LANGUAGE);
Location langLocation = config.lastLocation();
-#ifdef QDOC2DOX
- // qdoc -> doxygen
- if (doxygen == 2) {
- qDebug() << "READING anchors.txt";
- DoxWriter::readAnchors();
- qDebug() << "READING title maps";
- DoxWriter::readTitles();
- qDebug() << "READING member multimaps";
- DoxWriter::readMembers();
- }
-#endif
-
/*
Initialize the tree where all the parsed sources will be stored.
The tree gets built as the source files are parsed, and then the
@@ -322,17 +318,6 @@ static void processQdocconfFile(const QString &fileName)
tree->resolveGroups();
tree->resolveTargets();
-#ifdef QDOC2DOX
- // qdoc -> doxygen
- if (doxygen == 1) {
- DoxWriter::writeAnchors();
- DoxWriter::writeTitles();
- DoxWriter::writeMembers();
- }
-
- if (doxygen == 0) {
-#endif
-
/*
Now the tree has been built, and all the stuff that needed
resolving has been resolved. Now it is time to traverse
@@ -351,17 +336,13 @@ static void processQdocconfFile(const QString &fileName)
/*
Generate the XML tag file, if it was requested.
*/
+
QString tagFile = config.getString(CONFIG_TAGFILE);
if (!tagFile.isEmpty())
tree->generateTagFile(tagFile);
-
+
tree->setVersion("");
Generator::terminate();
-
-#ifdef QDOC2DOX
- }
-#endif
-
CodeParser::terminate();
CodeMarker::terminate();
CppToQsConverter::terminate();
@@ -372,7 +353,6 @@ static void processQdocconfFile(const QString &fileName)
foreach (QTranslator *translator, translators)
delete translator;
-
delete tree;
}
@@ -456,26 +436,12 @@ int main(int argc, char **argv)
else if (opt == "-slow") {
slow = true;
}
-
-#ifdef QDOC2DOX
- else if (opt == "-doxygen1") {
- // qdoc -> doxygen
- // Don't use this; it isn't ready yet.
- // Now it's a fossil.
- qDebug() << "doxygen pass 1";
- doxygen = 1;
- DoxWriter::setDoxPass(1);
+ else if (opt == "-showinternal") {
+ showInternal = true;
}
- else if (opt == "-doxygen2") {
- // qdoc -> doxygen
- // Don't use this; it isn't ready yet.
- // Now it's a fossil.
- qDebug() << "doxygen pass 2";
- doxygen = 2;
- DoxWriter::setDoxPass(2);
+ else if (opt == "-obsoletelinks") {
+ obsoleteLinks = true;
}
-#endif
-
else {
qdocFiles.append(opt);
}