diff --git a/src/plugins/android/javalanguageserver.cpp b/src/plugins/android/javalanguageserver.cpp index 6ed0c983622..ca77497c17e 100644 --- a/src/plugins/android/javalanguageserver.cpp +++ b/src/plugins/android/javalanguageserver.cpp @@ -188,7 +188,7 @@ private: TemporaryDirectory m_workspaceDir = TemporaryDirectory("QtCreator-jls-XXXXXX"); }; -LanguageClient::BaseClientInterface *JLSSettings::createInterface() const +LanguageClient::BaseClientInterface *JLSSettings::createInterface(ProjectExplorer::Project *) const { auto interface = new JLSInterface(); CommandLine cmd{m_executable, arguments(), CommandLine::Raw}; diff --git a/src/plugins/android/javalanguageserver.h b/src/plugins/android/javalanguageserver.h index 1727da74a41..c2ef687cd64 100644 --- a/src/plugins/android/javalanguageserver.h +++ b/src/plugins/android/javalanguageserver.h @@ -42,7 +42,8 @@ public: void fromMap(const QVariantMap &map) final; LanguageClient::BaseSettings *copy() const final; LanguageClient::Client *createClient(LanguageClient::BaseClientInterface *interface) const final; - LanguageClient::BaseClientInterface *createInterface() const final; + LanguageClient::BaseClientInterface *createInterface( + ProjectExplorer::Project *project) const final; Utils::FilePath m_languageServer; diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp index bf4c3b9917e..020d1c938da 100644 --- a/src/plugins/languageclient/languageclientsettings.cpp +++ b/src/plugins/languageclient/languageclientsettings.cpp @@ -581,7 +581,7 @@ Client *BaseSettings::createClient(ProjectExplorer::Project *project) const { if (!isValid() || !m_enabled) return nullptr; - BaseClientInterface *interface = createInterfaceWithProject(project); + BaseClientInterface *interface = createInterface(project); QTC_ASSERT(interface, return nullptr); auto *client = createClient(interface); client->setName(Utils::globalMacroExpander()->expand(m_name)); @@ -592,6 +592,11 @@ Client *BaseSettings::createClient(ProjectExplorer::Project *project) const return client; } +BaseClientInterface *BaseSettings::createInterface(ProjectExplorer::Project *) const +{ + return nullptr; +} + Client *BaseSettings::createClient(BaseClientInterface *interface) const { return new Client(interface); @@ -772,7 +777,7 @@ Utils::CommandLine StdIOSettings::command() const return Utils::CommandLine(m_executable, arguments(), Utils::CommandLine::Raw); } -BaseClientInterface *StdIOSettings::createInterfaceWithProject(ProjectExplorer::Project *project) const +BaseClientInterface *StdIOSettings::createInterface(ProjectExplorer::Project *project) const { auto interface = new StdIOClientInterface; interface->setCommandLine(command()); diff --git a/src/plugins/languageclient/languageclientsettings.h b/src/plugins/languageclient/languageclientsettings.h index b7ff578237f..c9a93414914 100644 --- a/src/plugins/languageclient/languageclientsettings.h +++ b/src/plugins/languageclient/languageclientsettings.h @@ -105,13 +105,8 @@ public: virtual void fromMap(const QVariantMap &map); protected: - // TODO: remove in Qt Creator 6 and rename createInterfaceWithProject back to it - virtual BaseClientInterface *createInterface() const { return nullptr; } + virtual BaseClientInterface *createInterface(ProjectExplorer::Project *) const; virtual Client *createClient(BaseClientInterface *interface) const; - virtual BaseClientInterface *createInterfaceWithProject(ProjectExplorer::Project *) const - { - return createInterface(); - } BaseSettings(const BaseSettings &other) = default; BaseSettings(BaseSettings &&other) = default; @@ -141,7 +136,7 @@ public: Utils::CommandLine command() const; protected: - BaseClientInterface *createInterfaceWithProject(ProjectExplorer::Project *project) const override; + BaseClientInterface *createInterface(ProjectExplorer::Project *project) const override; StdIOSettings(const StdIOSettings &other) = default; StdIOSettings(StdIOSettings &&other) = default; diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index ddab091bf67..f40cc8689c6 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -480,8 +480,7 @@ public: TemporaryDirectory m_extraPythonPath; }; -BaseClientInterface *PyLSSettings::createInterfaceWithProject( - ProjectExplorer::Project *project) const +BaseClientInterface *PyLSSettings::createInterface(ProjectExplorer::Project *project) const { auto interface = new PyLSInterface; interface->setCommandLine(command()); diff --git a/src/plugins/python/pythonlanguageclient.h b/src/plugins/python/pythonlanguageclient.h index 42319377412..a66e96fcdfc 100644 --- a/src/plugins/python/pythonlanguageclient.h +++ b/src/plugins/python/pythonlanguageclient.h @@ -84,7 +84,7 @@ public: LanguageClient::Client *createClient(LanguageClient::BaseClientInterface *interface) const final; private: - LanguageClient::BaseClientInterface *createInterfaceWithProject( + LanguageClient::BaseClientInterface *createInterface( ProjectExplorer::Project *project) const override; static QJsonObject defaultConfiguration();