diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2023-05-31 04:05:43 +0300 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-06-05 22:23:01 +0000 |
| commit | 9cb08c4c0de1685551c18e3b7958a00afa2a4c6a (patch) | |
| tree | 12b615d06d56d2bc67dbaddf2336e734bd0b6021 /src/corelib/tools/qcommandlineparser.cpp | |
| parent | e22f766bda7c405ab4daa27b553d4100dcfa811f (diff) | |
Moc: streamline how diagnostic messages are printed
If we don't have a valid Symbol to get a line number from, or if the
symbol.lineNum is -1, print a shorter message containing only the file
path. Printing: '/path/to/file:-1:1' isn't useful (and looks wrong).
Change error/defaultErrorMsg/warning/note() to delegate to one central
method, so that they all behave the same; e.g. previously warning() and
note(), guarded against printing "-1" for the line number, whereas
error() didn't.
This also makes it possible to use error() for reporting other issues
(e.g. the size of generator.strings list exceeding INT_MAX, which will
happen in a later commit).
Pick-to: 6.6
Change-Id: Iddc96e08315fae415be6a84928f845d7bceb4c5f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/tools/qcommandlineparser.cpp')
0 files changed, 0 insertions, 0 deletions
