summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-08-17 12:28:45 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-08-17 12:30:02 (GMT)
commit1ca6a2f3174fdfbbe080af920ab75558a1a9247e (patch)
tree706c3a4beb1b3a13be73ee3e28c40226ef150b29
parent38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c (diff)
downloadQt-1ca6a2f3174fdfbbe080af920ab75558a1a9247e.zip
Qt-1ca6a2f3174fdfbbe080af920ab75558a1a9247e.tar.gz
Qt-1ca6a2f3174fdfbbe080af920ab75558a1a9247e.tar.bz2
qdoc: Fixed the bug that made reporting NOTIFY signals not work.
The signal was being associated with a particular property, but in many classes, the NOTIFY signal applies to multiple properties. Added a new function to the PropertyNode class that adds the signal function without associating it with any property. Task-number: 259071
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
-rw-r--r--tools/qdoc3/cppcodeparser.cpp4
-rw-r--r--tools/qdoc3/node.h6
-rw-r--r--tools/qdoc3/tree.cpp2
4 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index f454d7c..6d75db3 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -6831,11 +6831,12 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent
By default, this property is true.
- \sa QGraphicsItem::isEnabled(), QGraphicsItem::setEnabled(), enabledChanged()
+ \sa QGraphicsItem::isEnabled(), QGraphicsItem::setEnabled()
+ \sa QGraphicsObject::enabledChanged()
*/
/*!
- \fn QGraphicsObject::enabledChanged()
+ \fn void QGraphicsObject::enabledChanged()
This signal gets emitted whenever the item get's enabled or disabled.
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index ebe5ec9..7519ff1 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -1734,11 +1734,11 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
property->setDesignable(value.toLower() == "true");
else if (key == "RESET")
tre->addPropertyFunction(property, value, PropertyNode::Resetter);
-#if 0
+
else if (key == "NOTIFY") {
tre->addPropertyFunction(property, value, PropertyNode::Notifier);
}
-#endif
+
}
match(Tok_RightParen);
return true;
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 2a1ca05..0cddf51 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -598,6 +598,7 @@ class PropertyNode : public LeafNode
void setDataType(const QString& dataType) { dt = dataType; }
void addFunction(FunctionNode *function, FunctionRole role);
+ void addSignal(FunctionNode *function, FunctionRole role);
void setStored(bool stored) { sto = toTrool(stored); }
void setDesignable(bool designable) { des = toTrool(designable); }
void setOverriddenFrom(const PropertyNode *baseProperty);
@@ -641,6 +642,11 @@ inline void PropertyNode::addFunction(FunctionNode *function, FunctionRole role)
function->setAssociatedProperty(this);
}
+inline void PropertyNode::addSignal(FunctionNode *function, FunctionRole role)
+{
+ funcs[(int)role].append(function);
+}
+
inline NodeList PropertyNode::functions() const
{
NodeList list;
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index b42701f..7d488df 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -501,7 +501,7 @@ void Tree::resolveProperties()
} else if (function->name() == resetterName) {
property->addFunction(function, PropertyNode::Resetter);
} else if (function->name() == notifierName) {
- property->addFunction(function, PropertyNode::Notifier);
+ property->addSignal(function, PropertyNode::Notifier);
}
}
}