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/parser/codemodel.h | |
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/parser/codemodel.h')
-rw-r--r-- | sources/shiboken2/ApiExtractor/parser/codemodel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h index 5bbd9ed3e..ea9cdc30d 100644 --- a/sources/shiboken2/ApiExtractor/parser/codemodel.h +++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h @@ -47,6 +47,8 @@ QT_FORWARD_DECLARE_CLASS(QDebug) #define DECLARE_MODEL_NODE(k) \ enum { __node_kind = Kind_##k }; +class SourceLocation; + class CodeModel { public: @@ -296,6 +298,8 @@ public: void getEndPosition(int *line, int *column); void setEndPosition(int line, int column); + SourceLocation sourceLocation() const; + inline CodeModel *model() const { return m_model; } #ifndef QT_NO_DEBUG_STREAM |