aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMarcus Tillmanns <[email protected]>2022-12-02 15:41:02 +0100
committerMarcus Tillmanns <[email protected]>2022-12-09 14:00:19 +0000
commitbcfaf00d0063cd549e0edaf17d70b9c8228a4dff (patch)
treea0c87b8d81ed12cbbb75cad6c6344ca55ff22324 /src/plugins
parentd3487b1bde9d5814714fcaad3ef2e653aac336ef (diff)
ProjectExplorer: Add clangdExecutable to IDevice
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/docker/dockerdevice.cpp13
-rw-r--r--src/plugins/docker/dockerdevice.h1
-rw-r--r--src/plugins/projectexplorer/devicesupport/idevice.cpp5
-rw-r--r--src/plugins/projectexplorer/devicesupport/idevice.h1
4 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp
index d2f96aa144e..2646492eead 100644
--- a/src/plugins/docker/dockerdevice.cpp
+++ b/src/plugins/docker/dockerdevice.cpp
@@ -68,6 +68,7 @@
#include <QToolButton>
#include <numeric>
+#include <optional>
#ifdef Q_OS_UNIX
#include <sys/types.h>
@@ -168,6 +169,13 @@ public:
void stopCurrentContainer();
void fetchSystemEnviroment();
+ std::optional<FilePath> clangdExecutable() const
+ {
+ if (m_data.clangdExecutable.isEmpty())
+ return std::nullopt;
+ return m_data.clangdExecutable;
+ }
+
bool addTemporaryMount(const FilePath &path, const FilePath &containerPath);
QStringList createMountArgs() const;
@@ -1160,4 +1168,9 @@ bool DockerDevice::prepareForBuild(const Target *target)
return d->prepareForBuild(target);
}
+std::optional<FilePath> DockerDevice::clangdExecutable() const
+{
+ return d->clangdExecutable();
+}
+
} // namespace Docker::Internal
diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h
index 7bf12d961f2..cedb045205f 100644
--- a/src/plugins/docker/dockerdevice.h
+++ b/src/plugins/docker/dockerdevice.h
@@ -99,6 +99,7 @@ public:
void setMounts(const QStringList &mounts) const;
bool prepareForBuild(const ProjectExplorer::Target *target) override;
+ std::optional<Utils::FilePath> clangdExecutable() const override;
protected:
void fromMap(const QVariantMap &map) final;
diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp
index 7bf8af38c1f..570bf994940 100644
--- a/src/plugins/projectexplorer/devicesupport/idevice.cpp
+++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp
@@ -650,6 +650,11 @@ bool IDevice::prepareForBuild(const Target *target)
return true;
}
+std::optional<Utils::FilePath> IDevice::clangdExecutable() const
+{
+ return std::nullopt;
+}
+
void DeviceProcessSignalOperation::setDebuggerCommand(const FilePath &cmd)
{
m_debuggerCommand = cmd;
diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h
index cc91ae00f21..f26cb2885f4 100644
--- a/src/plugins/projectexplorer/devicesupport/idevice.h
+++ b/src/plugins/projectexplorer/devicesupport/idevice.h
@@ -235,6 +235,7 @@ public:
virtual bool ensureReachable(const Utils::FilePath &other) const;
virtual bool prepareForBuild(const Target *target);
+ virtual std::optional<Utils::FilePath> clangdExecutable() const;
protected:
IDevice();