diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 2abd9ed946e..64d1b1edf6e 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -667,6 +667,11 @@ DeviceEnvironmentFetcher::Ptr DockerDevice::environmentFetcher() const return DeviceEnvironmentFetcher::Ptr(); } +bool DockerDevice::usableAsBuildDevice() const +{ + return true; +} + FilePath DockerDevice::mapToGlobalPath(const FilePath &pathOnDevice) const { if (pathOnDevice.needsDevice()) { diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h index 32997070693..7de2a762829 100644 --- a/src/plugins/docker/dockerdevice.h +++ b/src/plugins/docker/dockerdevice.h @@ -76,6 +76,7 @@ public: ProjectExplorer::DeviceTester *createDeviceTester() const override; ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override; ProjectExplorer::DeviceEnvironmentFetcher::Ptr environmentFetcher() const override; + bool usableAsBuildDevice() const override; Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override; QString mapToDevicePath(const Utils::FilePath &globalPath) const override; diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp index 9b21fc0f79d..baee2cd84eb 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp @@ -126,6 +126,11 @@ QUrl DesktopDevice::toolControlChannel(const ControlChannelHint &) const return url; } +bool DesktopDevice::usableAsBuildDevice() const +{ + return true; +} + bool DesktopDevice::handlesFile(const FilePath &filePath) const { return !filePath.needsDevice(); diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.h b/src/plugins/projectexplorer/devicesupport/desktopdevice.h index 8f7de354a2d..b310c73b7d3 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.h +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.h @@ -30,6 +30,7 @@ public: DeviceProcessSignalOperation::Ptr signalOperation() const override; DeviceEnvironmentFetcher::Ptr environmentFetcher() const override; QUrl toolControlChannel(const ControlChannelHint &) const override; + bool usableAsBuildDevice() const override; bool handlesFile(const Utils::FilePath &filePath) const override; Utils::Environment systemEnvironment() const override; diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 06f1e28929d..3e144a9e502 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -137,6 +137,8 @@ public: virtual bool isCompatibleWith(const Kit *k) const; virtual QList validate() const; + virtual bool usableAsBuildDevice() const { return false; } + QString displayType() const; Utils::OsType osType() const; diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp index b5b9f47bc8d..556cade2299 100644 --- a/src/plugins/projectexplorer/kitinformation.cpp +++ b/src/plugins/projectexplorer/kitinformation.cpp @@ -13,8 +13,6 @@ #include "toolchain.h" #include "toolchainmanager.h" -#include - #include #include #include @@ -1183,8 +1181,7 @@ private: const DeviceManager *dm = DeviceManager::instance(); for (int i = 0; i < dm->deviceCount(); ++i) { IDevice::ConstPtr device = dm->deviceAt(i); - if (!(device->type() == Constants::DESKTOP_DEVICE_TYPE - || device->type() == Docker::Constants::DOCKER_DEVICE_TYPE)) + if (!device->usableAsBuildDevice()) blackList.append(device->id()); }