Fix warning about QMetaObject::isEditable() being deprecated
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f482445bff28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
712ed3d5d6
commit
f0ec2eb151
@ -575,6 +575,16 @@ QMetaPropertyBuilder QMetaObjectBuilder::addProperty
|
||||
return QMetaPropertyBuilder(this, index);
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 15)
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
static bool deprecatedIsEditable(const QMetaProperty &prototype)
|
||||
{
|
||||
return prototype.isEditable();
|
||||
}
|
||||
QT_WARNING_POP
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Adds a new property to this class that has the same information as
|
||||
\a prototype. This is used to clone the properties of an existing
|
||||
@ -592,7 +602,7 @@ QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& protot
|
||||
property.setDesignable(prototype.isDesignable());
|
||||
property.setScriptable(prototype.isScriptable());
|
||||
property.setStored(prototype.isStored());
|
||||
property.setEditable(prototype.isEditable());
|
||||
property.setEditable(deprecatedIsEditable(prototype));
|
||||
property.setUser(prototype.isUser());
|
||||
property.setStdCppSet(prototype.hasStdCppSet());
|
||||
property.setEnumOrFlag(prototype.isEnumType());
|
||||
|
Loading…
Reference in New Issue
Block a user