https://bugs.kde.org/show_bug.cgi?id=358732
Bug ID: 358732 Summary: qstring-uneeded-heap-allocations: fixit changes QString to QLatin1String even if a QString function (sprintf, arg...) on that object Product: clazy Version: unspecified Platform: Debian testing OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: oo.o+...@windbuechse.samba-tng.org CC: smart...@kde.org Created attachment 96901 --> https://bugs.kde.org/attachment.cgi?id=96901&action=edit testcase for QString with sprintf If a QString is created and a function of that object get's called ist must not be converted to a QLatin1String. That class has only a minimal set of functions and for example arg or sprintf is not supported. testcase_qstring.cpp:21:5: warning: QString(const char*) being called [-Wclazy-qstring-uneeded-heap-allocations] QString("").sprintf("0x%02X", 0x1E); If the (automatic) fixit get applied there is than a no member error. testcase_with_fixit.cpp:21:23: error: no member named 'sprintf' in 'QLatin1String' QLatin1String("").sprintf("0x%02X", 0x1E); -- You are receiving this mail because: You are watching all bug changes.