Bug 434430

Summary: useless warning messages about markup
Product: [Frameworks and Libraries] frameworks-ki18n Reporter: RJVB <rjvbertin>
Component: generalAssignee: Chusslove Illich <caslav.ilic>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description RJVB 2021-03-15 10:42:05 UTC
SUMMARY
Most warnings generated in the kuitmarkup.cpp file should IMHO be debug messages instead. I think that users should be able to have Qt warnings activated without too much pollution of irrelevant messages. The fact that someone's code uses an unknown markup tag that doesn't otherwise lead to a functional regression is irrelevant for anyone except the developer of that code.

For example, the patch proposed in https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/45 causes 2 of such messages to be printed each time a tooltip is triggered. The tooltip actually appears to be formated just fine, so the long and hard-to-read messages only help to make other more important messages harder to notice. (I happen to know they also haven't helped the author of the patch to figure out what he's doing wrong...)

I think that all qCWarning() output that is followed by an early or empty return should be qCDebug() output instead.
Comment 1 Chusslove Illich 2021-03-15 11:21:31 UTC
I don't have a strong opinion of warning vs. debug output, can see some advantages to both. Would be nice if more people give an opinion.

On a side note, the two messages in the linked patch are indeed invalid. I've commented to that end there.