The use of QLatin1String is more optimized than
QStringLiteral.
This tip was given by Lamarque and the doc follows:
http://doc.qt.io/qt-5/qlatin1string.html#details
Signed-off-by: Lays Rodrigues <laysrodriguessilva@gmail.com>
rizzitello | |
tcanabrava | |
patrickelectric |
The use of QLatin1String is more optimized than
QStringLiteral.
This tip was given by Lamarque and the doc follows:
http://doc.qt.io/qt-5/qlatin1string.html#details
Signed-off-by: Lays Rodrigues <laysrodriguessilva@gmail.com>
No Linters Available |
No Unit Test Coverage |
src/atcore.cpp | ||
---|---|---|
87 | the operator+ don't have a overload to QString, moving to QLatin1String don't make sense. | |
435 | in args we can use qbytearray and here qbytearrayliteral | |
src/plugins/aprinterplugin.cpp | ||
32 ↗ | (On Diff #15336) | QLatin1String will be converted to QString in runtime, change it back to QStringLiteral. |
38 ↗ | (On Diff #15336) | Same here.. |
src/atcore.cpp | ||
---|---|---|
87 | the operator+ don't have a overload to QString from QLatin1String, moving to QLatin1String don't make sense. |
src/atcore.cpp | ||
---|---|---|
435 | use of QByteArray here is breaking the build. args.append(QByteArrayLiteral("X0 ")); ^ I moved back to QStringLiteral |
Update last patrick comments
I used search and replace in all files, didn't pay attention
to the details that you are highlighting. =/
Possibly more places to revert, anywhere it will be cast as QString QStringLiteral should be used.
src/atcore_default_folders.h.in | ||
---|---|---|
29 | QStringList, revert to QStringLiteral | |
src/gcodecommands.cpp | ||
94 | Function returns QString, revert the returns to QStringLiteral | |
130 | Function Returns QString , revert to QStringLiteral | |
src/seriallayer.cpp | ||
34 | QStringlist , revert to QStringLiteral |
src/temperature.cpp | ||
---|---|---|
92–93 | Again... Check if the class accept QLatin1String. |