Android: avoid QTC_ASSERT in addTask

Change-Id: I0b3eee749f21a031ff7b7f910b07719b03585759
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-11-23 15:53:19 +02:00
parent 2d05822e27
commit 6f17ad0562
2 changed files with 6 additions and 0 deletions

View File

@@ -899,6 +899,9 @@ void AndroidBuildApkStep::stdError(const QString &output)
QString newOutput = output; QString newOutput = output;
newOutput.remove(QRegularExpression("^(\\n)+")); newOutput.remove(QRegularExpression("^(\\n)+"));
if (newOutput.isEmpty())
return;
if (newOutput.startsWith("warning", Qt::CaseInsensitive) if (newOutput.startsWith("warning", Qt::CaseInsensitive)
|| newOutput.startsWith("note", Qt::CaseInsensitive)) || newOutput.startsWith("note", Qt::CaseInsensitive))
TaskHub::addTask(BuildSystemTask(Task::Warning, newOutput)); TaskHub::addTask(BuildSystemTask(Task::Warning, newOutput));

View File

@@ -556,6 +556,9 @@ void AndroidDeployQtStep::stdError(const QString &line)
QString newOutput = line; QString newOutput = line;
newOutput.remove(QRegularExpression("^(\\n)+")); newOutput.remove(QRegularExpression("^(\\n)+"));
if (newOutput.isEmpty())
return;
if (newOutput.startsWith("warning", Qt::CaseInsensitive) if (newOutput.startsWith("warning", Qt::CaseInsensitive)
|| newOutput.startsWith("note", Qt::CaseInsensitive)) || newOutput.startsWith("note", Qt::CaseInsensitive))
TaskHub::addTask(DeploymentTask(Task::Warning, newOutput)); TaskHub::addTask(DeploymentTask(Task::Warning, newOutput));