From aef1bb943d9a94871b58658a15435552a732b674 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 18 Feb 2021 18:35:01 +0100 Subject: [PATCH] Use QMutexLocker in conjunction with QWaitCondition Change-Id: Ia5d55b9161a58387b0806e792f0fb1b21f118330 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/locator/spotlightlocatorfilter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/locator/spotlightlocatorfilter.cpp b/src/plugins/coreplugin/locator/spotlightlocatorfilter.cpp index 5cd59f97988..f333d11b301 100644 --- a/src/plugins/coreplugin/locator/spotlightlocatorfilter.cpp +++ b/src/plugins/coreplugin/locator/spotlightlocatorfilter.cpp @@ -168,12 +168,11 @@ void SpotlightIterator::ensureNext() if (m_index + 1 < m_filePaths.size()) // nothing to do return; // check if there are items in the queue, otherwise wait for some - m_mutex.lock(); + QMutexLocker lock(&m_mutex); if (m_queue.isEmpty() && !m_finished) m_waitForItems.wait(&m_mutex); m_filePaths.append(m_queue); m_queue.clear(); - m_mutex.unlock(); } // #pragma mark -- SpotlightLocatorFilter