summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-03-04 18:22:02 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-03-04 18:22:02 (GMT)
commit2542f8b565e90378145c048b3a6982f4749c6392 (patch)
treed48a2a8988a778e16cf73aac4d0b5709b82f0082 /tools
parent4f2203e481cc1663776e7b87b082cf0dd42849fd (diff)
parent364ba2bfeeab574d2ae940e4387d3c90b2a46dcd (diff)
downloadQt-2542f8b565e90378145c048b3a6982f4749c6392.zip
Qt-2542f8b565e90378145c048b3a6982f4749c6392.tar.gz
Qt-2542f8b565e90378145c048b3a6982f4749c6392.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler.cpp8
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp3
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp2
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default.cpp2
-rw-r--r--tools/assistant/tools/assistant/findwidget.cpp1
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.cpp7
-rw-r--r--tools/assistant/tools/assistant/main.cpp2
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp13
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet_p.h3
-rw-r--r--tools/designer/src/plugins/plugins.pro1
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro13
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp132
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h74
-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.cpp7
-rw-r--r--tools/qdoc3/doc.h1
-rw-r--r--tools/qdoc3/generator.cpp26
-rw-r--r--tools/qdoc3/generator.h7
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp1
-rw-r--r--tools/qdoc3/htmlgenerator.cpp60
-rw-r--r--tools/qdoc3/htmlgenerator.h2
-rw-r--r--tools/qdoc3/jambiapiparser.cpp2
-rw-r--r--tools/qdoc3/main.cpp17
-rw-r--r--tools/qdoc3/node.cpp19
-rw-r--r--tools/qdoc3/node.h6
-rw-r--r--tools/qdoc3/pagegenerator.cpp3
-rw-r--r--tools/qdoc3/qdoc3.pro16
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf2
-rw-r--r--tools/qdoc3/tree.cpp3
-rw-r--r--tools/qdoc3/webxmlgenerator.cpp4
-rw-r--r--tools/qdoc3/webxmlgenerator.h5
-rw-r--r--tools/qev/qev.pro2
35 files changed, 395 insertions, 67 deletions
diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp
index 235f737..bd8dc20 100644
--- a/tools/assistant/lib/qhelpcollectionhandler.cpp
+++ b/tools/assistant/lib/qhelpcollectionhandler.cpp
@@ -114,6 +114,9 @@ bool QHelpCollectionHandler::openCollectionFile()
return false;
}
+ m_query.exec(QLatin1String("PRAGMA synchronous=OFF"));
+ m_query.exec(QLatin1String("PRAGMA cache_size=3000"));
+
m_query.exec(QLatin1String("SELECT COUNT(*) FROM sqlite_master WHERE TYPE=\'table\'"
"AND Name=\'NamespaceTable\'"));
m_query.next();
@@ -163,6 +166,9 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName)
return false;
}
+ copyQuery->exec(QLatin1String("PRAGMA synchronous=OFF"));
+ copyQuery->exec(QLatin1String("PRAGMA cache_size=3000"));
+
if (!createTables(copyQuery)) {
emit error(tr("Cannot copy collection file: %1").arg(colFile));
return false;
@@ -582,6 +588,8 @@ void QHelpCollectionHandler::optimizeDatabase(const QString &fileName)
}
QSqlQuery query(db);
+ db.exec(QLatin1String("PRAGMA synchronous=OFF"));
+ db.exec(QLatin1String("PRAGMA cache_size=3000"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS NameIndex ON IndexTable(Name)"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileNameIndex ON FileNameTable(Name)"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileIdIndex ON FileNameTable(FileId)"));
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 783f016..85bdd75 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -191,6 +191,9 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData,
return false;
}
+ d->query->exec(QLatin1String("PRAGMA synchronous=OFF"));
+ d->query->exec(QLatin1String("PRAGMA cache_size=3000"));
+
addProgress(1.0);
createTables();
insertFileNotFoundFile();
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
index d9dcec5..4baa376 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
@@ -586,7 +586,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile,
this->m_indexFilesFolder = indexFilesFolder;
mutex.unlock();
- start(QThread::NormalPriority);
+ start(QThread::LowestPriority);
}
void QHelpSearchIndexWriter::optimizeIndex()
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
index cb3e49c..827d145 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
@@ -191,7 +191,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile,
this->m_collectionFile = collectionFile;
this->m_indexFilesFolder = indexFilesFolder;
- start(QThread::NormalPriority);
+ start(QThread::LowestPriority);
}
void QHelpSearchIndexWriter::run()
diff --git a/tools/assistant/tools/assistant/findwidget.cpp b/tools/assistant/tools/assistant/findwidget.cpp
index 2e40ab0..60318d4 100644
--- a/tools/assistant/tools/assistant/findwidget.cpp
+++ b/tools/assistant/tools/assistant/findwidget.cpp
@@ -72,6 +72,7 @@ FindWidget::FindWidget(QWidget *parent)
toolClose = setupToolButton(QLatin1String(""),
resourcePath + QLatin1String("/closetab.png"));
hboxLayout->addWidget(toolClose);
+ connect(toolClose, SIGNAL(clicked()), SLOT(hide()));
editFind = new QLineEdit(this);
hboxLayout->addWidget(editFind);
diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp
index e21e95d..41ad633 100644
--- a/tools/assistant/tools/assistant/helpenginewrapper.cpp
+++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp
@@ -167,6 +167,13 @@ HelpEngineWrapper::HelpEngineWrapper(const QString &collectionFile)
HelpEngineWrapper::~HelpEngineWrapper()
{
TRACE_OBJ
+ const QStringList &namespaces = d->m_helpEngine->registeredDocumentations();
+ foreach (const QString &nameSpace, namespaces) {
+ const QString &docFile
+ = d->m_helpEngine->documentationFileName(nameSpace);
+ d->m_qchWatcher->removePath(docFile);
+ }
+
delete d;
}
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index 77e5e7c..51ea9f9 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -292,7 +292,7 @@ void setupTranslation(const QString &fileName, const QString &dir)
QTranslator *translator = new QTranslator(QCoreApplication::instance());
if (translator->load(fileName, dir)) {
QCoreApplication::installTranslator(translator);
- } else {
+ } else if (!fileName.endsWith(QLatin1String("en_US"))) {
qWarning("Could not load translation file %s in directory %s.",
qPrintable(fileName), qPrintable(dir));
}
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp
index 2c5efbf..5292f5f 100644
--- a/tools/designer/src/lib/shared/formwindowbase.cpp
+++ b/tools/designer/src/lib/shared/formwindowbase.cpp
@@ -72,6 +72,7 @@
#include <QtGui/QStatusBar>
#include <QtGui/QMenu>
#include <QtGui/QAction>
+#include <QtGui/QLabel>
QT_BEGIN_NAMESPACE
@@ -181,7 +182,17 @@ void FormWindowBase::reloadProperties()
QMapIterator<int, bool> itIndex(itSheet.value());
while (itIndex.hasNext()) {
const int index = itIndex.next().key();
- sheet->setProperty(index, sheet->property(index));
+ const QVariant newValue = sheet->property(index);
+ if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) {
+ const PropertySheetStringValue newString = qVariantValue<PropertySheetStringValue>(newValue);
+ // optimize a bit, reset only if the text value might contain a reference to qt resources
+ // (however reloading of icons other than taken from resources might not work here)
+ if (newString.value().contains(QLatin1String(":/"))) {
+ const QVariant resetValue = qVariantFromValue(PropertySheetStringValue());
+ sheet->setProperty(index, resetValue);
+ }
+ }
+ sheet->setProperty(index, newValue);
}
if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) {
const int count = tabWidget->count();
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index 13bb1d7..77ab2a6 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -271,6 +271,7 @@ bool QDesignerPropertySheetPrivate::isReloadableProperty(int index) const
{
return isResourceProperty(index)
|| propertyType(index) == QDesignerPropertySheet::PropertyStyleSheet
+ || propertyType(index) == QDesignerPropertySheet::PropertyText
|| q->property(index).type() == QVariant::Url;
}
@@ -549,6 +550,7 @@ QDesignerPropertySheet::PropertyType QDesignerPropertySheet::propertyTypeFromNam
propertyTypeHash.insert(QLatin1String("windowModality"), PropertyWindowModality);
propertyTypeHash.insert(QLatin1String("windowModified"), PropertyWindowModified);
propertyTypeHash.insert(QLatin1String("styleSheet"), PropertyStyleSheet);
+ propertyTypeHash.insert(QLatin1String("text"), PropertyText);
}
return propertyTypeHash.value(name, PropertyNone);
}
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
index 9db7367..0105eac 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
@@ -176,7 +176,8 @@ public:
PropertyWindowIconText,
PropertyWindowModality,
PropertyWindowModified,
- PropertyStyleSheet
+ PropertyStyleSheet,
+ PropertyText
};
enum ObjectType { ObjectNone, ObjectLabel, ObjectLayout, ObjectLayoutWidget, ObjectQ3GroupBox };
diff --git a/tools/designer/src/plugins/plugins.pro b/tools/designer/src/plugins/plugins.pro
index baf5261..cf4fa8a 100644
--- a/tools/designer/src/plugins/plugins.pro
+++ b/tools/designer/src/plugins/plugins.pro
@@ -7,3 +7,4 @@ win32:!contains(QT_EDITION, OpenSource):SUBDIRS += activeqt
# contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d
contains(QT_CONFIG, webkit): SUBDIRS += qwebview
contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets
+contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativeview
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro
new file mode 100644
index 0000000..b8abe87
--- /dev/null
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro
@@ -0,0 +1,13 @@
+TEMPLATE = lib
+TARGET = qdeclarativeview
+CONFIG += qt warn_on plugin designer
+QT += declarative
+
+include(../plugins.pri)
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+SOURCES += qdeclarativeview_plugin.cpp
+HEADERS += qdeclarativeview_plugin.h
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
new file mode 100644
index 0000000..b352a9b
--- /dev/null
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeview_plugin.h"
+
+#include <QtDesigner/QExtensionFactory>
+#include <QtDesigner/QExtensionManager>
+
+#include <QtCore/qplugin.h>
+#include <QtDeclarative/QDeclarativeView>
+
+static const char toolTipC[] = "QtDeclarative view widget";
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeViewPlugin::QDeclarativeViewPlugin(QObject *parent) :
+ QObject(parent),
+ m_initialized(false)
+{
+}
+
+QString QDeclarativeViewPlugin::name() const
+{
+ return QLatin1String("QDeclarativeView");
+}
+
+QString QDeclarativeViewPlugin::group() const
+{
+ return QLatin1String("Display Widgets");
+}
+
+QString QDeclarativeViewPlugin::toolTip() const
+{
+ return QString(QLatin1String(toolTipC));
+}
+
+QString QDeclarativeViewPlugin::whatsThis() const
+{
+ return QString(QLatin1String(toolTipC));
+}
+
+QString QDeclarativeViewPlugin::includeFile() const
+{
+ return QLatin1String("QtDeclarative/QDeclarativeView");
+}
+
+QIcon QDeclarativeViewPlugin::icon() const
+{
+ return QIcon();
+}
+
+bool QDeclarativeViewPlugin::isContainer() const
+{
+ return false;
+}
+
+QWidget *QDeclarativeViewPlugin::createWidget(QWidget *parent)
+{
+ return new QDeclarativeView(parent);
+}
+
+bool QDeclarativeViewPlugin::isInitialized() const
+{
+ return m_initialized;
+}
+
+void QDeclarativeViewPlugin::initialize(QDesignerFormEditorInterface * /*core*/)
+{
+ if (m_initialized)
+ return;
+
+ m_initialized = true;
+}
+
+QString QDeclarativeViewPlugin::domXml() const
+{
+ return QLatin1String("\
+ <ui language=\"c++\">\
+ <widget class=\"QDeclarativeView\" name=\"declarativeView\">\
+ <property name=\"geometry\">\
+ <rect>\
+ <x>0</x>\
+ <y>0</y>\
+ <width>300</width>\
+ <height>200</height>\
+ </rect>\
+ </property>\
+ </widget>\
+ </ui>");
+}
+
+Q_EXPORT_PLUGIN2(customwidgetplugin, QDeclarativeViewPlugin)
+
+QT_END_NAMESPACE
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h
new file mode 100644
index 0000000..2f13f16
--- /dev/null
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVIEW_PLUGIN_H
+#define QDECLARATIVEVIEW_PLUGIN_H
+
+#include <QtDesigner/QDesignerCustomWidgetInterface>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeViewPlugin: public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+public:
+ QDeclarativeViewPlugin(QObject *parent = 0);
+
+ virtual QString name() const;
+ virtual QString group() const;
+ virtual QString toolTip() const;
+ virtual QString whatsThis() const;
+ virtual QString includeFile() const;
+ virtual QIcon icon() const;
+ virtual bool isContainer() const;
+ virtual QWidget *createWidget(QWidget *parent);
+ virtual bool isInitialized() const;
+ virtual void initialize(QDesignerFormEditorInterface *core);
+ virtual QString domXml() const;
+
+private:
+ bool m_initialized;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEVIEW_PLUGIN_H
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 021d64a..6884781 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -43,11 +43,11 @@
cppcodeparser.cpp
*/
-#include <QtCore>
#include <qfile.h>
#include <stdio.h>
#include <errno.h>
+#include <qdebug.h>
#include "codechunk.h"
#include "config.h"
@@ -1034,7 +1034,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
else if (command == COMMAND_QMLINHERITS) {
setLink(node, Node::InheritsLink, arg);
if (node->subType() == Node::QmlClass) {
- QmlClassNode::addInheritedBy(arg,node->name());
+ QmlClassNode::addInheritedBy(arg,node);
}
}
else if (command == COMMAND_QMLDEFAULT) {
@@ -1651,8 +1651,9 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent)
*/
QString namespaceName = previousLexeme();
NamespaceNode *namespasse = 0;
- if (parent)
+ if (parent) {
namespasse = static_cast<NamespaceNode*>(parent->findNode(namespaceName, Node::Namespace));
+ }
if (!namespasse) {
namespasse = new NamespaceNode(parent, namespaceName);
namespasse->setAccess(access);
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 6a8899a..c8a39ef 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"
@@ -1186,6 +1185,31 @@ void Generator::appendSortedNames(Text& text,
}
}
+void Generator::appendSortedQmlNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker)
+{
+ QMap<QString,Text> classMap;
+ int index = 0;
+
+ qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by...";
+ for (int i = 0; i < subs.size(); ++i) {
+ Text t;
+ qDebug() << " " << subs[i]->name();
+ appendFullName(t, subs[i], base, marker);
+ classMap[t.toString().toLower()] = t;
+ }
+
+ QStringList names = classMap.keys();
+ names.sort();
+
+ foreach (const QString &name, names) {
+ text << classMap[name];
+ text << separator(index++, names.count());
+ }
+}
+
int Generator::skipAtoms(const Atom *atom, Atom::Type type) const
{
int skipAhead = 0;
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index 44f56e2..30d9af4 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -169,6 +169,13 @@ class Generator
const QList<RelatedClass> &classes,
CodeMarker *marker);
+ protected:
+ void appendSortedQmlNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker);
+
+ private:
QString amp;
QString lt;
QString gt;
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/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index e767460..411a886 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -73,6 +73,7 @@ QString HtmlGenerator::sinceTitles[] =
" New Typedefs",
" New Properties",
" New Variables",
+ " New QML Elements",
" New Qml Properties",
" New Qml Signals",
" New Qml Methods",
@@ -687,6 +688,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
nsmap = newSinceMaps.find(atom->string());
NewClassMaps::const_iterator ncmap;
ncmap = newClassMaps.find(atom->string());
+ NewClassMaps::const_iterator nqcmap;
+ nqcmap = newQmlClassMaps.find(atom->string());
if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) {
QList<Section> sections;
QList<Section>::ConstIterator s;
@@ -697,6 +700,13 @@ int HtmlGenerator::generateAtom(const Atom *atom,
while (n != nsmap.value().constEnd()) {
const Node* node = n.value();
switch (node->type()) {
+ case Node::Fake:
+ if (node->subType() == Node::QmlClass) {
+ sections[QmlClass].appendMember((Node*)node);
+ //qDebug() << "HtmlGenerator::generateAtom(): Atom::SinceList, append"
+ // << node->name();
+ }
+ break;
case Node::Namespace:
sections[Namespace].appendMember((Node*)node);
break;
@@ -782,6 +792,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<h3>" << protectEnc((*s).name) << "</h3>\n";
if (idx == Class)
generateCompactList(0, marker, ncmap.value(), QString("Q"));
+ else if (idx == QmlClass)
+ generateCompactList(0, marker, nqcmap.value(), QString("Q"));
else if (idx == MemberFunction) {
ParentMaps parentmaps;
ParentMaps::iterator pmap;
@@ -2332,7 +2344,11 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "<a href=\""
<< linkForNode(it.value(), relative)
<< "\">";
- QStringList pieces = fullName(it.value(), relative, marker).split("::");
+ QStringList pieces;
+ if (it.value()->subType() == Node::QmlClass)
+ pieces << it.value()->name();
+ else
+ pieces = fullName(it.value(), relative, marker).split("::");
out() << protectEnc(pieces.last());
out() << "</a>";
if (pieces.size() > 1) {
@@ -3723,6 +3739,9 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion);
if (ncmap == newClassMaps.end())
ncmap = newClassMaps.insert(sinceVersion,NodeMap());
+ NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion);
+ if (nqcmap == newQmlClassMaps.end())
+ nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap());
if ((*child)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*child);
@@ -3742,6 +3761,16 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
nsmap.value().insert(className,(*child));
ncmap.value().insert(className,(*child));
}
+ else if ((*child)->subType() == Node::QmlClass) {
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+ nsmap.value().insert(className,(*child));
+ nqcmap.value().insert(className,(*child));
+ //qDebug() << "findAllSince(): insert" << className << sinceVersion;
+ }
}
else {
QString name = (*child)->name();
@@ -4316,40 +4345,15 @@ void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn,
CodeMarker* marker)
{
if (cn) {
- QStringList subs;
+ NodeList subs;
QmlClassNode::subclasses(cn->name(),subs);
if (!subs.isEmpty()) {
- subs.sort();
Text text;
text << Atom::ParaLeft << "Inherited by ";
- for (int i = 0; i < subs.size(); ++i) {
- text << subs.at(i);
- text << separator(i, subs.size());
- }
+ appendSortedQmlNames(text,cn,subs,marker);
text << Atom::ParaRight;
generateText(text, cn, marker);
}
-#if 0
- if (cn->links().contains(Node::InheritsLink)) {
- QPair<QString,QString> linkPair;
- linkPair = cn->links()[Node::InheritsLink];
- QStringList strList(linkPair.first);
- const Node* n = myTree->findNode(strList,Node::Fake);
- if (n && n->subType() == Node::QmlClass) {
- const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
- out() << "<p style=\"text-align: center\">";
- Text text;
- text << "[Inherits ";
- text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn));
- text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- text << Atom(Atom::String, linkPair.second);
- text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
- text << "]";
- generateText(text, cn, marker);
- out() << "</p>";
- }
- }
-#endif
}
}
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 551bead..8fe0331 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -90,6 +90,7 @@ class HtmlGenerator : public PageGenerator
Typedef,
Property,
Variable,
+ QmlClass,
QmlProperty,
QmlSignal,
QmlMethod,
@@ -326,6 +327,7 @@ class HtmlGenerator : public PageGenerator
NewSinceMaps newSinceMaps;
static QString sinceTitles[];
NewClassMaps newClassMaps;
+ NewClassMaps newQmlClassMaps;
static int id;
};
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 358fdd1..5415559 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -43,8 +43,8 @@
node.cpp
*/
-#include <QtCore>
#include "node.h"
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -1161,7 +1161,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(" ")));
}
/*!
@@ -1257,7 +1258,7 @@ bool TargetNode::isInnerNode() const
#ifdef QDOC_QML
bool QmlClassNode::qmlOnly = false;
-QMultiMap<QString,QString> QmlClassNode::inheritedBy;
+QMultiMap<QString,Node*> QmlClassNode::inheritedBy;
/*!
Constructs a Qml class node (i.e. a Fake node with the
@@ -1302,19 +1303,23 @@ QString QmlClassNode::fileBase() const
Record the fact that QML class \a base is inherited by
QML class \a sub.
*/
-void QmlClassNode::addInheritedBy(const QString& base, const QString& sub)
+void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
{
+ //qDebug() << "QmlClassNode::addInheritedBy(): insert" << base << sub->name();
inheritedBy.insert(base,sub);
}
/*!
- Loads the list \a subs with the names of all the subclasses of \a base.
+ Loads the list \a subs with the nodes of all the subclasses of \a base.
*/
-void QmlClassNode::subclasses(const QString& base, QStringList& subs)
+void QmlClassNode::subclasses(const QString& base, NodeList& subs)
{
subs.clear();
- if (inheritedBy.contains(base))
+ if (inheritedBy.count(base) > 0) {
subs = inheritedBy.values(base);
+ qDebug() << "QmlClassNode::subclasses():" << inheritedBy.count(base) << base
+ << "subs:" << subs.size();
+ }
}
/*!
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index ae5dcd7..fd39698 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -383,12 +383,12 @@ class QmlClassNode : public FakeNode
const ClassNode* classNode() const { return cnode; }
virtual QString fileBase() const;
- static void addInheritedBy(const QString& base, const QString& sub);
- static void subclasses(const QString& base, QStringList& subs);
+ static void addInheritedBy(const QString& base, Node* sub);
+ static void subclasses(const QString& base, NodeList& subs);
public:
static bool qmlOnly;
- static QMultiMap<QString,QString> inheritedBy;
+ static QMultiMap<QString,Node*> inheritedBy;
private:
const ClassNode* cnode;
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/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index 3b5d8dc..e5b883a 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -6,7 +6,7 @@ include(qt-defines.qdocconf)
project = Qml
description = Qml Reference Documentation
-url = http://doc.qtsoftware.com/4.6
+url = http://qt.nokia.com/doc/4.6/
qmlonly = true
edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
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:
diff --git a/tools/qev/qev.pro b/tools/qev/qev.pro
index 28383c6..962b9fa 100644
--- a/tools/qev/qev.pro
+++ b/tools/qev/qev.pro
@@ -9,5 +9,3 @@ INCLUDEPATH += .
# Input
SOURCES += qev.cpp
CONFIG += qt warn_on create_prl link_prl
-OBJECTS_DIR=.obj/debug-shared
-MOC_DIR=.moc/debug-shared