[scripting] Make DBus invokable run method return result after execution
ClosedPublic

Authored by davidedmundson on Jan 9 2019, 4:00 PM.

Details

Summary

In 403038 the user expected the DBus call to run to finish before
processing the next request. For a singleshot script that makes a lot of
sense, otherwise you have no idea when it finishes.

This also allows us to return errors.

CCBUG: 403038

Test Plan

NUM=$(qdbus org.kde.KWin /Scripting org.kde.kwin.Scripting.loadScript /noFile.js Minimize)
qdbus org.kde.KWin /$NUM org.kde.kwin.Scripting.run

Error: org.kde.kwin.Scripting.FileError
Could not open /noFile.js

Running a real script behaved effectively the same as before.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Jan 9 2019, 4:00 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 9 2019, 4:00 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Jan 9 2019, 4:00 PM
graesslin accepted this revision.Jan 9 2019, 5:26 PM
This revision is now accepted and ready to land.Jan 9 2019, 5:26 PM
zzag added a subscriber: zzag.Jan 25 2019, 1:09 PM

Is it good to go?

This revision was automatically updated to reflect the committed changes.