forked from qt-creator/qt-creator
Core: Allow to pass a reason for a failed search
... and make use of it in the LanguageClient. Change-Id: I7e47a7419c7168c5e26709ae225e4887d4c5089b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -401,8 +401,11 @@ void SymbolSupport::handleRenameResponse(Core::SearchResult *search,
|
||||
const RenameRequest::Response &response)
|
||||
{
|
||||
const std::optional<PrepareRenameRequest::Response::Error> &error = response.error();
|
||||
if (error.has_value())
|
||||
QString errorMessage;
|
||||
if (error.has_value()) {
|
||||
m_client->log(*error);
|
||||
errorMessage = error->toString();
|
||||
}
|
||||
|
||||
const std::optional<WorkspaceEdit> &edits = response.result();
|
||||
if (edits.has_value()) {
|
||||
@@ -412,7 +415,7 @@ void SymbolSupport::handleRenameResponse(Core::SearchResult *search,
|
||||
search->setSearchAgainEnabled(false);
|
||||
search->finishSearch(false);
|
||||
} else {
|
||||
search->finishSearch(error.has_value());
|
||||
search->finishSearch(error.has_value(), errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user