forked from qt-creator/qt-creator
ProjectExplorer: Add clangdExecutable to IDevice
Change-Id: I131212326696887d3a5644a35788f6a522dbee45 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user