forked from qt-creator/qt-creator
DocumentSymbolCache: Don't schedule duplicate requests
Avoid scheduling a new request for the uri when a request for the same uri is currently running. Change-Id: Iac056b275c62e8640bf43a0ec9b6b6561b44eaed Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -40,6 +40,8 @@ DocumentSymbolCache::DocumentSymbolCache(Client *client)
|
|||||||
|
|
||||||
void DocumentSymbolCache::requestSymbols(const DocumentUri &uri, Schedule schedule)
|
void DocumentSymbolCache::requestSymbols(const DocumentUri &uri, Schedule schedule)
|
||||||
{
|
{
|
||||||
|
if (m_runningRequests.contains(uri))
|
||||||
|
return;
|
||||||
m_compressedUris.insert(uri);
|
m_compressedUris.insert(uri);
|
||||||
switch (schedule) {
|
switch (schedule) {
|
||||||
case Schedule::Now:
|
case Schedule::Now:
|
||||||
|
Reference in New Issue
Block a user