summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-22 17:21:36 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-02 22:44:29 +0200
commitad32ac5b4f05c9eed1fb7a93ee7947050d840a19 (patch)
tree5f14ae7a6a588ad3c9400058943f675556a403a9 /src/tools/moc/moc.h
parent3e6c09279304fbde1860288717958e28377b9a9c (diff)
Make bindings introspectable through moc
Add a new BINDABLE declaration to the Q_PROPERTY() macro that tells moc where to find the QBindable for the property. Add a QUntypedBindable base class to QBindable<T> that gives access to generic functionality and checks argument compatibility at runtime. QBindable<T> will still do static checking at compile time. Add QMetaProperty::isBindable() and QMetaProperty::bindable() to be able to dynamically access the binding functionality. Change-Id: Ic7b08ae2cde83fd43e627d813a886e1de01fa3dc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r--src/tools/moc/moc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index def5a8e82d..7f63402aca 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -132,7 +132,7 @@ struct PropertyDef
return (s == write);
}
- QByteArray name, type, member, read, write, reset, designable, scriptable, stored, user, notify, inPrivateClass;
+ QByteArray name, type, member, read, write, bind, reset, designable, scriptable, stored, user, notify, inPrivateClass;
int notifyId = -1; // -1 means no notifyId, >= 0 means signal defined in this class, < -1 means signal not defined in this class
enum Specification { ValueSpec, ReferenceSpec, PointerSpec };
Specification gspec = ValueSpec;
@@ -140,7 +140,6 @@ struct PropertyDef
bool constant = false;
bool final = false;
bool required = false;
- bool isQProperty = false;
int location = -1; // token index, used for error reporting