summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/node.cpp')
-rw-r--r--tools/qdoc3/node.cpp39
1 files changed, 37 insertions, 2 deletions
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 43cb0a0..b077074 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1295,21 +1295,39 @@ void FunctionNode::debug() const
/*!
\class PropertyNode
+
+ This class describes one instance of using the Q_PROPERTY macro.
*/
/*!
+ The constructor sets the \a parent and the \a name, but
+ everything else is set to default values.
*/
PropertyNode::PropertyNode(InnerNode *parent, const QString& name)
: LeafNode(Property, parent, name),
sto(Trool_Default),
des(Trool_Default),
+ scr(Trool_Default),
+ wri(Trool_Default),
+ usr(Trool_Default),
+ cst(false),
+ fnl(false),
overrides(0)
{
+ // nothing.
}
/*!
+ Sets this property's \e {overridden from} property to
+ \a baseProperty, which indicates that this property
+ overrides \a baseProperty. To begin with, all the values
+ in this property are set to the corresponding values in
+ \a baseProperty.
+
+ We probably should ensure that the constant and final
+ attributes are not being overridden improperly.
*/
-void PropertyNode::setOverriddenFrom(const PropertyNode *baseProperty)
+void PropertyNode::setOverriddenFrom(const PropertyNode* baseProperty)
{
for (int i = 0; i < NumFunctionRoles; ++i) {
if (funcs[i].isEmpty())
@@ -1319,6 +1337,12 @@ void PropertyNode::setOverriddenFrom(const PropertyNode *baseProperty)
sto = baseProperty->sto;
if (des == Trool_Default)
des = baseProperty->des;
+ if (scr == Trool_Default)
+ scr = baseProperty->scr;
+ if (wri == Trool_Default)
+ wri = baseProperty->wri;
+ if (usr == Trool_Default)
+ usr = baseProperty->usr;
overrides = baseProperty;
}
@@ -1344,7 +1368,9 @@ QString PropertyNode::qualifiedDataType() const
}
}
-/*!
+/*! Converts the \a boolean value to an enum representation
+ of the boolean type, which includes an enum value for the
+ \e {default value} of the item, i.e. true, false, or default.
*/
PropertyNode::Trool PropertyNode::toTrool(bool boolean)
{
@@ -1352,6 +1378,15 @@ PropertyNode::Trool PropertyNode::toTrool(bool boolean)
}
/*!
+ Converts the enum \a troolean back to a boolean value.
+ If \a troolean is neither the true enum value nor the
+ false enum value, the boolean value returned is
+ \a defaultValue.
+
+ Note that runtimeDesignabilityFunction() should be called
+ first. If that function returns the name of a function, it
+ means the function must be called at runtime to determine
+ whether the property is Designable.
*/
bool PropertyNode::fromTrool(Trool troolean, bool defaultValue)
{