summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobjectbuilder.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-04-08 18:12:14 -0300
committerFabian Kosmale <fabian.kosmale@qt.io>2020-04-09 13:55:25 +0000
commitf0ec2eb151f5e3d9a26ce86a1ba86d41f1fe24c4 (patch)
tree66515c942c28b6c3885309fc78afa8756d0252a8 /src/corelib/kernel/qmetaobjectbuilder.cpp
parent712ed3d5d6645ef4a091e22f508de1ada8fdf94c (diff)
Fix warning about QMetaObject::isEditable() being deprecated
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f482445bff28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobjectbuilder.cpp')
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index 4ecc340787..0f018074e4 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -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());