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
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 774 Build 787: arc lint + arc unit
cool, thanks.
tests/kwayland/waylandtestserver.cpp | ||
---|---|---|
39 ↗ | (On Diff #37599) | shouldn't that be a QStringLiteral? |
autotests/testkwaylandbackend.cpp | ||
---|---|---|
88 ↗ | (On Diff #37599) | Why true? |
autotests/testlog.cpp | ||
52 ↗ | (On Diff #37599) | 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 ↗ | (On Diff #37599) | Not from local 8 bit? |
174 ↗ | (On Diff #37599) | Could use initializer list |
autotests/testscreenconfig.cpp | ||
104 ↗ | (On Diff #37599) | QLatin1String? |
backends/fake/parser.cpp | ||
187 ↗ | (On Diff #37599) | QLatin1String? |
backends/xrandr1.1/xrandr11.cpp | ||
174 ↗ | (On Diff #37599) | QLatin1Char? |
autotests/testkwaylandbackend.cpp | ||
---|---|---|
88 ↗ | (On Diff #37599) | Indeed, that makes no sense. |
autotests/testlog.cpp | ||
52 ↗ | (On Diff #37599) | You are right. |
autotests/testqscreenbackend.cpp | ||
174 ↗ | (On Diff #37599) | I feel the change is big enough as it is :) |
backends/fake/parser.cpp | ||
187 ↗ | (On Diff #37599) | 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 ↗ | (On Diff #37599) | Concatenation is still faster with latin1string. |
backends/fake/parser.cpp | ||
---|---|---|
145 ↗ | (On Diff #37599) | It should be QLatin1String on contains? |
backends/fake/parser.cpp | ||
---|---|---|
145 ↗ | (On Diff #37599) |
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