summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-08-10 12:57:30 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-08-10 12:58:14 (GMT)
commit2a1dcf7a47d81ad8b492c312dfd5e422ba2e3cd0 (patch)
tree8f81abfaa35811f7e838325149b2c2d0f5a42433 /tools
parent65ba2c18a9a3ec82331c0ccab47edc8e252192df (diff)
downloadQt-2a1dcf7a47d81ad8b492c312dfd5e422ba2e3cd0.zip
Qt-2a1dcf7a47d81ad8b492c312dfd5e422ba2e3cd0.tar.gz
Qt-2a1dcf7a47d81ad8b492c312dfd5e422ba2e3cd0.tar.bz2
qdoc: List the NOTIFY signal function in the property doc.
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp3
-rw-r--r--tools/qdoc3/generator.cpp2
-rw-r--r--tools/qdoc3/htmlgenerator.cpp8
-rw-r--r--tools/qdoc3/node.h5
-rw-r--r--tools/qdoc3/tree.cpp3
5 files changed, 18 insertions, 3 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 562684b..12ec7f3 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -1737,6 +1737,9 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
property->setDesignable(value.toLower() == "true");
else if (key == "RESET")
tre->addPropertyFunction(property, value, PropertyNode::Resetter);
+ else if (key == "NOTIFY") {
+ tre->addPropertyFunction(property, value, PropertyNode::Notifier);
+ }
}
match(Tok_RightParen);
return true;
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index e92f53b..9538dfe 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -283,7 +283,7 @@ bool Generator::generateText(const Text& text,
bool Generator::generateQmlText(const Text& text,
const Node *relative,
CodeMarker *marker,
- const QString& qmlName)
+ const QString& /* qmlName */ )
{
const Atom* atom = text.firstAtom();
if (atom == 0)
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 26874e1..c203c62 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -3420,6 +3420,14 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
out() << "<p><b>Access functions:</b></p>\n";
generateSectionList(section, node, marker, CodeMarker::Accessors);
}
+
+ Section notifiers;
+ notifiers.members += property->notifiers();
+
+ if (!notifiers.members.isEmpty()) {
+ out() << "<p><b>Notifier signal:</b></p>\n";
+ generateSectionList(notifiers, node, marker, CodeMarker::Accessors);
+ }
}
else if (node->type() == Node::Enum) {
const EnumNode *enume = static_cast<const EnumNode *>(node);
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 17ec447..61f2a76 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -590,8 +590,8 @@ class FunctionNode : public LeafNode
class PropertyNode : public LeafNode
{
public:
- enum FunctionRole { Getter, Setter, Resetter };
- enum { NumFunctionRoles = Resetter + 1 };
+ enum FunctionRole { Getter, Setter, Resetter, Notifier };
+ enum { NumFunctionRoles = Notifier + 1 };
PropertyNode(InnerNode *parent, const QString& name);
virtual ~PropertyNode() { }
@@ -609,6 +609,7 @@ class PropertyNode : public LeafNode
NodeList getters() const { return functions(Getter); }
NodeList setters() const { return functions(Setter); }
NodeList resetters() const { return functions(Resetter); }
+ NodeList notifiers() const { return functions(Notifier); }
bool isStored() const { return fromTrool(sto, storedDefault()); }
bool isDesignable() const { return fromTrool(des, designableDefault()); }
const PropertyNode *overriddenFrom() const { return overrides; }
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index f832062..a5e22f1 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -485,6 +485,7 @@ void Tree::resolveProperties()
QString getterName = (*propEntry)[PropertyNode::Getter];
QString setterName = (*propEntry)[PropertyNode::Setter];
QString resetterName = (*propEntry)[PropertyNode::Resetter];
+ QString notifierName = (*propEntry)[PropertyNode::Notifier];
NodeList::ConstIterator c = parent->childNodes().begin();
while (c != parent->childNodes().end()) {
@@ -499,6 +500,8 @@ void Tree::resolveProperties()
property->addFunction(function, PropertyNode::Setter);
} else if (function->name() == resetterName) {
property->addFunction(function, PropertyNode::Resetter);
+ } else if (function->name() == notifierName) {
+ property->addFunction(function, PropertyNode::Notifier);
}
}
}