Compile without casting to/from ascii to avoid typical mistakes due to
implicit conversions. Fix a bunch of dubious places.
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- R110:973bef8349d2: Clean up string casts
Things compile, tests run.
Diff Detail
- Repository
- R110 KScreen Library
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
cool, thanks.
tests/kwayland/waylandtestserver.cpp | ||
---|---|---|
39 | shouldn't that be a QStringLiteral? |
autotests/testkwaylandbackend.cpp | ||
---|---|---|
88 | Why true? | |
autotests/testlog.cpp | ||
52 | I thought when concatenating the advantage of QStringLiteral don't cut it since you already have a string so should be QLatin1String instead? | |
autotests/testqscreenbackend.cpp | ||
62 | Not from local 8 bit? | |
174–175 | Could use initializer list | |
autotests/testscreenconfig.cpp | ||
104 | QLatin1String? | |
backends/fake/parser.cpp | ||
187–189 | QLatin1String? | |
backends/xrandr1.1/xrandr11.cpp | ||
174 | QLatin1Char? |
autotests/testkwaylandbackend.cpp | ||
---|---|---|
88 | Indeed, that makes no sense. | |
autotests/testlog.cpp | ||
52 | You are right. | |
autotests/testqscreenbackend.cpp | ||
174–175 | I feel the change is big enough as it is :) | |
backends/fake/parser.cpp | ||
187–189 | My understanding is that since it's a QMap<QString, ..> all things will be converted to QString in any case. |
tests/kwayland/waylandtestserver.cpp | ||
---|---|---|
39 | Concatenation is still faster with latin1string. |
backends/fake/parser.cpp | ||
---|---|---|
145 | It should be QLatin1String on contains? |
backends/fake/parser.cpp | ||
---|---|---|
145 |
I think micro-optimizing the tests further is simply not worth anyone's time. I'd propose taking this in (and if you spot more things, do them on top of this change).
I think micro-optimizing the tests further is simply not worth anyone's time
Me too.
Previous +2 applies