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

Sergio Martins bugzilla_noreply at kde.org
Wed Mar 14 19:58:26 GMT 2018


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

--- Comment #3 from Sergio Martins <smartins at kde.org> ---
tr() doesn't take QString as argument, so there's no allocation

You can either use const char* in your translate function, or:
 translate(QStringLiteral("context"), QStringLiteral("string"),
QStringLiteral("disambiguation"));

I don't see a way clazy could distinguish this case

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


More information about the Unassigned-bugs mailing list