forked from qt-creator/qt-creator
LanguageClient: Add the project display name to the client name
If the client was opened for a specific project. Change-Id: Iafc9f5d46d06e2e656702260f297d6b2b998a431 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -100,6 +100,13 @@ Client::Client(BaseClientInterface *clientInterface)
|
||||
&Client::rehighlight);
|
||||
}
|
||||
|
||||
QString Client::name() const
|
||||
{
|
||||
if (m_project && !m_project->displayName().isEmpty())
|
||||
return tr("%1 for %2").arg(m_displayName, m_project->displayName());
|
||||
return m_displayName;
|
||||
}
|
||||
|
||||
static void updateEditorToolBar(QList<TextEditor::TextDocument *> documents)
|
||||
{
|
||||
for (TextEditor::TextDocument *document : documents) {
|
||||
|
@@ -87,7 +87,7 @@ public:
|
||||
// basic properties
|
||||
Utils::Id id() const { return m_id; }
|
||||
void setName(const QString &name) { m_displayName = name; }
|
||||
QString name() const { return m_displayName; }
|
||||
QString name() const;
|
||||
void sendContent(const LanguageServerProtocol::IContent &content);
|
||||
void cancelRequest(const LanguageServerProtocol::MessageId &id);
|
||||
|
||||
|
Reference in New Issue
Block a user