Browse Source

searchengine: use kill() instead of terminate() on Windows

adaptive-webui-19844
Gabriele 10 years ago
parent
commit
7c00e80f7a
  1. 10
      src/searchengine/searchengine.cpp

10
src/searchengine/searchengine.cpp

@ -482,7 +482,11 @@ void SearchEngine::appendSearchResult(const QString &line) @@ -482,7 +482,11 @@ void SearchEngine::appendSearchResult(const QString &line)
{
if (activeSearchTab.isNull()) {
if (searchProcess->state() != QProcess::NotRunning) {
#ifdef Q_OS_WIN
searchProcess->kill();
#else
searchProcess->terminate();
#endif
searchProcess->waitForFinished(1000);
}
if (searchTimeout->isActive())
@ -532,8 +536,12 @@ void SearchEngine::closeTab(int index) @@ -532,8 +536,12 @@ void SearchEngine::closeTab(int index)
// Search is run for active tab so if user decided to close it, then stop search
if (!activeSearchTab.isNull() && index == tabWidget->indexOf(activeSearchTab)) {
qDebug("Closed active search Tab");
if (searchProcess->state() != QProcess::NotRunning)
if (searchProcess->state() != QProcess::NotRunning) {
#ifdef Q_OS_WIN
searchProcess->kill();
#else
searchProcess->terminate();
#endif
searchProcess->waitForFinished(1000);
}
if (searchTimeout->isActive())

Loading…
Cancel
Save