[Containment Appearance] Make sure to always load a config view
ClosedPublic

Authored by broulik on Jan 1 2017, 10:21 PM.

Details

Summary

If StackView is empty, currentItem will be null and we would break all over the place.
This can happen when you have a wallpaper without config, so "sourceFile" would stay empty and thus onSourceFileChanged wouldn't be triggered and we wouldn't load anything into our StackView.

BUG: 360862
FIXED-IN: 5.8.6

Test Plan

Switching between wallpapers still works (minus the usual glitches of default values not being applied but that's a different story) and applying settings. I can now switch between Hunyango and Haenau no problem.

Ideally this dialog was refactored to use onActivated instead of onCurrentIndexChanged and Component.onCompleted to populate itself etc etc but when I did something similar to applet config dialog, it broke various places relying on the fact that values change *after* creation, so let's go with this least invasive patch, for 5.8 series anyway.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik retitled this revision from to [Containment Appearance] Make sure to always load a config view.Jan 1 2017, 10:21 PM
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 1 2017, 10:21 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Jan 2 2017, 10:29 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Jan 2 2017, 10:29 AM
This revision was automatically updated to reflect the committed changes.