From 479c58af242b7754775dca646e6ed74a92d58f76 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 25 Dec 2020 14:12:30 +0100 Subject: Refactoring: Fix some issues in reporting warnings for Doxywizard's config parser --- addon/doxywizard/config_doxyw.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l index 8fe4194..1293705 100644 --- a/addon/doxywizard/config_doxyw.l +++ b/addon/doxywizard/config_doxyw.l @@ -175,7 +175,7 @@ static void processString() { std::string str = g_str.trimmed().toStdString(); config_warn("Invalid value for '%s' tag at line %d, file %s: Value '%s' is not properly quoted\n", - qPrintable(g_cmd),yylineno,qPrintable(g_yyFileName),str.c_str()); + qPrintable(g_cmd),yylineno-1,qPrintable(g_yyFileName),str.c_str()); } warned=true; } @@ -269,7 +269,7 @@ static void processList() { std::string str = g_str.trimmed().toStdString(); config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly space %sseparated\n", - qPrintable(g_cmd),yylineno,qPrintable(g_yyFileName),str.c_str(),allowCommaAsSeparator?"or comma ":""); + qPrintable(g_cmd),yylineno-1,qPrintable(g_yyFileName),str.c_str(),allowCommaAsSeparator?"or comma ":""); warned=true; } needsSeparator=false; @@ -288,7 +288,7 @@ static void processList() { std::string str = g_str.trimmed().toStdString(); config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly quoted\n", - g_cmd.data(),yylineno,g_yyFileName.data(),str.c_str()); + qPrintable(g_cmd),yylineno-1,qPrintable(g_yyFileName),str.c_str()); } } -- cgit v0.12