Android: Merge stdout & stderr channles

On Android 7.1.1 the error is fired on "stderr" on previous versions on
"stdout"

Change-Id: I72c06694a22084d455e26eea95ddfdb8a93a39b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
BogDan Vatra
2016-12-07 16:48:26 +02:00
parent 572396773b
commit 87b39ddd5a

View File

@@ -668,8 +668,9 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
logcatReadStandardOutput(); logcatReadStandardOutput();
QTC_ASSERT(!m_psIsAlive, /**/); QTC_ASSERT(!m_psIsAlive, /**/);
m_psIsAlive.reset(new QProcess); m_psIsAlive.reset(new QProcess);
connect(m_psIsAlive.get(), &QIODevice::readyRead, [this](){ m_psIsAlive->setProcessChannelMode(QProcess::MergedChannels);
if (!m_psIsAlive->readAllStandardOutput().simplified().isEmpty()) connect(m_psIsAlive.get(), &QProcess::readyRead, [this](){
if (!m_psIsAlive->readAll().simplified().isEmpty())
onProcessIdChanged(-1); onProcessIdChanged(-1);
}); });
m_psIsAlive->start(m_adb, selector() << QStringLiteral("shell") m_psIsAlive->start(m_adb, selector() << QStringLiteral("shell")