[clazy] [Bug 392912] New: Proposal for check qstring-allocations
Roman
bugzilla_noreply at kde.org
Mon Apr 9 08:18:36 BST 2018
https://bugs.kde.org/show_bug.cgi?id=392912
Bug ID: 392912
Summary: Proposal for check qstring-allocations
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: ---
Hi,
I continue using clazy for my project. And found out, as i think, one
particularly interesting case. Any string with single character for example "*"
will trigger check qstring-allocations. But does advice to use QStringLiteral
in this case is optimal? How about QChar or QLatin1Char? QStringLiteral gives
binary blow up if repeated several times, plus working with single char is more
efficient because no need to handle end of string (\0). Adding single
characters to a QString is faster if the characters are QChars and not
QStrings. Same holds for arguments to QString::startsWith(),
QString::endsWith(), QString::remove() and QString::section(). Maybe it is even
worth to match QStringLiteral("*") as unneeded complexity.
Sorry, if from your point of view i start a discussion here, i don't know
another way to reach you except of irc that i don't use. The email field is
empty on github.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list