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