kded: fix up invalid current mode before saving
ClosedPublic

Authored by sebas on Jul 14 2016, 12:17 AM.

Details

Summary

When resizing a virtual machine, the current mode may become invalid.
In this case, we set the current mode id to the preferred modes and
avoid failing canBeApplied.

CCBUG:356864

Test Plan

Only compile-tested

Diff Detail

Repository
R104 KScreen
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sebas updated this revision to Diff 5138.Jul 14 2016, 12:17 AM
sebas retitled this revision from to kded: fix up invalid current mode before saving.
sebas updated this object.
sebas edited the test plan for this revision. (Show Details)
sebas added a reviewer: graesslin.
Restricted Application added a project: Plasma. · View Herald TranscriptJul 14 2016, 12:17 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin edited edge metadata.Jul 14 2016, 6:21 AM

I just pulled the change in my VM and it seems to not work yet.

kscreen: Requesting missing EDID for outputs (67)
kscreen.kded: Change detected
kscreen.kded: Current mode invalid, fixing up mode id
kscreen.kded: Current mode invalid, fixing up mode id
kscreen.kded: Current mode invalid, fixing up mode id
kscreen.kded: Current mode invalid, fixing up mode id
kscreen.kded: Saving current config to file
kscreen.kded: Calculating config ID for KScreen::Config(0x2217ee0)
kscreen.kded:   Part of the Id:  "Virtual-0"
kscreen.kded:   Config ID: "36f8d068f39d26df82751b9d028c4786"
kscreen.kded: Config saved on:  "/home/martin/.local/share/kscreen/36f8d068f39d26df82751b9d028c4786"

Though this is on top with my changes to libkscreen. Will revert those and test again.

Nope also with my libkscreen changes reverted it does not work yet.

sebas planned changes to this revision.Jul 27 2016, 1:14 PM
sebas added a comment.Oct 20 2016, 7:46 AM

To make it work, we'll also need https://phabricator.kde.org/D3117

I haven't tested it, though.

sebas requested a review of this revision.Oct 20 2016, 7:47 AM
sebas added a reviewer: Plasma.

Requesting review, as this patch is correct with the dynamic modelist changes. I'd like it in.

Merging it as I've asked for reviews repeatedly but nobody dares. I'm daring!

sebas abandoned this revision.Nov 10 2016, 7:26 PM

I've screwed up a rebase and accidentally pushed this patch as https://phabricator.kde.org/D3333 . I'll abandon this review, but the change was really pushed.

Sorry for the noise and possible confusion.

This revision was automatically updated to reflect the committed changes.