[clazy] [Bug 393039] New: Warn about using QStringLiteral for empty strings
Roman
bugzilla_noreply at kde.org
Thu Apr 12 12:11:32 BST 2018
https://bugs.kde.org/show_bug.cgi?id=393039
Bug ID: 393039
Summary: Warn about using QStringLiteral for empty strings
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: ---
According to this article
http://blog.qt.io/blog/2014/06/13/qt-weekly-13-qstringliteral/ it's not
recommended to use QStringLiteral for empty strings.
> Do not use QStringLiteral for empty strings.
> Prefer QString() over QStringLiteral("")
> The default constructor for QString is cheaper in terms of both instructions and memory.
QStringLiteral() seems to also works.
Hope this information is still relevant.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list