summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-04-23 01:50:48 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-04-23 01:50:48 (GMT)
commit28cec90fd8740f1d47010d99699f86ac014e9926 (patch)
treed3ff8dd0eec3bf5c6536960650490cb4cc382396 /tools
parent0e8b82bc7b9b0d88e8cc4a4d293851795d35950a (diff)
downloadQt-28cec90fd8740f1d47010d99699f86ac014e9926.zip
Qt-28cec90fd8740f1d47010d99699f86ac014e9926.tar.gz
Qt-28cec90fd8740f1d47010d99699f86ac014e9926.tar.bz2
Merge in changes to old kinetic-dui branch.
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp21
-rw-r--r--tools/qdoc3/htmlgenerator.cpp7
-rw-r--r--tools/qdoc3/node.cpp2
-rw-r--r--tools/qdoc3/node.h9
4 files changed, 31 insertions, 8 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 92d6cf9..e271590 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -90,6 +90,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_QMLINHERITS Doc::alias("inherits")
#define COMMAND_QMLSIGNAL Doc::alias("qmlsignal")
#define COMMAND_QMLMETHOD Doc::alias("qmlmethod")
+#define COMMAND_QMLDEFAULT Doc::alias("default")
#endif
QStringList CppCodeParser::exampleFiles;
@@ -820,7 +821,8 @@ QSet<QString> CppCodeParser::otherMetaCommands()
<< COMMAND_INDEXPAGE
#ifdef QDOC_QML
<< COMMAND_STARTPAGE
- << COMMAND_QMLINHERITS;
+ << COMMAND_QMLINHERITS
+ << COMMAND_QMLDEFAULT;
#else
<< COMMAND_STARTPAGE;
#endif
@@ -890,14 +892,19 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
else if (command == COMMAND_RELATES) {
InnerNode *pseudoParent;
if (arg.startsWith("<") || arg.startsWith("\"")) {
- pseudoParent = static_cast<InnerNode *>(tre->findNode(QStringList(arg), Node::Fake));
+ pseudoParent =
+ static_cast<InnerNode *>(tre->findNode(QStringList(arg),
+ Node::Fake));
}
else {
QStringList newPath = arg.split("::");
- pseudoParent = static_cast<InnerNode *>(tre->findNode(QStringList(newPath), Node::Class));
+ pseudoParent =
+ static_cast<InnerNode*>(tre->findNode(QStringList(newPath),
+ Node::Class));
if (!pseudoParent)
- pseudoParent = static_cast<InnerNode *>(tre->findNode(QStringList(newPath),
- Node::Namespace));
+ pseudoParent =
+ static_cast<InnerNode*>(tre->findNode(QStringList(newPath),
+ Node::Namespace));
}
if (!pseudoParent) {
doc.location().warning(tr("Cannot find '%1' in '\\%2'")
@@ -926,6 +933,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
else if (command == COMMAND_QMLINHERITS) {
setLink(node, Node::InheritsLink, arg);
}
+ else if (command == COMMAND_QMLDEFAULT) {
+ QmlPropGroupNode* qpgn = static_cast<QmlPropGroupNode*>(node);
+ qpgn->setDefault();
+ }
#endif
else {
processCommonMetaCommand(doc.location(),command,arg,node,tre);
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 9237fea..c507f6c 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -3455,6 +3455,13 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
generateQmlItem(qpn, relative, marker, false);
out() << "</td></tr>";
+ if (qpgn->isDefault()) {
+ out() << "<div class=\"qmlitem\">"
+ << "<div class=\"qmlproto\">"
+ << "<table class=\"qmlname\">"
+ << "<tr><td><font color=\"green\">"
+ << "default</font></td></tr>";
+ }
}
++p;
}
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 211e2df..9e7e306 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1060,7 +1060,7 @@ QString QmlClassNode::fileBase() const
always a QmlClassNode.
*/
QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent, const QString& name)
- : FakeNode(parent, name, QmlPropertyGroup)
+ : FakeNode(parent, name, QmlPropertyGroup), isdefault(false)
{
// nothing.
}
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 477c2d2..9024758 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -367,6 +367,11 @@ class QmlPropGroupNode : public FakeNode
virtual ~QmlPropGroupNode() { }
const QString& element() const { return name(); }
+ void setDefault() { isdefault = true; }
+ bool isDefault() const { return isdefault; }
+
+ private:
+ bool isdefault;
};
class QmlPropertyNode : public LeafNode
@@ -395,8 +400,8 @@ class QmlPropertyNode : public LeafNode
static bool fromTrool(Trool troolean, bool defaultValue);
QString dt;
- Trool sto;
- Trool des;
+ Trool sto;
+ Trool des;
};
class QmlSignalNode : public LeafNode