aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/messages.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/messages.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/messages.cpp b/sources/shiboken2/ApiExtractor/messages.cpp
index a660f7e76..ab03a0102 100644
--- a/sources/shiboken2/ApiExtractor/messages.cpp
+++ b/sources/shiboken2/ApiExtractor/messages.cpp
@@ -112,20 +112,26 @@ static void msgFormatEnumType(Stream &str,
QString msgAddedFunctionInvalidArgType(const QString &addedFuncName,
const QString &typeName,
- int pos, const QString &why)
+ int pos, const QString &why,
+ const AbstractMetaClass *context)
{
QString result;
QTextStream str(&result);
+ if (context)
+ str << context->typeEntry()->sourceLocation();
str << "Unable to translate type \"" << typeName << "\" of argument "
<< pos << " of added function \"" << addedFuncName << "\": " << why;
return result;
}
QString msgAddedFunctionInvalidReturnType(const QString &addedFuncName,
- const QString &typeName, const QString &why)
+ const QString &typeName, const QString &why,
+ const AbstractMetaClass *context)
{
QString result;
QTextStream str(&result);
+ if (context)
+ str << context->typeEntry()->sourceLocation();
str << "Unable to translate return type \"" << typeName
<< "\" of added function \"" << addedFuncName << "\": "
<< why;