summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-29 08:13:24 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-31 01:16:34 (GMT)
commit29202f033c87b5efe305e606805a26c59886875b (patch)
tree6d0b770e58a67648f64fd90c6be9f5e2ee45c5f6 /doc/src
parentf5acc7b83f79c0bce554a6e4fe2d9e6ebb4b582b (diff)
downloadQt-29202f033c87b5efe305e606805a26c59886875b.zip
Qt-29202f033c87b5efe305e606805a26c59886875b.tar.gz
Qt-29202f033c87b5efe305e606805a26c59886875b.tar.bz2
Add CONSTANT attribute to Q_PROPERTY()
This will be used by the declarative module to determine if a property lacking a NOTIFY signal is truly constant, or just missing a NOTIFY signal. Reviewed-by: Roberto Raggi
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/properties.qdoc6
-rw-r--r--doc/src/snippets/code/doc_src_properties.qdoc3
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/src/properties.qdoc b/doc/src/properties.qdoc
index 5490dd0..cac5016 100644
--- a/doc/src/properties.qdoc
+++ b/doc/src/properties.qdoc
@@ -122,6 +122,12 @@
editable property for (checkable) buttons. Note that QItemDelegate
gets and sets a widget's \c USER property.
+ \o The presence of the \c CONSTANT attibute indicates that the property
+ value is constant. For a given object instance, the READ method of a
+ constant property must return the same value every time it is called. This
+ constant value may be different for different instances of the object. A
+ constant property cannot have a WRTE method or a NOTIFY signal.
+
\endlist
The \c READ, \c WRITE, and \c RESET functions can be inherited.
diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc
index 377cc9c..64e5377 100644
--- a/doc/src/snippets/code/doc_src_properties.qdoc
+++ b/doc/src/snippets/code/doc_src_properties.qdoc
@@ -7,7 +7,8 @@ Q_PROPERTY(type name
[DESIGNABLE bool]
[SCRIPTABLE bool]
[STORED bool]
- [USER bool])
+ [USER bool]
+ [CONSTANT])
//! [0]