Warn that the EDITABLE flag for property declarations is deprecated
Additionally mark QMetaProperty::isEditable as deprecated. Change-Id: I1abe4c6f2d30c2f96380f9e5942be431dbfed38f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
1de427bd4e
commit
64b1af3fa0
@ -3599,6 +3599,7 @@ bool QMetaProperty::isRequired() const
|
|||||||
|
|
||||||
\sa isDesignable(), isScriptable(), isStored()
|
\sa isDesignable(), isScriptable(), isStored()
|
||||||
*/
|
*/
|
||||||
|
#if QT_DEPRECATED_SINCE(5, 15)
|
||||||
bool QMetaProperty::isEditable(const QObject *object) const
|
bool QMetaProperty::isEditable(const QObject *object) const
|
||||||
{
|
{
|
||||||
if (!mobj)
|
if (!mobj)
|
||||||
@ -3612,6 +3613,7 @@ bool QMetaProperty::isEditable(const QObject *object) const
|
|||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QMetaClassInfo
|
\class QMetaClassInfo
|
||||||
|
@ -262,7 +262,9 @@ public:
|
|||||||
bool isDesignable(const QObject *obj = nullptr) const;
|
bool isDesignable(const QObject *obj = nullptr) const;
|
||||||
bool isScriptable(const QObject *obj = nullptr) const;
|
bool isScriptable(const QObject *obj = nullptr) const;
|
||||||
bool isStored(const QObject *obj = nullptr) const;
|
bool isStored(const QObject *obj = nullptr) const;
|
||||||
bool isEditable(const QObject *obj = nullptr) const;
|
#if QT_DEPRECATED_SINCE(5, 15)
|
||||||
|
QT_DEPRECATED bool isEditable(const QObject *obj = nullptr) const;
|
||||||
|
#endif
|
||||||
bool isUser(const QObject *obj = nullptr) const;
|
bool isUser(const QObject *obj = nullptr) const;
|
||||||
bool isConstant() const;
|
bool isConstant() const;
|
||||||
bool isFinal() const;
|
bool isFinal() const;
|
||||||
|
@ -1296,9 +1296,12 @@ void Moc::createPropertyDef(PropertyDef &propDef)
|
|||||||
propDef.designable = v + v2;
|
propDef.designable = v + v2;
|
||||||
checkIsFunction(propDef.designable, "DESIGNABLE");
|
checkIsFunction(propDef.designable, "DESIGNABLE");
|
||||||
break;
|
break;
|
||||||
case 'E': if (l != "EDITABLE") error(2);
|
case 'E': if (l != "EDITABLE") error(2); {
|
||||||
|
const QByteArray msg = "EDITABLE flag for property declaration is deprecated.";
|
||||||
|
warning(msg.constData());
|
||||||
propDef.editable = v + v2;
|
propDef.editable = v + v2;
|
||||||
checkIsFunction(propDef.editable, "EDITABLE");
|
checkIsFunction(propDef.editable, "EDITABLE");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'N': if (l != "NOTIFY") error(2);
|
case 'N': if (l != "NOTIFY") error(2);
|
||||||
propDef.notify = v;
|
propDef.notify = v;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user