Simplify Query usage in CLI plugins
ClosedPublic

Authored by elvisangelaccio on Oct 31 2016, 5:02 PM.

Details

Summary

CliInterface-based plugins run from the main thread, so there is no need to
emit the userQuery signal and then call Query::waitForResponse().
They can directly call Query::execute() instead.

Also improve the apidox about this and add a warning
in case we forget it in the future.

Test Plan

Try to use a query from a cli plugin (e.g. open an header-encrypted rar
archive).

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Simplify Query usage in CLI plugins.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptOct 31 2016, 5:02 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
  • Don't lock mutex if not necessary
rthomsen accepted this revision.Nov 5 2016, 10:47 AM
rthomsen edited edge metadata.

Ship it! :)

This revision is now accepted and ready to land.Nov 5 2016, 10:47 AM
This revision was automatically updated to reflect the committed changes.