diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index 37a707968a8..5ca295f3733 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -419,7 +419,7 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice:: return; } - if (runnable.executable.isEmpty()) { + if (!device->isEmptyCommandAllowed() && runnable.executable.isEmpty()) { doReportError(ApplicationLauncher::tr("Cannot run: No command given.")); setFinished(); return; diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index f4c4904efb6..d3015b1dacc 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -152,6 +152,7 @@ public: Utils::PortList freePorts; QString debugServerPath; QString qmlsceneCommand; + bool emptyCommandAllowed = false; QList deviceIcons; QList deviceActions; @@ -189,6 +190,16 @@ void IDevice::openTerminal(const Utils::Environment &env, const QString &working d->openTerminal(env, workingDir); } +bool IDevice::isEmptyCommandAllowed() const +{ + return d->emptyCommandAllowed; +} + +void IDevice::setAllowEmptyCommand(bool allow) +{ + d->emptyCommandAllowed = allow; +} + IDevice::~IDevice() = default; /*! diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index c3caaa617ff..9e046ac14ca 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -221,6 +221,9 @@ public: bool canOpenTerminal() const; void openTerminal(const Utils::Environment &env, const QString &workingDir) const; + bool isEmptyCommandAllowed() const; + void setAllowEmptyCommand(bool allow); + protected: IDevice();