QMetaPropertyBuilder: support bindable flag

Change-Id: I0d6ad00e49fd5df4c3b9c0692839404d53d8f6ed
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Fabian Kosmale 2020-09-23 08:51:50 +02:00
parent adb927e5bc
commit 6f0a9df8d2
2 changed files with 23 additions and 0 deletions

View File

@ -2380,6 +2380,18 @@ bool QMetaPropertyBuilder::isAlias() const
return false;
}
/*!
Returns \c true if the property is bindable
The default value is false
*/
bool QMetaPropertyBuilder::isBindable() const
{
if (auto d = d_func())
return d->flag(Bindable);
else
return false;
}
/*!
Sets this property to readable if \a value is true.
@ -2525,6 +2537,15 @@ void QMetaPropertyBuilder::setAlias(bool value)
d->setFlag(Alias, value);
}
/*!
Sets the\c BINDABLE flag on this property to \a value
*/
void QMetaPropertyBuilder::setBindable(bool value)
{
if (auto d = d_func())
d->setFlag(Bindable, value);
}
/*!
Returns the revision of this property.

View File

@ -263,6 +263,7 @@ public:
bool isConstant() const;
bool isFinal() const;
bool isAlias() const;
bool isBindable() const;
void setReadable(bool value);
void setWritable(bool value);
@ -276,6 +277,7 @@ public:
void setConstant(bool value);
void setFinal(bool value);
void setAlias(bool value);
void setBindable(bool value);
int revision() const;
void setRevision(int revision);