> On Oct. 3, 2015, 12:28 a.m., Matthew Dawson wrote: > > src/core/kdesktopfile.cpp, line 307 > > <https://git.reviewboard.kde.org/r/125106/diff/2/?file=402860#file402860line307> > > > > Since this gets converted to a QString immediately, should this not be > > a QStringLiteral? There doesn't seem to be an override for the + operator > > for QLatin1String, so it has to convert to UTF-16 anways. There are a > > bunch of such cases below as well. > > > > I double checked against QStringBuilder, and I don't see it helping > > either. It still does the conversion anyways.
Thiagos suggestion here was always to use QLatin1String, /because/ you'll mutate the string anyways. Using QStringLiteral there would not gain you much. If there is not +operator for QLatin1String then it should be added upstream. Anyhow, imo this can be pushed as-is and anything else improved later on if need be. - Milian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125106/#review86264 ----------------------------------------------------------- On Sept. 11, 2015, 11:56 p.m., Albert Astals Cid wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125106/ > ----------------------------------------------------------- > > (Updated Sept. 11, 2015, 11:56 p.m.) > > > Review request for KDE Frameworks and Matthew Dawson. > > > Repository: kconfig > > > Description > ------- > > Ran the clazy tool > (http://www.kdab.com/use-static-analysis-improve-performance/) > > Mostly QStringLiteral/QLatin1String additions > A few const & additions to non public methods > > > Diffs > ----- > > src/kconfig_compiler/kconfig_compiler.cpp 5c515f4 > src/kconf_update/kconfigutils.cpp 0fec63a > src/kconf_update/kconf_update.cpp a1c98cb > src/gui/kwindowconfig.cpp a32c6cc > src/core/kdesktopfile.cpp 49f37c3 > src/core/ksharedconfig.cpp e059b87 > src/core/kconfigini.cpp 856b7b7 > src/core/kcoreconfigskeleton_p.h d098ef6 > src/core/kauthorized.cpp 4280524 > src/core/kconfig.cpp 4be9e6d > src/core/kconfigbackend.cpp 67bdefa > > Diff: https://git.reviewboard.kde.org/r/125106/diff/ > > > Testing > ------- > > Compiles, test pass > > > Thanks, > > Albert Astals Cid > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel