aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-04-19 13:38:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-04-19 14:02:14 +0200
commitd66b276df502cd3a2196c69cbae8bdbd8ac08c7d (patch)
tree26bfb4595aa057262462810da4e0c047ece8f286 /sources/shiboken6
parent873366d8576ee1ecf32e0f52a139091425657c3b (diff)
shiboken6: Fix warnings about unused init functions
Amends 5b8ce393310ed9b6ffa4b0add29d1bb164e37baa, which broke a condition setting AbstractMetaClass::hasNonPrivateConstructor which needs to take into account copy constructors. Pick-to: 6.7 Task-number: PYSIDE-2602 Change-Id: Iba4a8070a984a5306fe5c73bf77bee0777719bb3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6')
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp
index 31a629a9e..89d636964 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp
@@ -1451,12 +1451,12 @@ void AbstractMetaBuilderPrivate::traverseFunctions(const ScopeModelItem& scopeIt
}
}
- if (metaFunction->functionType() == AbstractMetaFunction::ConstructorFunction) {
- if (metaFunction->isPrivate())
- metaClass->setHasPrivateConstructor(true);
- else
- metaClass->setHasNonPrivateConstructor(true);
+ if (metaFunction->functionType() == AbstractMetaFunction::ConstructorFunction
+ && metaFunction->isPrivate()) {
+ metaClass->setHasPrivateConstructor(true);
}
+ if (metaFunction->isConstructor() && !metaFunction->isPrivate()) // Including Copy CT
+ metaClass->setHasNonPrivateConstructor(true);
if (!metaFunction->isDestructor()
&& !(metaFunction->isPrivate() && metaFunction->functionType() == AbstractMetaFunction::ConstructorFunction)) {