Copy user face icon synchronously
AbandonedPublic

Authored by davidk on Jan 28 2017, 4:28 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

Otherwise the CopyJopb thead will be killed if the user clicks the "OK"
button, because kcmshell5 quits. Thus the icon won't get saved.
As the face file is limited to a width of 600px it shouldn't block too
long.

Test Plan

Changing the face icon and clicking "OK" actually changes ~/.face. It didn't change before.

Diff Detail

Repository
R128 User Manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
davidk updated this revision to Diff 10656.Jan 28 2017, 4:28 PM
davidk retitled this revision from to Copy user face icon synchronously.
davidk updated this object.
davidk edited the test plan for this revision. (Show Details)
Restricted Application added a project: Plasma. · View Herald TranscriptJan 28 2017, 4:28 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidk updated this object.Jan 28 2017, 4:31 PM
davidk edited the test plan for this revision. (Show Details)
davidk added a reviewer: Plasma.
davidk updated this revision to Diff 10657.Jan 28 2017, 4:35 PM

Move the file instead of copying it

I think this is just working around the fact that a KCM has no way of postponing the closing/deletion of the dialog when OK is clicked. We have the issue of OK not saving settings properly in various other places that use jobs, too.

davidk updated this revision to Diff 10658.Jan 28 2017, 4:40 PM

Fix method name

davidk abandoned this revision.Jan 28 2017, 4:41 PM

This needs more changes, will upload again if everything works.

davidk added a comment.EditedJan 28 2017, 5:36 PM

I think this is just working around the fact that a KCM has no way of postponing the closing/deletion of the dialog when OK is clicked. We have the issue of OK not saving settings properly in various other places that use jobs, too.

Yes this is just a workaround, as there is currently no such way.
It would be nice if KCModule::save() would return a list of KJob's to wait for, but this is not possible without API breakage. Maybe something like "KCModule::registerSavingJob(KJob *job)" and "QList<KJob> KCModule::getSaveingJobs()" ? Then KCMultiDialog could postpone closing the dialog until all jobs are finished, and maybe show a progressdialog if it lasts too long? This would need a version bump I guess..