summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-22 04:25:36 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-22 04:25:36 (GMT)
commit2c9417fadf4205c4fcb602ca17b4d729c5466020 (patch)
treeb4f6d65c9ef83ba99829174148ab51ddd4cb1912 /tools
parent155ae1da9dcf11617f412e5c229a2a12a333d7db (diff)
parentfe1a44a850e61d8b64626424b45ef7592ec66589 (diff)
downloadQt-2c9417fadf4205c4fcb602ca17b4d729c5466020.zip
Qt-2c9417fadf4205c4fcb602ca17b4d729c5466020.tar.gz
Qt-2c9417fadf4205c4fcb602ca17b4d729c5466020.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (22 commits) Fix compilation on HP-UXi: m_volume is a #define WinCE doesn't have sys/types.h Fix compilation: qmlviewer cannot use symbols exported with Q_AUTOTEST_EXPORT in production builds Fix compilation on recent Linux systems: getpid(2) is in unistd.h. Cocoa: calling QEventLoop::exec from mouse up causes problem Fix compilation on GNU/Hurd (SA_SIGINFO isn't defined) Doc: Collected the Declarative UI tutorials together and renamed them. Doc: Simplified Commercial Editions for Qt 4.7. Work around MSVC2008 compiler crash doc: Added "\since 4.7" to a bunch of declarative stuff. Cocoa: event dispatcher eats mouse events Fix an issue about double-click on Mac OS X. qdoc: Finished "Inherited by" list for QML elements. Avoid calling out to public API in the QtScript implementation Move property helper functions to QScriptEnginePrivate Move more script value conversion code to helper functions Cleanup: Move value conversion code to helper functions Move implementation of QScriptValue construction functions to private class Cleanup: Move number conversion functions to QScriptEnginePrivate Move some helper function declarations outside QT_NO_QOBJECT guard ...
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp13
-rw-r--r--tools/qdoc3/generator.cpp53
-rw-r--r--tools/qdoc3/generator.h8
-rw-r--r--tools/qdoc3/htmlgenerator.cpp23
-rw-r--r--tools/qdoc3/htmlgenerator.h1
-rw-r--r--tools/qdoc3/node.cpp20
-rw-r--r--tools/qdoc3/node.h6
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf8
-rw-r--r--tools/qdoc3/test/qt.qdocconf7
10 files changed, 85 insertions, 62 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index c8655a4..d9e9c3b 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -1033,7 +1033,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
#ifdef QDOC_QML
else if (command == COMMAND_QMLINHERITS) {
setLink(node, Node::InheritsLink, arg);
- }
+ if (node->subType() == Node::QmlClass) {
+ QmlClassNode::addInheritedBy(arg,node);
+ }
+ }
else if (command == COMMAND_QMLDEFAULT) {
QmlPropGroupNode* qpgn = static_cast<QmlPropGroupNode*>(node);
qpgn->setDefault();
@@ -2299,14 +2302,6 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
QString imagesPath = fullPath + "/images";
QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter);
-#if 0
- qDebug() << "examplePath:" << examplePath;
- qDebug() << " exampleFiles" << exampleFiles;
- qDebug() << "imagesPath:" << imagesPath;
- qDebug() << "fullPath:" << fullPath;
- qDebug() << " imageFiles" << imageFiles;
-#endif
-
if (!exampleFiles.isEmpty()) {
// move main.cpp and to the end, if it exists
QString mainCpp;
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 9b58d7f..a7ab453 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -641,33 +641,6 @@ void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker)
}
#endif
-void Generator::generateModuleWarning(const ClassNode *classe,
- CodeMarker *marker)
-{
- QString module = classe->moduleName();
- if (!module.isEmpty()) {
- Text text;
- if (!editionModuleMap["DesktopLight"].contains(module)) {
- text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "This class is not part of the Qt GUI Framework Edition."
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << Atom::ParaRight;
- }
- else if (module == "Qt3Support") {
- text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "Note to Qt GUI Framework Edition users:"
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << " This class is only available in the "
- << Atom(Atom::AutoLink, "Qt Full Framework Edition")
- << "." << Atom::ParaRight;
- }
-
- generateText(text, classe, marker);
- }
-}
-
QString Generator::indent(int level, const QString& markedCode)
{
if (level == 0)
@@ -1213,6 +1186,32 @@ void Generator::appendSortedNames(Text& text,
}
}
+void Generator::appendSortedNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker)
+{
+ NodeList::ConstIterator r;
+ QMap<QString,Text> classMap;
+ int index = 0;
+
+ r = subs.begin();
+ while (r != subs.end()) {
+ Text className;
+ appendFullName(className, (*r), base, marker);
+ classMap[className.toString().toLower()] = className;
+ ++r;
+ }
+
+ QStringList classNames = classMap.keys();
+ classNames.sort();
+
+ foreach (const QString &className, classNames) {
+ text << classMap[className];
+ text << separator(index++, classNames.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 06f7f88..50ffb0a 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -124,7 +124,6 @@ class Generator
Node::SubType subtype,
const QString& tag);
void generateExampleFiles(const FakeNode *fake, CodeMarker *marker);
- void generateModuleWarning(const ClassNode *classe, CodeMarker *marker);
virtual int skipAtoms(const Atom *atom, Atom::Type type) const;
virtual QString fullName(const Node *node,
@@ -170,6 +169,13 @@ class Generator
const QList<RelatedClass> &classes,
CodeMarker *marker);
+ protected:
+ void appendSortedNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker);
+
+ private:
QString amp;
QString lt;
QString gt;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index e341a03..c20f745 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1261,7 +1261,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
generateIncludes(inner, marker);
generateStatus(inner, marker);
if (classe) {
- generateModuleWarning(classe, marker);
generateInherits(classe, marker);
generateInheritedBy(classe, marker);
}
@@ -1525,6 +1524,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateQmlInherits(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
generateBrief(qml_cn, marker);
+ generateQmlInheritedBy(qml_cn, marker);
sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
s = sections.begin();
while (s != sections.end()) {
@@ -4309,6 +4309,27 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
}
/*!
+ Output the "Inherit by" list for the QML element,
+ if it is inherited by any other elements.
+ */
+void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn,
+ CodeMarker* marker)
+{
+ if (cn) {
+ NodeList subs;
+ QmlClassNode::subclasses(cn->name(),subs);
+ if (!subs.isEmpty()) {
+ //subs.sort();
+ Text text;
+ text << Atom::ParaLeft << "Inherited by ";
+ appendSortedNames(text,cn,subs,marker);
+ text << Atom::ParaRight;
+ generateText(text, cn, marker);
+ }
+ }
+}
+
+/*!
Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]"
line for the QML element, if there should be one.
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 369d6c3..551bead 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -185,6 +185,7 @@ class HtmlGenerator : public PageGenerator
const InnerNode *relative,
CodeMarker *marker);
void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker);
+ void generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker);
void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker);
void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker);
#endif
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index ec574f8..5357597 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1257,6 +1257,7 @@ bool TargetNode::isInnerNode() const
#ifdef QDOC_QML
bool QmlClassNode::qmlOnly = false;
+QMultiMap<QString,Node*> QmlClassNode::inheritedBy;
/*!
Constructs a Qml class node (i.e. a Fake node with the
@@ -1290,6 +1291,25 @@ 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, Node* sub)
+{
+ inheritedBy.insert(base,sub);
+}
+
+/*!
+ Loads the list \a subs with the nodes of all the subclasses of \a base.
+ */
+void QmlClassNode::subclasses(const QString& base, NodeList& subs)
+{
+ subs.clear();
+ if (inheritedBy.contains(base))
+ subs = inheritedBy.values(base);
+}
+
+/*!
Constructs a Qml basic type node (i.e. a Fake node with
the subtype QmlBasicType. The new node has the given
\a parent and \a name.
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 021a052..3798e4e 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -383,11 +383,15 @@ class QmlClassNode : public FakeNode
const ClassNode* classNode() const { return cnode; }
virtual QString fileBase() const;
+ static void addInheritedBy(const QString& base, Node* sub);
+ static void subclasses(const QString& base, NodeList& subs);
+ public:
static bool qmlOnly;
+ static QMultiMap<QString,Node*> inheritedBy;
private:
- const ClassNode* cnode;
+ const ClassNode* cnode;
};
class QmlBasicTypeNode : public FakeNode
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 555e826..fb2c3c1 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -12,14 +12,6 @@ sourceencoding = UTF-8
outputencoding = UTF-8
naturallanguage = en_US
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \
- QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \
- Qt3Support QtHelp QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
-
-edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
-edition.DesktopLight.groups = -graphicsview-api
-
qhp.projects = Qt
qhp.Qt.file = qt.qhp
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index 18b72a1..7a77f54 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -14,14 +14,6 @@ naturallanguage = zh-Hans
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \
- QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \
- Qt3Support QtHelp QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
-
-edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
-edition.DesktopLight.groups = -graphicsview-api
-
qhp.projects = Qt
qhp.Qt.file = qt.qhp
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index f7757fb..d8b9136 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -14,13 +14,6 @@ sourceencoding = UTF-8
outputencoding = UTF-8
naturallanguage = en_US
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \
- QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \
- Qt3Support QtHelp QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
-edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
-edition.DesktopLight.groups = -graphicsview-api
-
qhp.projects = Qt
qhp.Qt.file = qt.qhp