forked from qt-creator/qt-creator
LSP: const correct ShowMessageParams::toString()
Change-Id: I663c57aff8b23acbdaca1149e59f8f5f35bcfb94 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -67,7 +67,7 @@ static QString messageTypeName(int messageType)
|
|||||||
return QString("");
|
return QString("");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ShowMessageParams::toString()
|
QString ShowMessageParams::toString() const
|
||||||
{
|
{
|
||||||
return messageTypeName(type()) + ": " + message();
|
return messageTypeName(type()) + ": " + message();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
QString message() const { return typedValue<QString>(messageKey); }
|
QString message() const { return typedValue<QString>(messageKey); }
|
||||||
void setMessage(QString message) { insert(messageKey, message); }
|
void setMessage(QString message) { insert(messageKey, message); }
|
||||||
|
|
||||||
QString toString();
|
QString toString() const;
|
||||||
|
|
||||||
bool isValid(QStringList *error) const override
|
bool isValid(QStringList *error) const override
|
||||||
{ return check<int>(error, typeKey) && check<QString>(error, messageKey); }
|
{ return check<int>(error, typeKey) && check<QString>(error, messageKey); }
|
||||||
|
|||||||
@@ -516,7 +516,8 @@ void BaseClient::log(const QString &message, Core::MessageManager::PrintToOutput
|
|||||||
Core::MessageManager::write(QString("LanguageClient %1: %2").arg(name(), message), flag);
|
Core::MessageManager::write(QString("LanguageClient %1: %2").arg(name(), message), flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseClient::log(LogMessageParams &message, Core::MessageManager::PrintToOutputPaneFlag flag)
|
void BaseClient::log(const LogMessageParams &message,
|
||||||
|
Core::MessageManager::PrintToOutputPaneFlag flag)
|
||||||
{
|
{
|
||||||
log(message.toString(), flag);
|
log(message.toString(), flag);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public:
|
|||||||
|
|
||||||
void log(const QString &message,
|
void log(const QString &message,
|
||||||
Core::MessageManager::PrintToOutputPaneFlag flag = Core::MessageManager::NoModeSwitch);
|
Core::MessageManager::PrintToOutputPaneFlag flag = Core::MessageManager::NoModeSwitch);
|
||||||
void log(LanguageServerProtocol::LogMessageParams &message,
|
void log(const LanguageServerProtocol::LogMessageParams &message,
|
||||||
Core::MessageManager::PrintToOutputPaneFlag flag = Core::MessageManager::NoModeSwitch);
|
Core::MessageManager::PrintToOutputPaneFlag flag = Core::MessageManager::NoModeSwitch);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
Reference in New Issue
Block a user