1
1
/****************************************************************************
3
3
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
** All rights reserved.
4
5
** Contact: Nokia Corporation (qt-info@nokia.com)
6
7
** This file is part of the tools applications of the Qt Toolkit.
8
9
** $QT_BEGIN_LICENSE:LGPL$
10
** Licensees holding valid Qt Commercial licenses may use this file in
11
** accordance with the Qt Commercial License Agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and Nokia.
10
** No Commercial Usage
11
** This file contains pre-release code and may not be distributed.
12
** You may use this file in accordance with the terms and conditions
13
** contained in the Technology Preview License Agreement accompanying
15
16
** GNU Lesser General Public License Usage
16
17
** Alternatively, this file may be used under the terms of the GNU Lesser
20
21
** ensure the GNU Lesser General Public License version 2.1 requirements
21
22
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23
** In addition, as a special exception, Nokia gives you certain
24
** additional rights. These rights are described in the Nokia Qt LGPL
25
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
28
** GNU General Public License Usage
29
** Alternatively, this file may be used under the terms of the GNU
30
** General Public License version 3.0 as published by the Free Software
31
** Foundation and appearing in the file LICENSE.GPL included in the
32
** packaging of this file. Please review the following information to
33
** ensure the GNU General Public License version 3.0 requirements will be
34
** met: http://www.gnu.org/copyleft/gpl.html.
36
** If you are unsure which license is appropriate for your use, please
37
** contact the sales department at http://www.qtsoftware.com/contact.
24
** In addition, as a special exception, Nokia gives you certain additional
25
** rights. These rights are described in the Nokia Qt LGPL Exception
26
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28
** If you have questions regarding the use of this file, please contact
29
** Nokia at qt-info@nokia.com.
38
38
** $QT_END_LICENSE$
40
40
****************************************************************************/
97
97
static bool slow = false;
98
static bool showInternal = false;
99
static bool obsoleteLinks = false;
98
100
static QStringList defines;
99
101
static QHash<QString, Tree *> trees;
101
//static int doxygen = 0;
104
104
Find the Tree for language \a lang and return a pointer to it.
105
105
If there is no Tree for language \a lang in the Tree table, add
123
123
Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n"
126
126
"Display this information and exit\n"
128
128
"Display version of qdoc and exit\n"
130
130
"Define <name> as a macro while parsing sources\n"
132
"Turn on features that slow down qdoc") );
132
"Turn on features that slow down qdoc\n"
134
"Include stuff marked internal\n"
136
"Report links from obsolete items to non-obsolete items") );
164
168
config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false"));
169
config.setStringList(CONFIG_SHOWINTERNAL,
170
QStringList(showInternal ? "true" : "false"));
171
config.setStringList(CONFIG_OBSOLETELINKS,
172
QStringList(obsoleteLinks ? "true" : "false"));
167
175
With the default configuration values in place, load
224
232
QString lang = config.getString(CONFIG_LANGUAGE);
225
233
Location langLocation = config.lastLocation();
230
qDebug() << "READING anchors.txt";
231
DoxWriter::readAnchors();
232
qDebug() << "READING title maps";
233
DoxWriter::readTitles();
234
qDebug() << "READING member multimaps";
235
DoxWriter::readMembers();
240
236
Initialize the tree where all the parsed sources will be stored.
241
237
The tree gets built as the source files are parsed, and then the
322
318
tree->resolveGroups();
323
319
tree->resolveTargets();
328
DoxWriter::writeAnchors();
329
DoxWriter::writeTitles();
330
DoxWriter::writeMembers();
337
322
Now the tree has been built, and all the stuff that needed
338
323
resolving has been resolved. Now it is time to traverse
456
435
else if (opt == "-slow") {
461
else if (opt == "-doxygen1") {
463
// Don't use this; it isn't ready yet.
464
// Now it's a fossil.
465
qDebug() << "doxygen pass 1";
467
DoxWriter::setDoxPass(1);
469
else if (opt == "-doxygen2") {
471
// Don't use this; it isn't ready yet.
472
// Now it's a fossil.
473
qDebug() << "doxygen pass 2";
475
DoxWriter::setDoxPass(2);
438
else if (opt == "-showinternal") {
441
else if (opt == "-obsoletelinks") {
442
obsoleteLinks = true;
480
445
qdocFiles.append(opt);