diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.cpp')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp index 3c33f52bc..0caf4812e 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp @@ -607,6 +607,28 @@ AbstractMetaFunctionCPtr AbstractMetaClass::findFunction(const QString &function return AbstractMetaFunction::find(d->m_functions, functionName); } +AbstractMetaFunctionCPtr AbstractMetaClass::findOperatorBool() const +{ + auto it = std::find_if(d->m_functions.cbegin(), d->m_functions.cend(), + [](const AbstractMetaFunctionCPtr &f) { + return f->isOperatorBool(); + }); + if (it == d->m_functions.cend()) + return {}; + return *it; +} + +AbstractMetaFunctionCPtr AbstractMetaClass::findQtIsNullMethod() const +{ + auto it = std::find_if(d->m_functions.cbegin(), d->m_functions.cend(), + [](const AbstractMetaFunctionCPtr &f) { + return f->isQtIsNullMethod(); + }); + if (it == d->m_functions.cend()) + return {}; + return *it; +} + bool AbstractMetaClass::hasProtectedFunctions() const { for (const auto &func : d->m_functions) { |