[kcmkwin] Make dialog non blocking
ClosedPublic

Authored by davidedmundson on Mar 25 2020, 11:42 PM.

Details

Summary

It's invoked from QML.

Nested event loops invoked directly from QML is asking for crashes.

BUG: 419118

Test Plan

Opened KCM
Opened dialog for some settings
Window was still modal as before
Settings were saved
(though they didn't seem to be applied..maybe another bug?)

Diff Detail

Repository
R108 KWin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24241
Build 24259: arc lint + arc unit
Restricted Application added a project: KWin. · View Herald TranscriptMar 25 2020, 11:42 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Mar 25 2020, 11:42 PM

Like a ninja, no-one will see this update

apol accepted this revision.Mar 26 2020, 12:09 AM
This revision is now accepted and ready to land.Mar 26 2020, 12:09 AM
zzag added a subscriber: zzag.Mar 26 2020, 7:19 AM

Heh, it appears like both Eike and I used code from the old effects kcm without thinking if it's actually okay. Thank you for fixing this issue.

(though they didn't seem to be applied..maybe another bug?)

No, they're applied. What effects did you try to configure?

zzag added inline comments.Mar 26 2020, 8:18 AM
kcmkwin/common/effectsmodel.cpp
669–671

The lambda is redundant. I think you could just connect KCModule::save() directly, e.g.

connect(dialog, &QDialog::accepted, module, &KCModule::save);
This revision was automatically updated to reflect the committed changes.