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-b...@kde.org
          Reporter: dism...@gmail.com
                CC: smart...@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 watching all bug changes.

Reply via email to