summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-03-02 11:34:47 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-03-02 11:34:47 (GMT)
commitd0201585c4ba5513dc80f228723709aa8c8205d2 (patch)
treebbd9db45afec26fa29214de6f156b54c4bb76b69 /tools/qdoc3
parentcaaf11aeacaf8922413668b37834dbb4e63ac78c (diff)
parent7afc26c45ba19ba1fa077629e388be32ea1664bc (diff)
downloadQt-d0201585c4ba5513dc80f228723709aa8c8205d2.zip
Qt-d0201585c4ba5513dc80f228723709aa8c8205d2.tar.gz
Qt-d0201585c4ba5513dc80f228723709aa8c8205d2.tar.bz2
Merge remote branch 'berlin/4.7' into 4.7
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/codeparser.cpp1
-rw-r--r--tools/qdoc3/command.cpp9
-rw-r--r--tools/qdoc3/config.cpp6
-rw-r--r--tools/qdoc3/cppcodeparser.cpp1
-rw-r--r--tools/qdoc3/doc.h1
-rw-r--r--tools/qdoc3/generator.cpp1
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp1
-rw-r--r--tools/qdoc3/jambiapiparser.cpp2
-rw-r--r--tools/qdoc3/main.cpp17
-rw-r--r--tools/qdoc3/node.cpp4
-rw-r--r--tools/qdoc3/pagegenerator.cpp3
-rw-r--r--tools/qdoc3/qdoc3.pro16
-rw-r--r--tools/qdoc3/tree.cpp3
-rw-r--r--tools/qdoc3/webxmlgenerator.cpp4
-rw-r--r--tools/qdoc3/webxmlgenerator.h5
15 files changed, 53 insertions, 21 deletions
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index 5ae63ac..042378e 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -43,7 +43,6 @@
codeparser.cpp
*/
-#include <QtCore>
#include "codeparser.h"
#include "node.h"
#include "tree.h"
diff --git a/tools/qdoc3/command.cpp b/tools/qdoc3/command.cpp
index 76b483c..b78ad07 100644
--- a/tools/qdoc3/command.cpp
+++ b/tools/qdoc3/command.cpp
@@ -47,6 +47,8 @@
#include "command.h"
+#include <stdlib.h>
+
QT_BEGIN_NAMESPACE
void executeCommand(const Location& location,
@@ -69,6 +71,12 @@ void executeCommand(const Location& location,
if (space != -1)
toolName.truncate(space);
+#ifdef QT_BOOTSTRAPPED
+ int status = system(qPrintable(actualCommand));
+ int exitCode = WEXITSTATUS(status);
+ if (status == -1 || exitCode != EXIT_SUCCESS)
+ location.fatal(QString("Error executing '$1': $2").arg(toolName).arg(exitCode));
+#else
QProcess process;
process.start(QLatin1String("sh"),
QStringList() << QLatin1String("-c") << actualCommand);
@@ -89,6 +97,7 @@ void executeCommand(const Location& location,
tr("The tool was invoked like this:\n%1\n"
"It emitted these errors:\n%2")
.arg(actualCommand).arg(errors));
+#endif
}
QT_END_NAMESPACE
diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp
index acb1576..3150f28 100644
--- a/tools/qdoc3/config.cpp
+++ b/tools/qdoc3/config.cpp
@@ -43,7 +43,11 @@
config.cpp
*/
-#include <QtCore>
+#include <QDir>
+#include <QVariant>
+#include <QFile>
+#include <QTemporaryFile>
+#include <QTextStream>
#include "archiveextractor.h"
#include "config.h"
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index d9e9c3b..fef3c14 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -43,7 +43,6 @@
cppcodeparser.cpp
*/
-#include <QtCore>
#include <qfile.h>
#include <stdio.h>
diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h
index e98bb26..3e76456 100644
--- a/tools/qdoc3/doc.h
+++ b/tools/qdoc3/doc.h
@@ -48,6 +48,7 @@
#include <QSet>
#include <QString>
+#include <QMap>
#include "location.h"
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 40fd0e2..0ef5156 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -42,7 +42,6 @@
/*
generator.cpp
*/
-#include <QtCore>
#include <qdir.h>
#include <qdebug.h>
#include "codemarker.h"
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index 2189e02..71810e4 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-#include <QtXml>
#include <QHash>
#include <QMap>
diff --git a/tools/qdoc3/jambiapiparser.cpp b/tools/qdoc3/jambiapiparser.cpp
index 3aba1b0..23f2716 100644
--- a/tools/qdoc3/jambiapiparser.cpp
+++ b/tools/qdoc3/jambiapiparser.cpp
@@ -43,8 +43,6 @@
jambiapiparser.cpp
*/
-#include <QtXml>
-
#include "cppcodeparser.h"
#include "jambiapiparser.h"
#include "node.h"
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 57823fb..ea843ba 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -44,7 +44,6 @@
*/
#include <qglobal.h>
-#include <QtCore>
#include <stdlib.h>
#include "apigenerator.h"
#include "codemarker.h"
@@ -72,6 +71,11 @@
#include "tokenizer.h"
#include "tree.h"
+#include "qtranslator.h"
+#ifndef QT_BOOTSTRAPPED
+# include "qcoreapplication.h"
+#endif
+
QT_BEGIN_NAMESPACE
/*
@@ -151,7 +155,9 @@ static void printVersion()
*/
static void processQdocconfFile(const QString &fileName)
{
+#ifndef QT_NO_TRANSLATION
QList<QTranslator *> translators;
+#endif
/*
The Config instance represents the configuration data for qdoc.
@@ -207,6 +213,7 @@ static void processQdocconfFile(const QString &fileName)
CodeParser::initialize(config);
Generator::initialize(config);
+#ifndef QT_NO_TRANSLATION
/*
Load the language translators, if the configuration specifies any.
*/
@@ -221,6 +228,7 @@ static void processQdocconfFile(const QString &fileName)
translators.append(translator);
++fn;
}
+#endif
//QSet<QString> outputLanguages = config.getStringSet(CONFIG_OUTPUTLANGUAGES);
@@ -351,8 +359,9 @@ static void processQdocconfFile(const QString &fileName)
Location::terminate();
QDir::setCurrent(prevCurrentDir);
- foreach (QTranslator *translator, translators)
- delete translator;
+#ifndef QT_NO_TRANSLATION
+ qDeleteAll(translators);
+#endif
delete tree;
}
@@ -362,7 +371,9 @@ int main(int argc, char **argv)
{
QT_USE_NAMESPACE
+#ifndef QT_BOOTSTRAPPED
QCoreApplication app(argc, argv);
+#endif
QString cf = "qsauncompress \1 \2";
PolyArchiveExtractor qsaExtractor(QStringList() << "qsa",cf);
cf = "tar -C \2 -xf \1";
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index d2ffff5..6ad9a6c 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -43,7 +43,6 @@
node.cpp
*/
-#include <QtCore>
#include "node.h"
QT_BEGIN_NAMESPACE
@@ -1161,7 +1160,8 @@ QString FunctionNode::signature(bool values) const
*/
void FunctionNode::debug() const
{
- qDebug() << "QML METHOD" << name() << "rt" << rt << "pp" << pp;
+ qDebug("QML METHOD %s rt %s pp %s",
+ qPrintable(name()), qPrintable(rt), qPrintable(pp.join(" ")));
}
/*!
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index 2cad9ed..f0f14fe 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -43,7 +43,6 @@
pagegenerator.cpp
*/
-#include <QtCore>
#include <qfile.h>
#include <qfileinfo.h>
@@ -212,7 +211,7 @@ void PageGenerator::generateInnerNode(const InnerNode *node,
#endif
if (fakeNode->subType() == Node::Page) {
if (node->count() > 0)
- qDebug() << "PAGE" << fakeNode->title() << "HAS CHILDREN";
+ qDebug("PAGE %s HAS CHILDREN", qPrintable(fakeNode->title()));
}
}
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index 7705692..e394799 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -4,9 +4,16 @@ DEFINES += QT_NO_CAST_TO_ASCII
#DEFINES += QT_USE_FAST_OPERATOR_PLUS
#DEFINES += QT_USE_FAST_CONCATENATION
-QT = core xml
-CONFIG += console
-CONFIG -= debug_and_release_target
+qdoc_bootstrapped {
+ include(../../src/tools/bootstrap/bootstrap.pri)
+ DEFINES -= QT_NO_CAST_FROM_ASCII
+ DEFINES += QT_NO_TRANSLATION
+} else {
+ QT = core xml
+ CONFIG += console
+ CONFIG -= debug_and_release_target
+}
+
!isEmpty(QT_BUILD_TREE):DESTDIR = $$QT_BUILD_TREE/bin
#CONFIG += debug
build_all:!build_pass {
@@ -14,7 +21,8 @@ build_all:!build_pass {
CONFIG += release
# CONFIG += debug
}
-mac:CONFIG -= app_bundle
+
+CONFIG -= app_bundle
HEADERS += apigenerator.h \
archiveextractor.h \
atom.h \
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 6c2502d..922c23e 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -43,7 +43,6 @@
tree.cpp
*/
-#include <QtCore>
#include <QDomDocument>
#include "atom.h"
@@ -54,6 +53,8 @@
#include "text.h"
#include "tree.h"
+#include <limits.h>
+
QT_BEGIN_NAMESPACE
struct InheritanceBound
diff --git a/tools/qdoc3/webxmlgenerator.cpp b/tools/qdoc3/webxmlgenerator.cpp
index 205bc8c..6020b1b 100644
--- a/tools/qdoc3/webxmlgenerator.cpp
+++ b/tools/qdoc3/webxmlgenerator.cpp
@@ -43,8 +43,6 @@
webxmlgenerator.cpp
*/
-#include <QtXml>
-
#include "codemarker.h"
#include "pagegenerator.h"
#include "webxmlgenerator.h"
@@ -52,6 +50,8 @@
#include "separator.h"
#include "tree.h"
+#include <QtCore/qxmlstream.h>
+
QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
diff --git a/tools/qdoc3/webxmlgenerator.h b/tools/qdoc3/webxmlgenerator.h
index cadf176..071896a 100644
--- a/tools/qdoc3/webxmlgenerator.h
+++ b/tools/qdoc3/webxmlgenerator.h
@@ -46,12 +46,17 @@
#ifndef WEBXMLGENERATOR_H
#define WEBXMLGENERATOR_H
+#include <QtCore/qxmlstream.h>
+
#include "codemarker.h"
#include "config.h"
#include "pagegenerator.h"
QT_BEGIN_NAMESPACE
+class QXmlStreamReader;
+class QXmlStreamWriter;
+
class WebXMLGenerator : public PageGenerator
{
public: