summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-25 23:26:53 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-25 23:26:53 (GMT)
commitcbb1b29d397c063fc3bcae04c5b062f20cbd12c5 (patch)
treed89cebe45c9f6dfdcab34a95da19ee0d670e30f5 /tools/qdoc3
parented7d58f6668be4ffb5f915722dee81c864f74844 (diff)
parent9aa00de1d277763c0f7a380fde27face60e5f686 (diff)
downloadQt-cbb1b29d397c063fc3bcae04c5b062f20cbd12c5.zip
Qt-cbb1b29d397c063fc3bcae04c5b062f20cbd12c5.tar.gz
Qt-cbb1b29d397c063fc3bcae04c5b062f20cbd12c5.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: tools/qdoc3/cppcodemarker.cpp
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/cppcodemarker.cpp38
-rw-r--r--tools/qdoc3/cppcodeparser.cpp20
-rw-r--r--tools/qdoc3/node.cpp12
-rw-r--r--tools/qdoc3/node.h16
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf2
5 files changed, 73 insertions, 15 deletions
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 30ea251..c07be8b 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -1124,10 +1124,18 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
"Signals",
"signal",
"signals");
+ FastSection qmlattachedsignals(qmlClassNode,
+ "QML Attached Signals",
+ "signal",
+ "signals");
FastSection qmlmethods(qmlClassNode,
"Methods",
"method",
"methods");
+ FastSection qmlattachedmethods(qmlClassNode,
+ "QML Attached Methods",
+ "method",
+ "methods");
NodeList::ConstIterator c = qmlClassNode->childNodes().begin();
while (c != qmlClassNode->childNodes().end()) {
@@ -1146,23 +1154,35 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
}
}
else if ((*c)->type() == Node::QmlSignal) {
- insert(qmlsignals,*c,style,Okay);
+ const QmlSignalNode* sn = static_cast<const QmlSignalNode*>(*c);
+ if (sn->isAttached())
+ insert(qmlattachedsignals,*c,style,Okay);
+ else
+ insert(qmlsignals,*c,style,Okay);
}
else if ((*c)->type() == Node::QmlMethod) {
- insert(qmlmethods,*c,style,Okay);
+ const QmlMethodNode* mn = static_cast<const QmlMethodNode*>(*c);
+ if (mn->isAttached())
+ insert(qmlattachedmethods,*c,style,Okay);
+ else
+ insert(qmlmethods,*c,style,Okay);
}
++c;
}
append(sections,qmlproperties);
append(sections,qmlattachedproperties);
append(sections,qmlsignals);
+ append(sections,qmlattachedsignals);
append(sections,qmlmethods);
+ append(sections,qmlattachedmethods);
}
else if (style == Detailed) {
FastSection qmlproperties(qmlClassNode, "Property Documentation");
FastSection qmlattachedproperties(qmlClassNode,"Attached Property Documentation");
FastSection qmlsignals(qmlClassNode,"Signal Documentation");
+ FastSection qmlattachedsignals(qmlClassNode,"Attached Signal Documentation");
FastSection qmlmethods(qmlClassNode,"Method Documentation");
+ FastSection qmlattachedmethods(qmlClassNode,"Attached Method Documentation");
NodeList::ConstIterator c = qmlClassNode->childNodes().begin();
while (c != qmlClassNode->childNodes().end()) {
if ((*c)->subType() == Node::QmlPropertyGroup) {
@@ -1173,17 +1193,27 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
insert(qmlproperties,*c,style,Okay);
}
else if ((*c)->type() == Node::QmlSignal) {
- insert(qmlsignals,*c,style,Okay);
+ const QmlSignalNode* sn = static_cast<const QmlSignalNode*>(*c);
+ if (sn->isAttached())
+ insert(qmlattachedsignals,*c,style,Okay);
+ else
+ insert(qmlsignals,*c,style,Okay);
}
else if ((*c)->type() == Node::QmlMethod) {
- insert(qmlmethods,*c,style,Okay);
+ const QmlMethodNode* mn = static_cast<const QmlMethodNode*>(*c);
+ if (mn->isAttached())
+ insert(qmlattachedmethods,*c,style,Okay);
+ else
+ insert(qmlmethods,*c,style,Okay);
}
++c;
}
append(sections,qmlproperties);
append(sections,qmlattachedproperties);
append(sections,qmlsignals);
+ append(sections,qmlattachedsignals);
append(sections,qmlmethods);
+ append(sections,qmlattachedmethods);
}
}
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index ad43b2b..84ec3f4 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -91,7 +91,9 @@ QT_BEGIN_NAMESPACE
#define COMMAND_QMLATTACHEDPROPERTY Doc::alias("qmlattachedproperty")
#define COMMAND_QMLINHERITS Doc::alias("inherits")
#define COMMAND_QMLSIGNAL Doc::alias("qmlsignal")
+#define COMMAND_QMLATTACHEDSIGNAL Doc::alias("qmlattachedsignal")
#define COMMAND_QMLMETHOD Doc::alias("qmlmethod")
+#define COMMAND_QMLATTACHEDMETHOD Doc::alias("qmlattachedmethod")
#define COMMAND_QMLDEFAULT Doc::alias("default")
#endif
@@ -485,7 +487,9 @@ QSet<QString> CppCodeParser::topicCommands()
<< COMMAND_QMLPROPERTY
<< COMMAND_QMLATTACHEDPROPERTY
<< COMMAND_QMLSIGNAL
- << COMMAND_QMLMETHOD;
+ << COMMAND_QMLATTACHEDSIGNAL
+ << COMMAND_QMLMETHOD
+ << COMMAND_QMLATTACHEDMETHOD;
#else
<< COMMAND_VARIABLE;
#endif
@@ -678,7 +682,9 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return new QmlClassNode(tre->root(), names[0], classNode);
}
else if ((command == COMMAND_QMLSIGNAL) ||
- (command == COMMAND_QMLMETHOD)) {
+ (command == COMMAND_QMLMETHOD) ||
+ (command == COMMAND_QMLATTACHEDSIGNAL) ||
+ (command == COMMAND_QMLATTACHEDMETHOD)) {
QString element;
QString name;
QmlClassNode* qmlClass = 0;
@@ -687,9 +693,15 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (n && n->subType() == Node::QmlClass) {
qmlClass = static_cast<QmlClassNode*>(n);
if (command == COMMAND_QMLSIGNAL)
- return new QmlSignalNode(qmlClass,name);
+ return new QmlSignalNode(qmlClass,name,false);
+ else if (command == COMMAND_QMLATTACHEDSIGNAL)
+ return new QmlSignalNode(qmlClass,name,true);
+ else if (command == COMMAND_QMLMETHOD)
+ return new QmlMethodNode(qmlClass,name,false);
+ else if (command == COMMAND_QMLATTACHEDMETHOD)
+ return new QmlMethodNode(qmlClass,name,true);
else
- return new QmlMethodNode(qmlClass,name);
+ return 0; // never get here.
}
}
}
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index d47c478..ecb4a44 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1212,8 +1212,10 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue)
/*!
Constructor for the QML signal node.
*/
-QmlSignalNode::QmlSignalNode(QmlClassNode *parent, const QString& name)
- : LeafNode(QmlSignal, parent, name)
+QmlSignalNode::QmlSignalNode(QmlClassNode *parent,
+ const QString& name,
+ bool attached)
+ : LeafNode(QmlSignal, parent, name), att(attached)
{
// nothing.
}
@@ -1221,8 +1223,10 @@ QmlSignalNode::QmlSignalNode(QmlClassNode *parent, const QString& name)
/*!
Constructor for the QML method node.
*/
-QmlMethodNode::QmlMethodNode(QmlClassNode *parent, const QString& name)
- : LeafNode(QmlMethod, parent, name)
+QmlMethodNode::QmlMethodNode(QmlClassNode *parent,
+ const QString& name,
+ bool attached)
+ : LeafNode(QmlMethod, parent, name), att(attached)
{
// nothing.
}
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 6b19f60..3252964 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -422,19 +422,31 @@ class QmlPropertyNode : public LeafNode
class QmlSignalNode : public LeafNode
{
public:
- QmlSignalNode(QmlClassNode* parent, const QString& name);
+ QmlSignalNode(QmlClassNode* parent,
+ const QString& name,
+ bool attached);
virtual ~QmlSignalNode() { }
const QString& element() const { return parent()->name(); }
+ bool isAttached() const { return att; }
+
+ private:
+ bool att;
};
class QmlMethodNode : public LeafNode
{
public:
- QmlMethodNode(QmlClassNode* parent, const QString& name);
+ QmlMethodNode(QmlClassNode* parent,
+ const QString& name,
+ bool attached);
virtual ~QmlMethodNode() { }
const QString& element() const { return parent()->name(); }
+ bool isAttached() const { return att; }
+
+ private:
+ bool att;
};
#endif
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 0f1a776..0848beb 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -8,7 +8,7 @@ project = Qt
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.6
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtSql QtSvg \
+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