summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/generator.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-03-02 08:40:55 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-03-02 08:40:55 (GMT)
commit5363237c164667aa38433eefe8646aafee328b59 (patch)
treea14e834196a6ea467ec594246df868c2ee7fa2a0 /tools/qdoc3/generator.cpp
parentf309c1cc1b0212f1c882fca5adb0e7d7ef552de9 (diff)
downloadQt-5363237c164667aa38433eefe8646aafee328b59.zip
Qt-5363237c164667aa38433eefe8646aafee328b59.tar.gz
Qt-5363237c164667aa38433eefe8646aafee328b59.tar.bz2
qdoc: Second attempt, QML doc stuff.
This change caused a crash on several platforms before, but not on mine, of course. It outputs a list of new QML elements on the What's New in 4.7 page, and it outputs the "Inherited by" list on each QML elemnent page for elements that are inherited by other elements. I can't see why it should crash anything, but I have included some debug output. I think the crash might have something to do with QList<T>, which qdoc3 uses heavily. If it crashes for you, please get a stack trace and the debug output.
Diffstat (limited to 'tools/qdoc3/generator.cpp')
-rw-r--r--tools/qdoc3/generator.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 6a8899a..40fd0e2 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -1186,6 +1186,35 @@ void Generator::appendSortedNames(Text& text,
}
}
+void Generator::appendSortedQmlNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker)
+{
+ NodeList::ConstIterator r;
+ QMap<QString,Text> classMap;
+ int index = 0;
+
+ qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by...";
+
+ r = subs.begin();
+ while (r != subs.end()) {
+ Text t;
+ qDebug() << " " << (*r)->name();
+ appendFullName(t, (*r), base, marker);
+ classMap[t.toString().toLower()] = t;
+ ++r;
+ }
+
+ 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;