diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-23 07:58:44 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-23 15:21:26 +0200 |
commit | ff94459c809e2ccd13e6d669b053667d35b3e571 (patch) | |
tree | 288d92c99176db334fa5e2f3ae449b248ac3a27c /sources/shiboken2/generator | |
parent | 443d3d036b062fddec85d8258f9af3852fdfd173 (diff) |
shiboken2: Add file location to more warnings
Output most warnings in the standard file:line syntax
used by compilers. This is done for C++ source code
and typesystem files.
Introduce a class SourceLocation and add it to type entry,
AbstractMetaFunction and AbstractMetaClass.
Move more messages into messages.cpp and output the location.
Change the errors reported by the XML typesystem parser to
the same format.
[ChangeLog][shiboken] A number of error and warning messages have
been prefixed by file name and line for better tooling.
Task-number: PYSIDE-904
Change-Id: Ie2008f4060757e9d7ca1b25c00c7c5585240a7b8
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index edd24aa23..d0c144358 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -2265,7 +2265,8 @@ static void checkTypeViability(const AbstractMetaFunction *func, const AbstractM return; QString message; QTextStream str(&message); - str << "There's no user provided way (conversion rule, argument" + str << func->sourceLocation() + << "There's no user provided way (conversion rule, argument" " removal, custom code, etc) to handle the primitive "; if (argIdx == 0) str << "return type '" << type->cppSignature() << '\''; |