[clazy] [Bug 391824] New: False positive check "qstring-allocations" for function translate

Roman bugzilla_noreply at kde.org
Tue Mar 13 15:27:19 GMT 2018


https://bugs.kde.org/show_bug.cgi?id=391824

            Bug ID: 391824
           Summary: False positive check "qstring-allocations" for
                    function translate
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: dismine at gmail.com
                CC: smartins at kde.org
  Target Milestone: ---

In my code i use little hack. If wrap string to a function translate, it will
be marked for translation. No matter what namespace contains this function. So,
i have

#define translate(context, source, disambiguation)
QmuTranslation::translate((context), (source), (disambiguation))

And use it like this:

translate("QmuParserErrorMsg", "Unexpected token \"$TOK$\" found at position
$POS$.", "Math parser error messages. Left untouched \"$TOK$\" and $POS$") 

When lupdate will parse a source code it will mark a string for translation.
But clazy doesn't recognize this case and warn about "qstring-allocations".
Where for canonical translate functions it doesn't.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list