diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-29 08:13:24 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-31 01:16:34 (GMT) |
commit | 29202f033c87b5efe305e606805a26c59886875b (patch) | |
tree | 6d0b770e58a67648f64fd90c6be9f5e2ee45c5f6 /src/tools/moc/generator.cpp | |
parent | f5acc7b83f79c0bce554a6e4fe2d9e6ebb4b582b (diff) | |
download | Qt-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 'src/tools/moc/generator.cpp')
-rw-r--r-- | src/tools/moc/generator.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index b872dfd..e4086e6 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -66,7 +66,9 @@ enum PropertyFlags { ResolveEditable = 0x00080000, User = 0x00100000, ResolveUser = 0x00200000, - Notify = 0x00400000 + Notify = 0x00400000, + Dynamic = 0x00800000, + Constant = 0x00000400 }; enum MethodFlags { AccessPrivate = 0x00, @@ -597,6 +599,9 @@ void Generator::generateProperties() if (p.notifyId != -1) flags |= Notify; + if (p.constant) + flags |= Constant; + fprintf(out, " %4d, %4d, ", strreg(p.name), strreg(p.type)); |