summaryrefslogtreecommitdiffstats
path: root/src/qdoc/propertynode.h
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-08-11 11:18:26 +0200
committerTopi Reinio <topi.reinio@qt.io>2020-09-21 12:43:04 +0200
commit5b11b631914ff399d72f0a9b58a7b06e96fc7a6a (patch)
tree6d911b0ea8f19c02b5d7e39f752ef79352c1cc00 /src/qdoc/propertynode.h
parent6e88d94fc5ec05fc5fe2401d91329b096cb801aa (diff)
qdoc: Add support for bindable properties
Add support for the BINDABLE attribute in the Q_PROPERTY macro. The new properties are marked with 'bindable' tag, and the list of access functions/notifier signal is replaced with a descriptive note and a link to QProperty. Read-only properties are also properly marked as such. [ChangeLog][qdoc] The \property command now supports bindable C++ properties that use the new system based on QProperty. Task-number: QTBUG-85565 Change-Id: Ie352b3ce962b6b05a022d444da0991b8a849e474 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/propertynode.h')
-rw-r--r--src/qdoc/propertynode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/propertynode.h b/src/qdoc/propertynode.h
index 5598ab703..be1ccfa09 100644
--- a/src/qdoc/propertynode.h
+++ b/src/qdoc/propertynode.h
@@ -42,6 +42,7 @@ class Aggregate;
class PropertyNode : public Node
{
public:
+ enum PropertyType { Standard, Bindable };
enum FunctionRole { Getter, Setter, Resetter, Notifier };
enum { NumFunctionRoles = Notifier + 1 };
@@ -61,6 +62,7 @@ public:
void setConstant() { m_const = true; }
void setFinal() { m_final = true; }
void setRequired() { m_required = true; }
+ void setPropertyType(PropertyType type) { m_propertyType = type; }
void setRevision(int revision) { m_revision = revision; }
const QString &dataType() const { return m_type; }
@@ -83,6 +85,7 @@ public:
bool isConstant() const { return m_const; }
bool isFinal() const { return m_final; }
bool isRequired() const { return m_required; }
+ PropertyType propertyType() const { return m_propertyType; }
const PropertyNode *overriddenFrom() const { return m_overrides; }
bool storedDefault() const { return true; }
@@ -93,6 +96,7 @@ public:
private:
QString m_type {};
+ PropertyType m_propertyType { Standard };
QString m_runtimeDesFunc {};
QString m_runtimeScrFunc {};
NodeList m_functions[NumFunctionRoles] {};