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 <QToolButton>
|
||||||
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -168,6 +169,13 @@ public:
|
|||||||
void stopCurrentContainer();
|
void stopCurrentContainer();
|
||||||
void fetchSystemEnviroment();
|
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);
|
bool addTemporaryMount(const FilePath &path, const FilePath &containerPath);
|
||||||
|
|
||||||
QStringList createMountArgs() const;
|
QStringList createMountArgs() const;
|
||||||
@@ -1160,4 +1168,9 @@ bool DockerDevice::prepareForBuild(const Target *target)
|
|||||||
return d->prepareForBuild(target);
|
return d->prepareForBuild(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::optional<FilePath> DockerDevice::clangdExecutable() const
|
||||||
|
{
|
||||||
|
return d->clangdExecutable();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Docker::Internal
|
} // namespace Docker::Internal
|
||||||
|
@@ -99,6 +99,7 @@ public:
|
|||||||
void setMounts(const QStringList &mounts) const;
|
void setMounts(const QStringList &mounts) const;
|
||||||
|
|
||||||
bool prepareForBuild(const ProjectExplorer::Target *target) override;
|
bool prepareForBuild(const ProjectExplorer::Target *target) override;
|
||||||
|
std::optional<Utils::FilePath> clangdExecutable() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void fromMap(const QVariantMap &map) final;
|
void fromMap(const QVariantMap &map) final;
|
||||||
|
@@ -650,6 +650,11 @@ bool IDevice::prepareForBuild(const Target *target)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::optional<Utils::FilePath> IDevice::clangdExecutable() const
|
||||||
|
{
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
void DeviceProcessSignalOperation::setDebuggerCommand(const FilePath &cmd)
|
void DeviceProcessSignalOperation::setDebuggerCommand(const FilePath &cmd)
|
||||||
{
|
{
|
||||||
m_debuggerCommand = cmd;
|
m_debuggerCommand = cmd;
|
||||||
|
@@ -235,6 +235,7 @@ public:
|
|||||||
virtual bool ensureReachable(const Utils::FilePath &other) const;
|
virtual bool ensureReachable(const Utils::FilePath &other) const;
|
||||||
|
|
||||||
virtual bool prepareForBuild(const Target *target);
|
virtual bool prepareForBuild(const Target *target);
|
||||||
|
virtual std::optional<Utils::FilePath> clangdExecutable() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
IDevice();
|
IDevice();
|
||||||
|
Reference in New Issue
Block a user