forked from qt-creator/qt-creator
ClangCodeModel: Get document symbols immediately
... when doing a decl/def switch via clangd. The delay is fine for e.g. populating the outline, but shouldn't be used when dealing with explicit user requests. Change-Id: I0350ed6daf8220ec3b702a3876fbf0f726da8a67 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -54,10 +54,17 @@ DocumentSymbolCache::DocumentSymbolCache(Client *client)
|
||||
connect(&m_compressionTimer, &QTimer::timeout, this, &DocumentSymbolCache::requestSymbolsImpl);
|
||||
}
|
||||
|
||||
void DocumentSymbolCache::requestSymbols(const DocumentUri &uri)
|
||||
void DocumentSymbolCache::requestSymbols(const DocumentUri &uri, Schedule schedule)
|
||||
{
|
||||
m_compressedUris.insert(uri);
|
||||
m_compressionTimer.start(200);
|
||||
switch (schedule) {
|
||||
case Schedule::Now:
|
||||
requestSymbolsImpl();
|
||||
break;
|
||||
case Schedule::Delayed:
|
||||
m_compressionTimer.start(200);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DocumentSymbolCache::requestSymbolsImpl()
|
||||
|
||||
Reference in New Issue
Block a user