summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/atom.cpp4
-rw-r--r--tools/qdoc3/atom.h2
-rw-r--r--tools/qdoc3/codemarker.cpp12
-rw-r--r--tools/qdoc3/codemarker.h2
-rw-r--r--tools/qdoc3/cppcodemarker.cpp36
-rw-r--r--tools/qdoc3/cppcodemarker.h2
-rw-r--r--tools/qdoc3/cppcodeparser.cpp40
-rw-r--r--tools/qdoc3/doc.cpp4
-rw-r--r--tools/qdoc3/generator.cpp30
-rw-r--r--tools/qdoc3/generator.h9
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp6
-rw-r--r--tools/qdoc3/htmlgenerator.cpp126
-rw-r--r--tools/qdoc3/htmlgenerator.h14
-rw-r--r--tools/qdoc3/node.cpp44
-rw-r--r--tools/qdoc3/node.h44
-rw-r--r--tools/qdoc3/pagegenerator.cpp8
-rw-r--r--tools/qdoc3/test/qt_zh_CN.qdocconf86
-rw-r--r--tools/qdoc3/tree.cpp4
18 files changed, 262 insertions, 211 deletions
diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp
index 6920e9d..88f44ea 100644
--- a/tools/qdoc3/atom.cpp
+++ b/tools/qdoc3/atom.cpp
@@ -133,7 +133,7 @@ QString Atom::UPPERROMAN_ ("upperroman");
\value ParaLeft
\value ParaRight
\value Qml
- \value QDeclarativeText
+ \value QmlText
\value QuotationLeft
\value QuotationRight
\value RawString
@@ -210,7 +210,7 @@ static const struct {
{ "ParaRight", Atom::ParaRight },
#ifdef QDOC_QML
{ "Qml", Atom::Qml},
- { "QDeclarativeText", Atom::QDeclarativeText },
+ { "QmlText", Atom::QmlText },
#endif
{ "QuotationLeft", Atom::QuotationLeft },
{ "QuotationRight", Atom::QuotationRight },
diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h
index d13afbc..70fbae9 100644
--- a/tools/qdoc3/atom.h
+++ b/tools/qdoc3/atom.h
@@ -103,7 +103,7 @@ class Atom
ParaRight,
#ifdef QDOC_QML
Qml,
- QDeclarativeText,
+ QmlText,
#endif
QuotationLeft,
QuotationRight,
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 48e9341..15f2c2d 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -290,13 +290,13 @@ QString CodeMarker::taggedQmlNode(const Node* node)
{
QString tag;
switch (node->type()) {
- case Node::QDeclarativeProperty:
+ case Node::QmlProperty:
tag = QLatin1String("@property");
break;
- case Node::QDeclarativeSignal:
+ case Node::QmlSignal:
tag = QLatin1String("@signal");
break;
- case Node::QDeclarativeMethod:
+ case Node::QmlMethod:
tag = QLatin1String("@method");
break;
default:
@@ -369,7 +369,7 @@ void CodeMarker::insert(FastSection &fastSection,
bool inheritedMember = false;
if (!node->relates()) {
if (node->parent() != (const InnerNode*)fastSection.innerNode) {
- if (node->type() != Node::QDeclarativeProperty)
+ if (node->type() != Node::QmlProperty)
inheritedMember = true;
}
}
@@ -612,9 +612,9 @@ QString CodeMarker::macName(const Node *node, const QString &name)
#ifdef QDOC_QML
/*!
Get the list of documentation sections for the children of
- the specified QDeclarativeClassNode.
+ the specified QmlClassNode.
*/
-QList<Section> CodeMarker::qmlSections(const QDeclarativeClassNode* , SynopsisStyle )
+QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle )
{
return QList<Section>();
}
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index 9e754a2..1b21753 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -138,7 +138,7 @@ class CodeMarker
SynopsisStyle style,
Status status) = 0;
#ifdef QDOC_QML
- virtual QList<Section> qmlSections(const QDeclarativeClassNode* qmlClassNode,
+ virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
SynopsisStyle style);
#endif
virtual const Node *resolveTarget(const QString& target,
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index ff09bb7..3ff6ebe 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -145,7 +145,7 @@ QString CppCodeMarker::plainFullName(const Node *node, const Node *relative)
}
else {
QString fullName;
- for (;;) {
+ while (node) {
fullName.prepend(plainName(node));
if (node->parent() == relative || node->parent()->name().isEmpty())
break;
@@ -194,8 +194,8 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node,
synopsis = "class " + name;
break;
case Node::Function:
- case Node::QDeclarativeSignal:
- case Node::QDeclarativeMethod:
+ case Node::QmlSignal:
+ case Node::QmlMethod:
func = (const FunctionNode *) node;
if (style != SeparateList && !func->returnType().isEmpty())
synopsis = typified(func->returnType()) + " ";
@@ -355,15 +355,15 @@ QString CppCodeMarker::markedUpQmlItem(const Node* node, bool summary)
QString name = taggedQmlNode(node);
if (summary) {
name = linkTag(node,name);
- } else if (node->type() == Node::QDeclarativeProperty) {
- const QDeclarativePropertyNode* pn = static_cast<const QDeclarativePropertyNode*>(node);
+ } else if (node->type() == Node::QmlProperty) {
+ const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node);
if (pn->isAttached())
name.prepend(pn->element() + QLatin1Char('.'));
}
name = "<@name>" + name + "</@name>";
QString synopsis = name;
- if (node->type() == Node::QDeclarativeProperty) {
- const QDeclarativePropertyNode* pn = static_cast<const QDeclarativePropertyNode*>(node);
+ if (node->type() == Node::QmlProperty) {
+ const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node);
synopsis += " : " + typified(pn->dataType());
}
@@ -1108,7 +1108,7 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
Currently, it only handles QML property groups.
*/
-QList<Section> CppCodeMarker::qmlSections(const QDeclarativeClassNode* qmlClassNode,
+QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
SynopsisStyle style)
{
QList<Section> sections;
@@ -1141,12 +1141,12 @@ QList<Section> CppCodeMarker::qmlSections(const QDeclarativeClassNode* qmlClassN
NodeList::ConstIterator c = qmlClassNode->childNodes().begin();
while (c != qmlClassNode->childNodes().end()) {
- if ((*c)->subType() == Node::QDeclarativePropertyGroup) {
- const QDeclarativePropGroupNode* qpgn = static_cast<const QDeclarativePropGroupNode*>(*c);
+ if ((*c)->subType() == Node::QmlPropertyGroup) {
+ const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(*c);
NodeList::ConstIterator p = qpgn->childNodes().begin();
while (p != qpgn->childNodes().end()) {
- if ((*p)->type() == Node::QDeclarativeProperty) {
- const QDeclarativePropertyNode* pn = static_cast<const QDeclarativePropertyNode*>(*p);
+ if ((*p)->type() == Node::QmlProperty) {
+ const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(*p);
if (pn->isAttached())
insert(qmlattachedproperties,*p,style,Okay);
else
@@ -1155,14 +1155,14 @@ QList<Section> CppCodeMarker::qmlSections(const QDeclarativeClassNode* qmlClassN
++p;
}
}
- else if ((*c)->type() == Node::QDeclarativeSignal) {
+ else if ((*c)->type() == Node::QmlSignal) {
const FunctionNode* sn = static_cast<const FunctionNode*>(*c);
if (sn->isAttached())
insert(qmlattachedsignals,*c,style,Okay);
else
insert(qmlsignals,*c,style,Okay);
}
- else if ((*c)->type() == Node::QDeclarativeMethod) {
+ else if ((*c)->type() == Node::QmlMethod) {
const FunctionNode* mn = static_cast<const FunctionNode*>(*c);
if (mn->isAttached())
insert(qmlattachedmethods,*c,style,Okay);
@@ -1187,21 +1187,21 @@ QList<Section> CppCodeMarker::qmlSections(const QDeclarativeClassNode* qmlClassN
FastSection qmlattachedmethods(qmlClassNode,"Attached Method Documentation");
NodeList::ConstIterator c = qmlClassNode->childNodes().begin();
while (c != qmlClassNode->childNodes().end()) {
- if ((*c)->subType() == Node::QDeclarativePropertyGroup) {
- const QDeclarativePropGroupNode* pgn = static_cast<const QDeclarativePropGroupNode*>(*c);
+ if ((*c)->subType() == Node::QmlPropertyGroup) {
+ const QmlPropGroupNode* pgn = static_cast<const QmlPropGroupNode*>(*c);
if (pgn->isAttached())
insert(qmlattachedproperties,*c,style,Okay);
else
insert(qmlproperties,*c,style,Okay);
}
- else if ((*c)->type() == Node::QDeclarativeSignal) {
+ else if ((*c)->type() == Node::QmlSignal) {
const FunctionNode* sn = static_cast<const FunctionNode*>(*c);
if (sn->isAttached())
insert(qmlattachedsignals,*c,style,Okay);
else
insert(qmlsignals,*c,style,Okay);
}
- else if ((*c)->type() == Node::QDeclarativeMethod) {
+ else if ((*c)->type() == Node::QmlMethod) {
const FunctionNode* mn = static_cast<const FunctionNode*>(*c);
if (mn->isAttached())
insert(qmlattachedmethods,*c,style,Okay);
diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h
index 2f6471a..2dcf400 100644
--- a/tools/qdoc3/cppcodemarker.h
+++ b/tools/qdoc3/cppcodemarker.h
@@ -79,7 +79,7 @@ class CppCodeMarker : public CodeMarker
QList<Section> sections(const InnerNode *innerNode,
SynopsisStyle style,
Status status);
- QList<Section> qmlSections(const QDeclarativeClassNode* qmlClassNode,
+ QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
SynopsisStyle style);
const Node *resolveTarget(const QString& target,
const Tree *tree,
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 4d30f3a..021d64a 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -728,7 +728,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (n)
classNode = static_cast<const ClassNode*>(n);
}
- return new QDeclarativeClassNode(tre->root(), names[0], classNode);
+ return new QmlClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
#if 0
@@ -738,11 +738,11 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake));
if (pageNode) {
qDebug() << "FOUND";
- return new QDeclarativeBasicTypeNode(pageNode, parts[0]);
+ return new QmlBasicTypeNode(pageNode, parts[0]);
}
}
#endif
- return new QDeclarativeBasicTypeNode(tre->root(), arg);
+ return new QmlBasicTypeNode(tre->root(), arg);
}
else if ((command == COMMAND_QMLSIGNAL) ||
(command == COMMAND_QMLMETHOD) ||
@@ -750,19 +750,19 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
(command == COMMAND_QMLATTACHEDMETHOD)) {
QString element;
QString type;
- QDeclarativeClassNode* qmlClass = 0;
+ QmlClassNode* qmlClass = 0;
if (splitQmlMethodArg(doc,arg,type,element)) {
Node* n = tre->findNode(QStringList(element),Node::Fake);
- if (n && n->subType() == Node::QDeclarativeClass) {
- qmlClass = static_cast<QDeclarativeClassNode*>(n);
+ if (n && n->subType() == Node::QmlClass) {
+ qmlClass = static_cast<QmlClassNode*>(n);
if (command == COMMAND_QMLSIGNAL)
- return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeSignal,false,COMMAND_QMLSIGNAL);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QmlSignal,false,COMMAND_QMLSIGNAL);
else if (command == COMMAND_QMLATTACHEDSIGNAL)
- return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeSignal,true,COMMAND_QMLATTACHEDSIGNAL);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QmlSignal,true,COMMAND_QMLATTACHEDSIGNAL);
else if (command == COMMAND_QMLMETHOD)
- return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeMethod,false,COMMAND_QMLMETHOD);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QmlMethod,false,COMMAND_QMLMETHOD);
else if (command == COMMAND_QMLATTACHEDMETHOD)
- return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeMethod,true,COMMAND_QMLATTACHEDMETHOD);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QmlMethod,true,COMMAND_QMLATTACHEDMETHOD);
else
return 0; // never get here.
}
@@ -850,7 +850,7 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
const QString& command,
const QStringList& args)
{
- QDeclarativePropGroupNode* qmlPropGroup = 0;
+ QmlPropGroupNode* qmlPropGroup = 0;
if ((command == COMMAND_QMLPROPERTY) ||
(command == COMMAND_QMLATTACHEDPROPERTY)) {
QString type;
@@ -860,20 +860,20 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
QStringList::ConstIterator arg = args.begin();
if (splitQmlPropertyArg(doc,(*arg),type,element,property)) {
Node* n = tre->findNode(QStringList(element),Node::Fake);
- if (n && n->subType() == Node::QDeclarativeClass) {
- QDeclarativeClassNode* qmlClass = static_cast<QDeclarativeClassNode*>(n);
+ if (n && n->subType() == Node::QmlClass) {
+ QmlClassNode* qmlClass = static_cast<QmlClassNode*>(n);
if (qmlClass)
- qmlPropGroup = new QDeclarativePropGroupNode(qmlClass,
+ qmlPropGroup = new QmlPropGroupNode(qmlClass,
property,
attached);
}
}
if (qmlPropGroup) {
- const ClassNode *correspondingClass = static_cast<const QDeclarativeClassNode*>(qmlPropGroup->parent())->classNode();
+ const ClassNode *correspondingClass = static_cast<const QmlClassNode*>(qmlPropGroup->parent())->classNode();
PropertyNode *correspondingProperty = 0;
if (correspondingClass)
correspondingProperty = static_cast<PropertyNode*>((Node*)correspondingClass->findNode(property, Node::Property));
- QDeclarativePropertyNode *qmlPropNode = new QDeclarativePropertyNode(qmlPropGroup,property,type,attached);
+ QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup,property,type,attached);
if (correspondingProperty) {
bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*');
qmlPropNode->setWritable(writableList || correspondingProperty->isWritable());
@@ -881,7 +881,7 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
++arg;
while (arg != args.end()) {
if (splitQmlPropertyArg(doc,(*arg),type,element,property)) {
- QDeclarativePropertyNode* qmlPropNode = new QDeclarativePropertyNode(qmlPropGroup,
+ QmlPropertyNode* qmlPropNode = new QmlPropertyNode(qmlPropGroup,
property,
type,
attached);
@@ -1033,12 +1033,12 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
#ifdef QDOC_QML
else if (command == COMMAND_QMLINHERITS) {
setLink(node, Node::InheritsLink, arg);
- if (node->subType() == Node::QDeclarativeClass) {
- QDeclarativeClassNode::addInheritedBy(arg,node);
+ if (node->subType() == Node::QmlClass) {
+ QmlClassNode::addInheritedBy(arg,node->name());
}
}
else if (command == COMMAND_QMLDEFAULT) {
- QDeclarativePropGroupNode* qpgn = static_cast<QDeclarativePropGroupNode*>(node);
+ QmlPropGroupNode* qpgn = static_cast<QmlPropGroupNode*>(node);
qpgn->setDefault();
}
#endif
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 78b5d1f..ad4cdde 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -553,7 +553,7 @@ void DocParser::parse(const QString& source,
append(Atom::Qml, getCode(CMD_QML, marker));
break;
case CMD_QMLTEXT:
- append(Atom::QDeclarativeText);
+ append(Atom::QmlText);
break;
#endif
case CMD_CODELINE:
@@ -2842,7 +2842,7 @@ void Doc::initialize(const Config& config)
DocParser::quoting = config.getBool(CONFIG_QUOTINGINFORMATION);
#ifdef QDOC_QML
- QDeclarativeClassNode::qmlOnly = config.getBool(CONFIG_QMLONLY);
+ QmlClassNode::qmlOnly = config.getBool(CONFIG_QMLONLY);
#endif
QStringMap reverseAliasMap;
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 8766696..6a8899a 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -301,7 +301,7 @@ bool Generator::generateQmlText(const Text& text,
startText(relative, marker);
while (atom) {
- if (atom->type() != Atom::QDeclarativeText)
+ if (atom->type() != Atom::QmlText)
atom = atom->next();
else {
atom = atom->next();
@@ -520,7 +520,7 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
#ifdef QDOC_QML
/*!
*/
-void Generator::generateQmlInherits(const QDeclarativeClassNode* , CodeMarker* )
+void Generator::generateQmlInherits(const QmlClassNode* , CodeMarker* )
{
// stub.
}
@@ -1186,32 +1186,6 @@ 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 8e8eed8..44f56e2 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -101,7 +101,7 @@ class Generator
const Node *relative,
CodeMarker *marker,
const QString& qmlName);
- virtual void generateQmlInherits(const QDeclarativeClassNode* cn,
+ virtual void generateQmlInherits(const QmlClassNode* cn,
CodeMarker* marker);
#endif
virtual void generateBody(const Node *node, CodeMarker *marker);
@@ -169,13 +169,6 @@ 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/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index 628fd0f..2189e02 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -127,7 +127,7 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
subTypeHash["page"] = Node::Page;
subTypeHash["externalpage"] = Node::ExternalPage;
#ifdef QDOC_QML
- subTypeHash["qmlclass"] = Node::QDeclarativeClass;
+ subTypeHash["qmlclass"] = Node::QmlClass;
#endif
QSet<Node::SubType> allSubTypes = QSet<Node::SubType>::fromList(subTypeHash.values());
@@ -188,8 +188,8 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const
} else if (node->type() == Node::Fake) {
const FakeNode *fake = static_cast<const FakeNode *>(node);
#ifdef QDOC_QML
- if (fake->subType() == Node::QDeclarativeClass) {
- details << (QDeclarativeClassNode::qmlOnly ? fake->name() : fake->fullTitle());
+ if (fake->subType() == Node::QmlClass) {
+ details << (QmlClassNode::qmlOnly ? fake->name() : fake->fullTitle());
details << "QML." + fake->name();
} else
#endif
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 7db5828..e767460 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -73,7 +73,6 @@ QString HtmlGenerator::sinceTitles[] =
" New Typedefs",
" New Properties",
" New Variables",
- " New QML Elements",
" New Qml Properties",
" New Qml Signals",
" New Qml Methods",
@@ -688,8 +687,6 @@ 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;
@@ -700,10 +697,6 @@ 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::QDeclarativeClass)
- sections[QDeclarativeClass].appendMember((Node*)node);
- break;
case Node::Namespace:
sections[Namespace].appendMember((Node*)node);
break;
@@ -745,14 +738,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Node::Variable:
sections[Variable].appendMember((Node*)node);
break;
- case Node::QDeclarativeProperty:
- sections[QDeclarativeProperty].appendMember((Node*)node);
+ case Node::QmlProperty:
+ sections[QmlProperty].appendMember((Node*)node);
break;
- case Node::QDeclarativeSignal:
- sections[QDeclarativeSignal].appendMember((Node*)node);
+ case Node::QmlSignal:
+ sections[QmlSignal].appendMember((Node*)node);
break;
- case Node::QDeclarativeMethod:
- sections[QDeclarativeMethod].appendMember((Node*)node);
+ case Node::QmlMethod:
+ sections[QmlMethod].appendMember((Node*)node);
break;
default:
break;
@@ -789,8 +782,6 @@ 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 == QDeclarativeClass)
- generateCompactList(0, marker, nqcmap.value(), QString("Q"));
else if (idx == MemberFunction) {
ParentMaps parentmaps;
ParentMaps::iterator pmap;
@@ -1190,7 +1181,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< "</code></b></font>";
break;
#ifdef QDOC_QML
- case Atom::QDeclarativeText:
+ case Atom::QmlText:
case Atom::EndQmlText:
// don't do anything with these. They are just tags.
break;
@@ -1453,7 +1444,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
subTitleSize = SmallSubTitle;
htmlTitle += " (" + fake->subTitle() + ")";
}
- else if (fake->subType() == Node::QDeclarativeBasicType) {
+ else if (fake->subType() == Node::QmlBasicType) {
fullTitle = "QML Basic Type: " + fullTitle;
htmlTitle = fullTitle;
}
@@ -1527,8 +1518,8 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
}
}
#ifdef QDOC_QML
- else if (fake->subType() == Node::QDeclarativeClass) {
- const QDeclarativeClassNode* qml_cn = static_cast<const QDeclarativeClassNode*>(fake);
+ else if (fake->subType() == Node::QmlClass) {
+ const QmlClassNode* qml_cn = static_cast<const QmlClassNode*>(fake);
const ClassNode* cn = qml_cn->classNode();
generateQmlInherits(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
@@ -2341,11 +2332,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "<a href=\""
<< linkForNode(it.value(), relative)
<< "\">";
- QStringList pieces;
- if (it.value()->subType() == Node::QDeclarativeClass)
- pieces << it.value()->name();
- else
- pieces = fullName(it.value(), relative, marker).split("::");
+ QStringList pieces = fullName(it.value(), relative, marker).split("::");
out() << protectEnc(pieces.last());
out() << "</a>";
if (pieces.size() > 1) {
@@ -3507,18 +3494,18 @@ QString HtmlGenerator::refForNode(const Node *node)
break;
#ifdef QDOC_QML
case Node::Fake:
- if (node->subType() != Node::QDeclarativePropertyGroup)
+ if (node->subType() != Node::QmlPropertyGroup)
break;
- case Node::QDeclarativeProperty:
+ case Node::QmlProperty:
#endif
case Node::Property:
ref = node->name() + "-prop";
break;
#ifdef QDOC_QML
- case Node::QDeclarativeSignal:
+ case Node::QmlSignal:
ref = node->name() + "-signal";
break;
- case Node::QDeclarativeMethod:
+ case Node::QmlMethod:
ref = node->name() + "-method";
break;
#endif
@@ -3555,7 +3542,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative)
#endif
link += fn;
- if (!node->isInnerNode() || node->subType() == Node::QDeclarativePropertyGroup) {
+ if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) {
ref = refForNode(node);
if (relative && fn == fileName(relative) && ref == refForNode(relative))
return QString();
@@ -3736,9 +3723,6 @@ 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);
@@ -3758,15 +3742,6 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
nsmap.value().insert(className,(*child));
ncmap.value().insert(className,(*child));
}
- else if ((*child)->subType() == Node::QDeclarativeClass) {
- 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));
- }
}
else {
QString name = (*child)->name();
@@ -3865,9 +3840,9 @@ void HtmlGenerator::findAllQmlClasses(const InnerNode *node)
while (c != node->childNodes().constEnd()) {
if ((*c)->type() == Node::Fake) {
const FakeNode* fakeNode = static_cast<const FakeNode *>(*c);
- if (fakeNode->subType() == Node::QDeclarativeClass) {
- const QDeclarativeClassNode* qmlNode =
- static_cast<const QDeclarativeClassNode*>(fakeNode);
+ if (fakeNode->subType() == Node::QmlClass) {
+ const QmlClassNode* qmlNode =
+ static_cast<const QmlClassNode*>(fakeNode);
const Node* n = qmlNode->classNode();
}
qmlClasses.insert(fakeNode->name(),*c);
@@ -4203,7 +4178,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
NodeList::ConstIterator m;
int count = section.members.size();
bool twoColumn = false;
- if (section.members.first()->type() == Node::QDeclarativeProperty) {
+ if (section.members.first()->type() == Node::QmlProperty) {
twoColumn = (count >= 5);
}
if (twoColumn)
@@ -4237,18 +4212,18 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
const InnerNode *relative,
CodeMarker *marker)
{
- const QDeclarativePropertyNode* qpn = 0;
+ const QmlPropertyNode* qpn = 0;
generateMacRef(node, marker);
out() << "<div class=\"qmlitem\">";
- if (node->subType() == Node::QDeclarativePropertyGroup) {
- const QDeclarativePropGroupNode* qpgn = static_cast<const QDeclarativePropGroupNode*>(node);
+ if (node->subType() == Node::QmlPropertyGroup) {
+ const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
NodeList::ConstIterator p = qpgn->childNodes().begin();
out() << "<div class=\"qmlproto\">";
out() << "<table width=\"100%\" class=\"qmlname\">";
while (p != qpgn->childNodes().end()) {
- if ((*p)->type() == Node::QDeclarativeProperty) {
- qpn = static_cast<const QDeclarativePropertyNode*>(*p);
+ if ((*p)->type() == Node::QmlProperty) {
+ qpn = static_cast<const QmlPropertyNode*>(*p);
out() << "<tr><td>";
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
if (!qpn->isWritable())
@@ -4270,7 +4245,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "</table>";
out() << "</div>";
}
- else if (node->type() == Node::QDeclarativeSignal) {
+ else if (node->type() == Node::QmlSignal) {
const FunctionNode* qsn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
@@ -4282,7 +4257,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "</table>";
out() << "</div>";
}
- else if (node->type() == Node::QDeclarativeMethod) {
+ else if (node->type() == Node::QmlMethod) {
const FunctionNode* qmn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
@@ -4307,7 +4282,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
Output the "Inherits" line for the QML element,
if there should be one.
*/
-void HtmlGenerator::generateQmlInherits(const QDeclarativeClassNode* cn,
+void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
CodeMarker* marker)
{
if (cn && !cn->links().empty()) {
@@ -4316,8 +4291,8 @@ void HtmlGenerator::generateQmlInherits(const QDeclarativeClassNode* cn,
linkPair = cn->links()[Node::InheritsLink];
QStringList strList(linkPair.first);
const Node* n = myTree->findNode(strList,Node::Fake);
- if (n && n->subType() == Node::QDeclarativeClass) {
- const QDeclarativeClassNode* qcn = static_cast<const QDeclarativeClassNode*>(n);
+ if (n && n->subType() == Node::QmlClass) {
+ const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
out() << "<p style=\"text-align: center\">";
Text text;
text << "[Inherits ";
@@ -4337,30 +4312,55 @@ void HtmlGenerator::generateQmlInherits(const QDeclarativeClassNode* cn,
Output the "Inherit by" list for the QML element,
if it is inherited by any other elements.
*/
-void HtmlGenerator::generateQmlInheritedBy(const QDeclarativeClassNode* cn,
+void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn,
CodeMarker* marker)
{
if (cn) {
- NodeList subs;
- QDeclarativeClassNode::subclasses(cn->name(),subs);
+ QStringList subs;
+ QmlClassNode::subclasses(cn->name(),subs);
if (!subs.isEmpty()) {
+ subs.sort();
Text text;
text << Atom::ParaLeft << "Inherited by ";
- appendSortedNames(text,cn,subs,marker);
+ for (int i = 0; i < subs.size(); ++i) {
+ text << subs.at(i);
+ text << separator(i, subs.size());
+ }
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
}
}
/*!
- Output the "[Xxx instantiates the C++ class QDeclarativeXxx]"
+ Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]"
line for the QML element, if there should be one.
If there is no class node, or if the class node status
is set to Node::Internal, do nothing.
*/
-void HtmlGenerator::generateQmlInstantiates(const QDeclarativeClassNode* qcn,
+void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
CodeMarker* marker)
{
const ClassNode* cn = qcn->classNode();
@@ -4384,7 +4384,7 @@ void HtmlGenerator::generateQmlInstantiates(const QDeclarativeClassNode* qcn,
}
/*!
- Output the "[QDeclarativeXxx is instantiated by QML element Xxx]"
+ Output the "[QmlGraphicsXxx is instantiated by QML element Xxx]"
line for the class, if there should be one.
If there is no QML element, or if the class node status
@@ -4395,7 +4395,7 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
{
if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) {
const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake);
- if (n && n->subType() == Node::QDeclarativeClass) {
+ if (n && n->subType() == Node::QmlClass) {
out() << "<p style=\"text-align: center\">";
Text text;
text << "[";
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 42c94cd..551bead 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -90,10 +90,9 @@ class HtmlGenerator : public PageGenerator
Typedef,
Property,
Variable,
- QDeclarativeClass,
- QDeclarativeProperty,
- QDeclarativeSignal,
- QDeclarativeMethod,
+ QmlProperty,
+ QmlSignal,
+ QmlMethod,
LastSinceType
};
@@ -185,9 +184,9 @@ class HtmlGenerator : public PageGenerator
void generateDetailedQmlMember(const Node *node,
const InnerNode *relative,
CodeMarker *marker);
- void generateQmlInherits(const QDeclarativeClassNode* cn, CodeMarker* marker);
- void generateQmlInheritedBy(const QDeclarativeClassNode* cn, CodeMarker* marker);
- void generateQmlInstantiates(const QDeclarativeClassNode* qcn, 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
#ifdef QDOC_NAME_ALIGNMENT
@@ -327,7 +326,6 @@ class HtmlGenerator : public PageGenerator
NewSinceMaps newSinceMaps;
static QString sinceTitles[];
NewClassMaps newClassMaps;
- NewClassMaps newQmlClassMaps;
static int id;
};
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 0ceda39..4ddcfb1 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -580,7 +580,7 @@ bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2)
void InnerNode::addChild(Node *child)
{
children.append(child);
- if ((child->type() == Function) || (child->type() == QDeclarativeMethod)) {
+ if ((child->type() == Function) || (child->type() == QmlMethod)) {
FunctionNode *func = (FunctionNode *) child;
if (!primaryFunctionMap.contains(func->name())) {
primaryFunctionMap.insert(func->name(), func);
@@ -806,8 +806,8 @@ FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype)
case Group:
setPageType(ArticlePage);
break;
- case QDeclarativeClass:
- case QDeclarativeBasicType:
+ case QmlClass:
+ case QmlBasicType:
setPageType(ApiPage);
break;
case Example:
@@ -1256,20 +1256,20 @@ bool TargetNode::isInnerNode() const
}
#ifdef QDOC_QML
-bool QDeclarativeClassNode::qmlOnly = false;
-QMultiMap<QString,Node*> QDeclarativeClassNode::inheritedBy;
+bool QmlClassNode::qmlOnly = false;
+QMultiMap<QString,QString> QmlClassNode::inheritedBy;
/*!
Constructs a Qml class node (i.e. a Fake node with the
- subtype QDeclarativeClass. The new node has the given \a parent
+ subtype QmlClass. The new node has the given \a parent
and \a name and is associated with the C++ class node
specified by \a cn which may be null if the the Qml
class node is not associated with a C++ class node.
*/
-QDeclarativeClassNode::QDeclarativeClassNode(InnerNode *parent,
+QmlClassNode::QmlClassNode(InnerNode *parent,
const QString& name,
const ClassNode* cn)
- : FakeNode(parent, name, QDeclarativeClass), cnode(cn)
+ : FakeNode(parent, name, QmlClass), cnode(cn)
{
setTitle((qmlOnly ? "" : "QML ") + name + " Element Reference");
}
@@ -1280,7 +1280,7 @@ QDeclarativeClassNode::QDeclarativeClassNode(InnerNode *parent,
But not yet. Still testing.
*/
-QString QDeclarativeClassNode::fileBase() const
+QString QmlClassNode::fileBase() const
{
#if 0
if (Node::fileBase() == "item")
@@ -1294,15 +1294,15 @@ QString QDeclarativeClassNode::fileBase() const
Record the fact that QML class \a base is inherited by
QML class \a sub.
*/
-void QDeclarativeClassNode::addInheritedBy(const QString& base, Node* sub)
+void QmlClassNode::addInheritedBy(const QString& base, const QString& sub)
{
inheritedBy.insert(base,sub);
}
/*!
- Loads the list \a subs with the nodes of all the subclasses of \a base.
+ Loads the list \a subs with the names of all the subclasses of \a base.
*/
-void QDeclarativeClassNode::subclasses(const QString& base, NodeList& subs)
+void QmlClassNode::subclasses(const QString& base, QStringList& subs)
{
subs.clear();
if (inheritedBy.contains(base))
@@ -1311,24 +1311,24 @@ void QDeclarativeClassNode::subclasses(const QString& base, NodeList& subs)
/*!
Constructs a Qml basic type node (i.e. a Fake node with
- the subtype QDeclarativeBasicType. The new node has the given
+ the subtype QmlBasicType. The new node has the given
\a parent and \a name.
*/
-QDeclarativeBasicTypeNode::QDeclarativeBasicTypeNode(InnerNode *parent,
+QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent,
const QString& name)
- : FakeNode(parent, name, QDeclarativeBasicType)
+ : FakeNode(parent, name, QmlBasicType)
{
setTitle(name);
}
/*!
Constructor for the Qml property group node. \a parent is
- always a QDeclarativeClassNode.
+ always a QmlClassNode.
*/
-QDeclarativePropGroupNode::QDeclarativePropGroupNode(QDeclarativeClassNode* parent,
+QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent,
const QString& name,
bool attached)
- : FakeNode(parent, name, QDeclarativePropertyGroup),
+ : FakeNode(parent, name, QmlPropertyGroup),
isdefault(false),
att(attached)
{
@@ -1338,11 +1338,11 @@ QDeclarativePropGroupNode::QDeclarativePropGroupNode(QDeclarativeClassNode* pare
/*!
Constructor for the QML property node.
*/
-QDeclarativePropertyNode::QDeclarativePropertyNode(QDeclarativePropGroupNode *parent,
+QmlPropertyNode::QmlPropertyNode(QmlPropGroupNode *parent,
const QString& name,
const QString& type,
bool attached)
- : LeafNode(QDeclarativeProperty, parent, name),
+ : LeafNode(QmlProperty, parent, name),
dt(type),
sto(Trool_Default),
des(Trool_Default),
@@ -1354,7 +1354,7 @@ QDeclarativePropertyNode::QDeclarativePropertyNode(QDeclarativePropGroupNode *pa
/*!
I don't know what this is.
*/
-QDeclarativePropertyNode::Trool QDeclarativePropertyNode::toTrool(bool boolean)
+QmlPropertyNode::Trool QmlPropertyNode::toTrool(bool boolean)
{
return boolean ? Trool_True : Trool_False;
}
@@ -1362,7 +1362,7 @@ QDeclarativePropertyNode::Trool QDeclarativePropertyNode::toTrool(bool boolean)
/*!
I don't know what this is either.
*/
-bool QDeclarativePropertyNode::fromTrool(Trool troolean, bool defaultValue)
+bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue)
{
switch (troolean) {
case Trool_True:
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 5300efc..de26025 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -74,9 +74,9 @@ class Node
Variable,
#ifdef QDOC_QML
Target,
- QDeclarativeProperty,
- QDeclarativeSignal,
- QDeclarativeMethod,
+ QmlProperty,
+ QmlSignal,
+ QmlMethod,
LastType
#else
Target,
@@ -95,9 +95,9 @@ class Node
Page,
#ifdef QDOC_QML
ExternalPage,
- QDeclarativeClass,
- QDeclarativePropertyGroup,
- QDeclarativeBasicType
+ QmlClass,
+ QmlPropertyGroup,
+ QmlBasicType
#else
ExternalPage
#endif
@@ -373,42 +373,42 @@ class FakeNode : public InnerNode
};
#ifdef QDOC_QML
-class QDeclarativeClassNode : public FakeNode
+class QmlClassNode : public FakeNode
{
public:
- QDeclarativeClassNode(InnerNode *parent,
+ QmlClassNode(InnerNode *parent,
const QString& name,
const ClassNode* cn);
- virtual ~QDeclarativeClassNode() { }
+ virtual ~QmlClassNode() { }
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);
+ static void addInheritedBy(const QString& base, const QString& sub);
+ static void subclasses(const QString& base, QStringList& subs);
public:
static bool qmlOnly;
- static QMultiMap<QString,Node*> inheritedBy;
+ static QMultiMap<QString,QString> inheritedBy;
private:
const ClassNode* cnode;
};
-class QDeclarativeBasicTypeNode : public FakeNode
+class QmlBasicTypeNode : public FakeNode
{
public:
- QDeclarativeBasicTypeNode(InnerNode *parent,
+ QmlBasicTypeNode(InnerNode *parent,
const QString& name);
- virtual ~QDeclarativeBasicTypeNode() { }
+ virtual ~QmlBasicTypeNode() { }
};
-class QDeclarativePropGroupNode : public FakeNode
+class QmlPropGroupNode : public FakeNode
{
public:
- QDeclarativePropGroupNode(QDeclarativeClassNode* parent,
+ QmlPropGroupNode(QmlClassNode* parent,
const QString& name,
bool attached);
- virtual ~QDeclarativePropGroupNode() { }
+ virtual ~QmlPropGroupNode() { }
const QString& element() const { return parent()->name(); }
void setDefault() { isdefault = true; }
@@ -420,14 +420,14 @@ class QDeclarativePropGroupNode : public FakeNode
bool att;
};
-class QDeclarativePropertyNode : public LeafNode
+class QmlPropertyNode : public LeafNode
{
public:
- QDeclarativePropertyNode(QDeclarativePropGroupNode* parent,
+ QmlPropertyNode(QmlPropGroupNode* parent,
const QString& name,
const QString& type,
bool attached);
- virtual ~QDeclarativePropertyNode() { }
+ virtual ~QmlPropertyNode() { }
void setDataType(const QString& dataType) { dt = dataType; }
void setStored(bool stored) { sto = toTrool(stored); }
@@ -441,7 +441,7 @@ class QDeclarativePropertyNode : public LeafNode
bool isWritable() const { return fromTrool(wri,true); }
bool isAttached() const { return att; }
- const QString& element() const { return static_cast<QDeclarativePropGroupNode*>(parent())->element(); }
+ const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); }
private:
enum Trool { Trool_True, Trool_False, Trool_Default };
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index f129d3a..2cad9ed 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -84,7 +84,7 @@ QString PageGenerator::fileBase(const Node *node) const
else if (!node->isInnerNode())
node = node->parent();
#ifdef QDOC_QML
- if (node->subType() == Node::QDeclarativePropertyGroup) {
+ if (node->subType() == Node::QmlPropertyGroup) {
node = node->parent();
}
#endif
@@ -104,8 +104,8 @@ QString PageGenerator::fileBase(const Node *node) const
we prepend "qml-" to the file name of QML element doc
files.
*/
- if ((p->subType() == Node::QDeclarativeClass) ||
- (p->subType() == Node::QDeclarativeBasicType)) {
+ if ((p->subType() == Node::QmlClass) ||
+ (p->subType() == Node::QmlBasicType)) {
base.prepend("qml-");
}
#endif
@@ -207,7 +207,7 @@ void PageGenerator::generateInnerNode(const InnerNode *node,
if (fakeNode->subType() == Node::ExternalPage)
return;
#ifdef QDOC_QML
- if (fakeNode->subType() == Node::QDeclarativePropertyGroup)
+ if (fakeNode->subType() == Node::QmlPropertyGroup)
return;
#endif
if (fakeNode->subType() == Node::Page) {
diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf
new file mode 100644
index 0000000..8c7e64a
--- /dev/null
+++ b/tools/qdoc3/test/qt_zh_CN.qdocconf
@@ -0,0 +1,86 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates_zh_CN.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+versionsym =
+version = %VERSION%
+description = Qt Reference Documentation
+url = http://qt.nokia.com/doc/zh_CN/4.7
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = zh-Hans
+
+indexes = $QTDIR/doc/html/qt.index
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.470
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.title = 教程
+qhp.Qt.indexTitle = 教程
+qhp.Qt.selectors = fake:example
+
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = classic.css \
+ images/qt-logo.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ images/stylesheet-coffee-plastique.png
+
+language = Cpp
+
+sourcedirs = $QTDIR/doc/src/zh_CN
+
+excludedirs = $QTDIR/src/3rdparty/clucene \
+ $QTDIR/src/3rdparty/des \
+ $QTDIR/src/3rdparty/freetype \
+ $QTDIR/src/3rdparty/harfbuzz \
+ $QTDIR/src/3rdparty/kdebase \
+ $QTDIR/src/3rdparty/libjpeg \
+ $QTDIR/src/3rdparty/libmng \
+ $QTDIR/src/3rdparty/libpng \
+ $QTDIR/src/3rdparty/libtiff \
+ $QTDIR/src/3rdparty/md4 \
+ $QTDIR/src/3rdparty/md5 \
+ $QTDIR/src/3rdparty/patches \
+ $QTDIR/src/3rdparty/sha1 \
+ $QTDIR/src/3rdparty/sqlite \
+ $QTDIR/src/3rdparty/webkit/JavaScriptCore \
+ $QTDIR/src/3rdparty/webkit/WebCore \
+ $QTDIR/src/3rdparty/wintab \
+ $QTDIR/src/3rdparty/zlib \
+ $QTDIR/doc/src/snippets \
+ $QTDIR/src/3rdparty/phonon/gstreamer \
+ $QTDIR/src/3rdparty/phonon/ds9 \
+ $QTDIR/src/3rdparty/phonon/qt7 \
+ $QTDIR/src/3rdparty/phonon/mmf \
+ $QTDIR/src/3rdparty/phonon/waveout
+
+sources.fileextensions = "*.cpp *.qdoc *.mm"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.imageextensions = "*.png"
+
+exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples \
+ $QTDIR/examples/tutorials \
+ $QTDIR \
+ $QTDIR/qmake/examples \
+ $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples
+outputdir = $QTDIR/doc/html_zh_CN
+tagfile = $QTDIR/doc/html_zh_CN/qt.tags
+base = file:$QTDIR/doc/html_zh_CN
+
+HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 96af8d6..6c2502d 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -1914,8 +1914,8 @@ QString Tree::fullDocumentLocation(const Node *node) const
}
else if (node->type() == Node::Fake) {
#ifdef QDOC_QML
- if ((node->subType() == Node::QDeclarativeClass) ||
- (node->subType() == Node::QDeclarativeBasicType))
+ if ((node->subType() == Node::QmlClass) ||
+ (node->subType() == Node::QmlBasicType))
return "qml-" + node->fileBase() + ".html";
else
#endif