diff options
author | Fabian Kosmale <[email protected]> | 2025-03-03 17:28:31 +0100 |
---|---|---|
committer | Fabian Kosmale <[email protected]> | 2025-03-05 22:41:05 +0100 |
commit | c0f9e99611237601dc1a8367883a0699e3fe2da2 (patch) | |
tree | f051fa2639a495b49c632fad7cbfe51540faa56f /src/tools/moc/parser.cpp | |
parent | fd88f44c15e969da3228ab2b0a302e78e2ccc8de (diff) |
moc: Add an error overload taking a Symbol and a message
This allows deferring warnigs about a certain error until later, by
storing the symbol (while still allowing to print a custom message).
Change-Id: Id434eec9b344b1f8b18c504dfda8fed90167cf12
Reviewed-by: Ivan Solovev <[email protected]>
Diffstat (limited to 'src/tools/moc/parser.cpp')
-rw-r--r-- | src/tools/moc/parser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/moc/parser.cpp b/src/tools/moc/parser.cpp index 1cfb8ce4868..5f4ff3f143f 100644 --- a/src/tools/moc/parser.cpp +++ b/src/tools/moc/parser.cpp @@ -69,6 +69,12 @@ void Parser::error(const char *msg) exit(EXIT_FAILURE); } +void Parser::error(const Symbol& symbol, const char *msg) +{ + printMsg("error: %s\n", msg, symbol); + exit(EXIT_FAILURE); +} + void Parser::warning(const Symbol &sym, QByteArrayView msg) { if (displayWarnings) |