summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobjectbuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qmetaobjectbuilder.cpp')
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index d46adf05fb2..8513805ef48 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -1743,6 +1743,28 @@ void QMetaMethodBuilder::setAttributes(int value)
}
/*!
+ Returns true if the method is const qualified.
+ */
+int QMetaMethodBuilder::isConst() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (!d)
+ return false;
+ return (d->attributes & MethodIsConst);
+}
+
+void QMetaMethodBuilder::setConst(bool methodIsConst)
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (!d)
+ return;
+ if (methodIsConst)
+ d->attributes |= MethodIsConst;
+ else
+ d->attributes &= ~MethodIsConst;
+}
+
+/*!
Returns the revision of this method.
\sa setRevision()