Skip to content

Extract testable component from extractor process communication

Stefan Brüns requested to merge bruns/baloo:extractorprocess_pipe into master

The current communication between baloo_file and the extractor worker process is mostly untested, as it is buried inside the implementations of the two parts.

Extract as much as possible into two classes, implementing the two sides of the communication, and add unit tests.

For the status stream from the worker back to the controlling process, use a QDataStream instead of a QTextStream. The latter proves to be problematic when several status lines are received in a single read and the last line is incomplete when reading from the underlying QIODevice, leading to occasional hangs.

cc @ngraham See https://bugs.kde.org/show_bug.cgi?id=435521

Merge request reports