forked from qt-creator/qt-creator
LanguageClient: avoid optional::value
Potentially throws std::bad_optional_access. Use operator* and operator-> instead. Change-Id: Idefa137da53f3663ea88961f1105b93402ec4777 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -117,7 +117,7 @@ void DocumentSymbolCache::handleResponse(const DocumentUri &uri,
|
||||
m_runningRequests.remove(uri);
|
||||
if (Utils::optional<DocumentSymbolsRequest::Response::Error> error = response.error()) {
|
||||
if (m_client)
|
||||
m_client->log(error.value());
|
||||
m_client->log(*error);
|
||||
}
|
||||
const DocumentSymbolsResult &symbols = response.result().value_or(DocumentSymbolsResult());
|
||||
m_cache[uri] = symbols;
|
||||
|
||||
Reference in New Issue
Block a user