summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@theqtcompany.com>2015-12-16 14:52:09 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2016-08-08 09:14:13 +0000
commitefa8c3361bea905afef1a051900275bf33ccb9ef (patch)
treee52251c6450dd129aa4550b9a53e40723cbfced1 /src
parent111198a522d295623fcb067d1b976956d7c80158 (diff)
qdoc: Comment what's left of main() to clarify what it's doing
Change-Id: Iaffd91fc1d6a31bc2ade50f1fad6f1d544b07f73 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/qdoc/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index 0057db502..2419ec792 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -753,12 +753,14 @@ int main(int argc, char **argv)
{
QT_USE_NAMESPACE
+ // Initialize Qt:
#ifndef QT_BOOTSTRAPPED
qt_qhash_seed.testAndSetRelaxed(-1, 0); // set the hash seed to 0 if it wasn't set yet
#endif
QCoreApplication app(argc, argv);
app.setApplicationVersion(QLatin1String(QT_VERSION_STR));
+ // Instantiate various singletons (used via static methods):
/*
Create code parsers for the languages to be parsed,
and create a tree for C++.
@@ -782,6 +784,7 @@ int main(int argc, char **argv)
QDocCommandLineParser parser;
parser.process(app);
+ // Get the list of files to act on:
QStringList qdocFiles = parser.positionalArguments();
if (qdocFiles.isEmpty())
parser.showHelp();
@@ -789,9 +792,7 @@ int main(int argc, char **argv)
if (singleExec)
qdocFiles = Config::loadMaster(qdocFiles.at(0));
- /*
- Main loop is now modified to handle single exec mode.
- */
+ // Main loop (adapted, when needed, to handle single exec mode):
if (Generator::singleExec())
Generator::setQDocPass(Generator::Prepare);
foreach (const QString &qf, qdocFiles) {
@@ -808,6 +809,7 @@ int main(int argc, char **argv)
}
}
+ // Tidy everything away:
#ifndef QT_NO_TRANSLATION
if (!translators.isEmpty()) {
for (int i=0; i<translators.size(); ++i) {