forked from qt-creator/qt-creator
LanguageClient: Allow to log to console rather than message window
And make use of that in ClangdClient. When I get a slowdown while typing, it is usually accompanied by the clangd message "Request cancelled because the document was modified" occurring in the message window, often many times in a row. I'd like to find out whether writing to the message window itself is a contributing factor to the slowdown. Change-Id: Iff7c459af0aed27d22366b9aade573f51eb5dbc7 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1133,7 +1133,14 @@ void Client::handleMessage(const BaseMessage &message)
|
||||
|
||||
void Client::log(const QString &message) const
|
||||
{
|
||||
Core::MessageManager::writeFlashing(QString("LanguageClient %1: %2").arg(name(), message));
|
||||
switch (m_logTarget) {
|
||||
case LogTarget::Ui:
|
||||
Core::MessageManager::writeFlashing(QString("LanguageClient %1: %2").arg(name(), message));
|
||||
break;
|
||||
case LogTarget::Console:
|
||||
qCDebug(LOGLSPCLIENT) << message;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const ServerCapabilities &Client::capabilities() const
|
||||
|
||||
Reference in New Issue
Block a user