D16266: [Extractor] Make extractor crash resilient

Aleix Pol Gonzalez noreply at phabricator.kde.org
Wed Oct 17 00:12:22 BST 2018


apol added inline comments.

INLINE COMMENTS

> extractorprocess.cpp:35
> +    connect(&m_extractorProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
> +            [=](int exitCode, QProcess::ExitStatus exitStatus)
> +            {

Shouldn't it check the exitCode too?

> extractorprocess.cpp:54
> +    m_extractorProcess.start(QIODevice::Unbuffered | QIODevice::ReadWrite);
> +    m_extractorProcess.waitForStarted();
> +    m_extractorProcess.setReadChannel(QProcess::StandardOutput);

Do you really need to waitForStarted?

> filecontentindexer.cpp:74
>  
> +        bool hadErrors{false};
> +        connect(&process, &ExtractorProcess::failed, &loop, [&hadErrors, &loop]() { hadErrors = true; loop.quit(); });

`= false;`

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D16266

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: apol, kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181016/b723ec04/attachment.html>


More information about the Kde-frameworks-devel mailing list