forked from qt-creator/qt-creator
ProjectExplorer: Replace one more use of Runnable::device
Change-Id: I58c7b28be9fa54637288099bfca3912d2b7f4935 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -1427,7 +1427,9 @@ void SimpleTargetRunnerPrivate::start()
|
||||
} else {
|
||||
QTC_ASSERT(m_state == Inactive, return);
|
||||
|
||||
if (!m_runnable.device) {
|
||||
const IDevice::ConstPtr device =
|
||||
DeviceManager::deviceForPath(m_runnable.command.executable());
|
||||
if (!device) {
|
||||
m_resultData.m_errorString = tr("Cannot run: No device.");
|
||||
m_resultData.m_error = QProcess::FailedToStart;
|
||||
m_resultData.m_exitStatus = QProcess::CrashExit;
|
||||
@@ -1435,7 +1437,7 @@ void SimpleTargetRunnerPrivate::start()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_runnable.device->isEmptyCommandAllowed() && m_runnable.command.isEmpty()) {
|
||||
if (!device->isEmptyCommandAllowed() && m_runnable.command.isEmpty()) {
|
||||
m_resultData.m_errorString = tr("Cannot run: No command given.");
|
||||
m_resultData.m_error = QProcess::FailedToStart;
|
||||
m_resultData.m_exitStatus = QProcess::CrashExit;
|
||||
|
Reference in New Issue
Block a user