From 75ac93db00098a2a053513e79472b3a562a789ec Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 11 Jan 2024 13:45:24 +0100 Subject: [PATCH] LSP: Make it obvious which functions need overloads Change-Id: Ib452770a2ec3938183428ac86bfb3955de231a13 Reviewed-by: David Schulz --- src/plugins/languageclient/languageclientsettings.cpp | 5 ----- src/plugins/languageclient/languageclientsettings.h | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp index 35ac05a8164..1c99a929e54 100644 --- a/src/plugins/languageclient/languageclientsettings.cpp +++ b/src/plugins/languageclient/languageclientsettings.cpp @@ -557,11 +557,6 @@ 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); diff --git a/src/plugins/languageclient/languageclientsettings.h b/src/plugins/languageclient/languageclientsettings.h index 51109a05c9e..867a0deb2ec 100644 --- a/src/plugins/languageclient/languageclientsettings.h +++ b/src/plugins/languageclient/languageclientsettings.h @@ -75,7 +75,7 @@ public: virtual bool applyFromSettingsWidget(QWidget *widget); virtual QWidget *createSettingsWidget(QWidget *parent = nullptr) const; - virtual BaseSettings *copy() const { return new BaseSettings(*this); } + virtual BaseSettings *copy() const = 0; virtual bool isValid() const; Client *createClient() const; Client *createClient(ProjectExplorer::Project *project) const; @@ -83,7 +83,7 @@ public: virtual void fromMap(const Utils::Store &map); protected: - virtual BaseClientInterface *createInterface(ProjectExplorer::Project *) const; + virtual BaseClientInterface *createInterface(ProjectExplorer::Project *) const = 0; virtual Client *createClient(BaseClientInterface *interface) const; BaseSettings(const BaseSettings &other) = default;