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/ApiExtractor/abstractmetalang.cpp | |
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/ApiExtractor/abstractmetalang.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetalang.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp index 390143cda..e9a2c2b57 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp @@ -783,6 +783,16 @@ bool AbstractMetaFunction::autoDetectAllowThread() const return !maybeGetter; } +SourceLocation AbstractMetaFunction::sourceLocation() const +{ + return m_sourceLocation; +} + +void AbstractMetaFunction::setSourceLocation(const SourceLocation &sourceLocation) +{ + m_sourceLocation = sourceLocation; +} + static inline TypeSystem::AllowThread allowThreadMod(const AbstractMetaClass *klass) { return klass->typeEntry()->allowThread(); @@ -2636,6 +2646,16 @@ void AbstractMetaClass::formatMembers(QDebug &d) const } } +SourceLocation AbstractMetaClass::sourceLocation() const +{ + return m_sourceLocation; +} + +void AbstractMetaClass::setSourceLocation(const SourceLocation &sourceLocation) +{ + m_sourceLocation = sourceLocation; +} + QDebug operator<<(QDebug d, const AbstractMetaClass *ac) { QDebugStateSaver saver(d); |