aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/messages.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-02-27 13:13:41 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-04-17 13:12:14 +0200
commit8d5b1bdf238cda67a50e489a77de1f4f6996b3b2 (patch)
tree2e232a691adf7b1f36f348a33d5bdd9ad4d0b825 /sources/shiboken6/ApiExtractor/messages.cpp
parent5b8ce393310ed9b6ffa4b0add29d1bb164e37baa (diff)
shiboken6: Extract common C++ function attributes
Extract attributes common to C++ functions from AbstractMetaFunction's attributes to a flags type in codemodel_enums.h for re-use in AbstractMetaFunction, FunctionModelItem and AddedFunction. A lot of boolean setters and getters can then be removed and the flags easily transferred from code model to the meta language code. Task-number: PYSIDE-2602 Pick-to: 6.7 Change-Id: I9da1bb0d70051cd6bb3113290e8ccedfe4d13908 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/messages.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/messages.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp
index 6bd82eaa7..f9f46f520 100644
--- a/sources/shiboken6/ApiExtractor/messages.cpp
+++ b/sources/shiboken6/ApiExtractor/messages.cpp
@@ -319,10 +319,11 @@ QString msgSkippingFunction(const FunctionModelItem &functionItem,
QTextStream str(&result);
str << functionItem->sourceLocation() << "skipping "
<< functionItem->accessPolicy() << ' ';
- if (functionItem->isAbstract())
+ const bool isAbstract = functionItem->attributes().testFlag(FunctionAttribute::Abstract);
+ if (isAbstract)
str << "abstract ";
str << "function '" << signature << "', " << why;
- if (functionItem->isAbstract()) {
+ if (isAbstract) {
str << "\nThis will lead to compilation errors due to not "
"being able to instantiate the wrapper.";
}