diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-17 14:43:43 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-18 09:59:00 +0000 |
commit | 9bbbf390f8e8e88457763f2201cfe98f94bf1520 (patch) | |
tree | f87f8efb0c696366d685ceb87c65e1f5895b4ff2 /sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | |
parent | 853b637b02b07d502ddb5e84bcf60f6a8a58cf29 (diff) |
shiboken: Simplify code looking for copy constructors
Replace various loops operating on lists by a convenience
function
AbstractMetaFunction *AbstractMetaClass::copyConstructor() const
Change-Id: If38b954ae01856a84835a17a7e4d3e981b5aac9b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp index f5f5beef4..8ff2310e9 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp @@ -2956,8 +2956,8 @@ void AbstractMetaBuilderPrivate::parseQ_Property(AbstractMetaClass *metaClass, static AbstractMetaFunction* findCopyCtor(AbstractMetaClass* cls) { - AbstractMetaFunctionList functions = cls->queryFunctions(AbstractMetaClass::Invisible); - functions << cls->queryFunctions(AbstractMetaClass::Visible); + + const auto &functions = cls->functions(); for (AbstractMetaFunction *f : qAsConst(functions)) { const AbstractMetaFunction::FunctionType t = f->functionType(); |