summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r--src/corelib/kernel/qmetaobject.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index a574bec179..b09fe933e6 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -2140,6 +2140,23 @@ int QMetaMethod::revision() const
}
/*!
+ \since 6.2
+
+ Returns whether the method is const qualified.
+
+ \note This method might errorneously return \false for a const method
+ if it belongs to a library compiled against an older version of Qt.
+ */
+bool QMetaMethod::isConst() const
+{
+ if (!mobj)
+ return false;
+ if (QMetaObjectPrivate::get(mobj)->revision < 10)
+ return false;
+ return data.flags() & MethodIsConst;
+}
+
+/*!
Returns the access specification of this method (private,
protected, or public).