Unify and clean up usage of string literals
For handling the many ASCII string constants, the code used a mixture
of the QStringLiteral, QLatin1String, u""_s, and ""_L1 constructs. To
ease readability and maintenance, try to unify the usage to the
following guiding rules:
- For all the calls to the QJson API, use the ""_L1 construct, which
creates a QLatin1StringView. This makes sense since that API takes
that type directly, and the underlying QCbor implementation actually
deals in 8 bit string data, so converting to and from 16 bit format
is redundant.
- For (the few) calls to other APIs that do not take QLatin1String, use
QStringLiteral.
As a driveby, rename checkRequiredKey() to checkRequiredKeys(), which
better reflects the function taking a list of keys to check.
Pick-to: 6.11
Change-Id: Ia631af455514ec66c35f920548946505cd9ef7e2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
| commit | 19664a0a4e5d5b0591b39a07221fab361b2dd16b |
| parent | 6ab5cf348d72b8989d88e6796a1933000c665e1a |
| author | Eirik Aavitsland <eirik.aavitsland@qt.io> |
| committer | Eirik Aavitsland <eirik.aavitsland@qt.io> |
| commit time | Thu, 29 Jan 2026 16:34:10 +0100 |
- M src/lottie/qlottiebase.cpp
- M src/lottie/qlottiebase_p.h
- M src/lottie/qlottiebasictransform.cpp
- M src/lottie/qlottieellipse.cpp
- M src/lottie/qlottiefill.cpp
- M src/lottie/qlottiefilleffect.cpp
- M src/lottie/qlottieflatlayers.cpp
- M src/lottie/qlottiefreeformshape.cpp
- M src/lottie/qlottiegfill.cpp
- M src/lottie/qlottiegroup.cpp
- M src/lottie/qlottieimage.cpp
- M src/lottie/qlottielayer.cpp
- M src/lottie/qlottiepolystar.cpp
- M src/lottie/qlottieprecomplayer.cpp
- M src/lottie/qlottieproperty_p.h
- M src/lottie/qlottierect.cpp
- M src/lottie/qlottierepeater.cpp
- M src/lottie/qlottierepeatertransform.cpp
- M src/lottie/qlottieroot.cpp
- M src/lottie/qlottieround.cpp
- M src/lottie/qlottieshape.cpp
- M src/lottie/qlottieshapelayer.cpp
- M src/lottie/qlottieshapetransform.cpp
- M src/lottie/qlottiespatialproperty_p.h
- M src/lottie/qlottiestroke.cpp
- M src/lottie/qlottietrimpath.cpp
- M src/lottiegenerator/qlottievisitor.cpp
- M src/plugins/vectorimageformats/lottie/main.cpp
- M src/qml/qlottieanimation.cpp
- M tools/lottietoqml/main.cpp