Bug 402917 - Check converting number to string
Summary: Check converting number to string
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-06 11:18 UTC by Roman
Modified: 2019-01-06 11:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman 2019-01-06 11:18:10 UTC
I have found in my code strings like this: 

int value = 2; // just an example

...

QString("%1").arg(value)



Clazy complains about qstring-allocations here. This is correct, but such a code has small sense since we could just write 

QString::number(value) or QString().number(value)

It seems Clazy could improve readability if advises replace single placeholder (%1-%99) with conversion from number.