forked from qt-creator/qt-creator
DocumentLocatorFilter: protect with mutex a check for symbol cache
The value of m_symbolCache may change at any time in gui thread inside a call to updateCurrentClient(). Change-Id: I6aad37281ce8ec08f7b0ea5b2143e28dee507f72 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -153,9 +153,9 @@ void DocumentLocatorFilter::prepareSearch(const QString &/*entry*/)
|
||||
QList<Core::LocatorFilterEntry> DocumentLocatorFilter::matchesFor(
|
||||
QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry)
|
||||
{
|
||||
QMutexLocker locker(&m_mutex);
|
||||
if (!m_symbolCache)
|
||||
return {};
|
||||
QMutexLocker locker(&m_mutex);
|
||||
if (!m_currentSymbols.has_value()) {
|
||||
QEventLoop loop;
|
||||
connect(this, &DocumentLocatorFilter::symbolsUpToDate, &loop, [&]() { loop.exit(1); });
|
||||
|
Reference in New Issue
Block a user