Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/qdoc3/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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
    26 ** package.
     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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4444*/
    4545
     46#include <qglobal.h>
    4647#include <QtCore>
    4748#include <stdlib.h>
     
    9596
    9697static bool slow = false;
     98static bool showInternal = false;
     99static bool obsoleteLinks = false;
    97100static QStringList defines;
    98101static QHash<QString, Tree *> trees;
    99 
    100 //static int doxygen = 0;
    101102
    102103/*!
     
    122123    Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n"
    123124                              "Options:\n"
    124                               "    -help     "
     125                              "    -help         "
    125126                              "Display this information and exit\n"
    126                               "    -version  "
     127                              "    -version      "
    127128                              "Display version of qdoc and exit\n"
    128                               "    -D<name>  "
     129                              "    -D<name>      "
    129130                              "Define <name> as a macro while parsing sources\n"
    130                               "    -slow     "
    131                               "Turn on features that slow down qdoc") );
     131                              "    -slow         "
     132                              "Turn on features that slow down qdoc\n"
     133                              "    -showinternal "
     134                              "Include stuff marked internal\n"
     135                              "    -obsoletelinks "
     136                              "Report links from obsolete items to non-obsolete items") );
    132137}
    133138
     
    137142static void printVersion()
    138143{
    139     Location::information(tr("qdoc version 4.4.1"));
     144    QString s = QString(tr("qdoc version ")) + QString(QT_VERSION_STR);
     145    Location::information(s);
    140146}
    141147
     
    161167    }
    162168    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"));
    163173
    164174    /*
     
    223233    Location langLocation = config.lastLocation();
    224234
    225 #ifdef QDOC2DOX   
    226     // qdoc -> doxygen
    227     if (doxygen == 2) {
    228         qDebug() << "READING anchors.txt";
    229         DoxWriter::readAnchors();
    230         qDebug() << "READING title maps";
    231         DoxWriter::readTitles();
    232         qDebug() << "READING member multimaps";
    233         DoxWriter::readMembers();
    234     }
    235 #endif   
    236 
    237235    /*
    238236      Initialize the tree where all the parsed sources will be stored.
     
    321319    tree->resolveTargets();
    322320
    323 #ifdef QDOC2DOX   
    324     // qdoc -> doxygen
    325     if (doxygen == 1) {
    326         DoxWriter::writeAnchors();
    327         DoxWriter::writeTitles();
    328         DoxWriter::writeMembers();
    329     }
    330 
    331     if (doxygen == 0) {
    332 #endif   
    333 
    334321    /*
    335322      Now the tree has been built, and all the stuff that needed
     
    353340    if (!tagFile.isEmpty())
    354341        tree->generateTagFile(tagFile);
    355    
     342
    356343    tree->setVersion("");
    357344    Generator::terminate();
    358 
    359 #ifdef QDOC2DOX   
    360     }
    361 #endif   
    362 
    363345    CodeParser::terminate();
    364346    CodeMarker::terminate();
     
    371353    foreach (QTranslator *translator, translators)
    372354        delete translator;
    373 
    374355    delete tree;
    375356}
     
    455436            slow = true;
    456437        }
    457        
    458 #ifdef QDOC2DOX       
    459         else if (opt == "-doxygen1") {
    460             // qdoc -> doxygen
    461             // Don't use this; it isn't ready yet.
    462             // Now it's a fossil.
    463             qDebug() << "doxygen pass 1";
    464             doxygen = 1;
    465             DoxWriter::setDoxPass(1);
     438        else if (opt == "-showinternal") {
     439            showInternal = true;
    466440        }
    467         else if (opt == "-doxygen2") {
    468             // qdoc -> doxygen
    469             // Don't use this; it isn't ready yet.
    470             // Now it's a fossil.
    471             qDebug() << "doxygen pass 2";
    472             doxygen = 2;
    473             DoxWriter::setDoxPass(2);
     441        else if (opt == "-obsoletelinks") {
     442            obsoleteLinks = true;
    474443        }
    475 #endif
    476        
    477444        else {
    478445            qdocFiles.append(opt);
Note: See TracChangeset for help on using the changeset viewer.