BUG: 417276
Details
- Reviewers
bport ervin crossi davidedmundson - Group Reviewers
Plasma - Commits
- R119:8f1043c641a2: KCM/ComponentChooser Treat cases when there is no app for a usage
Have no email client installed.
In kcm componentchooser
- select another browser
- Save
Before:
- Crash
After:
- No crash
Diff Detail
- Repository
- R119 Plasma Desktop
- Branch
- arcpatch-D27384
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 22490 Build 22508: arc lint + arc unit
kcms/componentchooser/componentchooserbrowser.cpp | ||
---|---|---|
107 | add a space between - and 1 By the way this check seems strange to me, can you confirm it still allow to save custom browser ? |
kcms/componentchooser/componentchooserbrowser.cpp | ||
---|---|---|
107 | Once the user has added browsers to the list, they appear as before last entries. |
standardize how we check if the combobox has a value to save, allow to mark the value as changed when there was no value selected at the beginning
kcms/componentchooser/componentchooseremail.cpp | ||
---|---|---|
154 ↗ | (On Diff #75691) | While you are here, can you had a check on this pointer. I don't understand why there is one below but not here. |
kcms/componentchooser/componentchooserfilemanager.cpp | ||
117 | I would have kept this test that is more clearer than if (currentIndex() == count() - 1) {} if you confirm it works the same. |
Clean a redundant check, ensure that if the user cancels selecting a custom app, the right entry is selected and hasChanged reflects the state correctly
kcms/componentchooser/componentchooseremail.cpp | ||
---|---|---|
154 ↗ | (On Diff #75691) | I would rather do the opposite the check below is for historical reasons from before my refactoring. |
kcms/componentchooser/componentchooserfilemanager.cpp | ||
117 | It would test twice the same thing : only the last value in the combobox can have an empty currendData. |
kcms/componentchooser/componentchooseremail.cpp | ||
---|---|---|
154 ↗ | (On Diff #75691) | I meant to remove the check below (which I did). |
I thought the bug was that we weren't checking the RC from KService::serviceByStorageId before using it
kcms/componentchooser/componentchooseremail.cpp | ||
---|---|---|
155 ↗ | (On Diff #75695) | This actually feels less safe now. What if KService returned a nullptr for some reason? I understand from the logic of early returns you introduced everywhere that you *expect* something. Still I wonder if that's really guaranteed by KService, we could expect bad config somewhere maybe? |
kcms/componentchooser/componentchooserterminal.cpp | ||
121 | This comes back often in this patch and feels a bit cryptic, probably worth having a properly named method for it. |
Add a validLastCurrentIndex function, check emailClientService is not null before using it
kcms/componentchooser/componentchooser.h | ||
---|---|---|
51 ↗ | (On Diff #75691) | { in new line, add const |