SilverSearcher: Fix quitting the loop after resume

Quit the loop after resuming when the process already finished.

Amends cd70d10dce

Change-Id: I73d4b11bb2be47ce9cc6c6c816b60058bc2db250
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-06-01 18:59:53 +02:00
parent a5dfbe01d5
commit 7a42c32732

View File

@@ -162,6 +162,8 @@ static void runSilverSeacher(QPromise<SearchResultItems> &promise,
SilverSearcher::parse(promise, output, &parserState, regExp); SilverSearcher::parse(promise, output, &parserState, regExp);
} }
outputBuffer.clear(); outputBuffer.clear();
if (process.state() == QProcess::NotRunning)
loop.quit();
}); });
watcher.setFuture(future); watcher.setFuture(future);
loop.exec(QEventLoop::ExcludeUserInputEvents); loop.exec(QEventLoop::ExcludeUserInputEvents);