aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/messages.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-25 12:53:02 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-22 08:33:10 +0100
commit76b9c085dcc73dc631483609f59140dba1cf87e4 (patch)
treeb546a282eacec356c9c36cbce728919385e6d231 /sources/shiboken6/ApiExtractor/messages.cpp
parent2c795c34e4a8a1689fe6ac6a1099011e017893ed (diff)
Add support for excluding classes by a preprocessor condition in the module headers
Task-number: PYSIDE-962 Change-Id: I5796d10bda9b760a3fd5d71dc750b3f5f7f29e94 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.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp
index e7af80fe3..bcebf4630 100644
--- a/sources/shiboken6/ApiExtractor/messages.cpp
+++ b/sources/shiboken6/ApiExtractor/messages.cpp
@@ -349,8 +349,14 @@ QString msgTypeNotDefined(const TypeEntryCPtr &entry)
{
QString result;
QTextStream str(&result);
+ const bool hasConfigCondition = entry->isComplex()
+ && std::static_pointer_cast<const ConfigurableTypeEntry>(entry)->hasConfigCondition();
str << entry->sourceLocation() << "type '" <<entry->qualifiedCppName()
- << "' is specified in typesystem, but not defined. " << msgCompilationError;
+ << "' is specified in typesystem, but not defined";
+ if (hasConfigCondition)
+ str << " (disabled by configuration?).";
+ else
+ str << ". " << msgCompilationError;
return result;
}