This also replaces some for-loops with C++11 range based for-loops and switches for simpler if/else control blocks.
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Commits
- R265:45b6460b0c09: [KColorScheme/KStatefulBrush] Switch hardcoded numbers for enum items
Open colorscheme editor in the Colors KCM to see if any colors or effects look broken.
Diff Detail
- Repository
- R265 KConfigWidgets
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
This also replaces some for-loops with C++11 range based for-loops and switches for simpler if/else control blocks.
Seems like these changes are unrelated and should maybe be in a separate commit?
The intention of the patch is to reduce the number of hardcoded values, so they're related. It wouldn't make sense to switch the hardcoded for-loop ranges for the enum values introduced in the parent patch only to replace them with range based for-loops immediately afterward.
So many hardcoded numbers! Much better indeed.
src/kcolorscheme.cpp | ||
---|---|---|
88–90 | coding style: space after for, and add { ... } around the body, with newlines. | |
397–400 | coding style: if ( with a space (repeats) | |
602 | The & seems overkill (and confused me because it looks non-const). |
- [KColorScheme/KStatefulBrush] Switch hardcoded numbers for enum items
- fix code style