summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/locator
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-08-21 17:25:27 +0200
committerEike Ziller <eike.ziller@digia.com>2014-08-25 08:07:29 +0200
commit6fc39f0c41c248be00c5673ae80d03d115bf3739 (patch)
tree059cadb839df7001494dad6ffa80dbdddb52d213 /src/plugins/coreplugin/locator
parente0b518b832790b790b5fd34d8576daefcf33bf33 (diff)
downloadqt-creator-6fc39f0c41c248be00c5673ae80d03d115bf3739.tar.gz
Locator: Fix deadlock
Updating the completion list is done in a separate thread, and for the all and current project filters that requires a slot to be synchronously executed on the main thread. Triggering the update first canceled a running update and waited for it to finish, before starting the next update. If the first update hadn't run its code on the main thread yet, it was never be able to, and never finished. The patch just removes the waitForFinished after the cancel. There is no reason to wait, since we retrieve all results only when we get the finished signal of a non-canceled update anyhow. Broke with 05c267673f43ecbb0ae4c44adc7d02a690435f8b when fixing QTCREATORBUG-12592 Task-number: QTCREATORBUG-12875 Change-Id: Iba9d46d469e6b2c7e894963d964c2eaca4bc4d93 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/plugins/coreplugin/locator')
-rw-r--r--src/plugins/coreplugin/locator/locatorwidget.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp
index 93d02df015..07e80e557f 100644
--- a/src/plugins/coreplugin/locator/locatorwidget.cpp
+++ b/src/plugins/coreplugin/locator/locatorwidget.cpp
@@ -483,7 +483,6 @@ void LocatorWidget::updateCompletionList(const QString &text)
// cancel the old future
m_entriesWatcher->future().cancel();
- m_entriesWatcher->future().waitForFinished();
QFuture<LocatorFilterEntry> future = QtConcurrent::run(runSearch, filters, searchText);
m_entriesWatcher->setFuture(future);