[clazy] [Bug 392224] New: Improve check "qstring-allocations". Replace QString::setNum with static version QString::number

Roman bugzilla_noreply at kde.org
Fri Mar 23 09:43:10 GMT 2018


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

            Bug ID: 392224
           Summary: Improve check "qstring-allocations". Replace
                    QString::setNum with static version QString::number
           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 just have found in my code string like this: 

QString str = QString().setNum(1234);

This can be replaced as:

QString str = QString::number(1234);

I checked Qt's source code and setNum() uses number() inside anyway. I assume
calling setNum() like this should be case for "qstring-allocations".

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


More information about the Unassigned-bugs mailing list