clean up output printing in dumpBacktrace()

the first call to readAllStandardOutput() made no sense, as the buffer
would be empty at that time anyway.

Change-Id: Ie306745a94f98ce358e4af373169d0a5b0a82d23
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Oswald Buddenhagen
2020-12-09 18:39:04 +01:00
parent e2a2af5d18
commit a55b7c6094

View File

@@ -55,12 +55,10 @@ void dumpBacktrace(int maxdepth)
for (int i = 0; i < qMin(size, maxdepth); i++)
proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + '\n');
proc.closeWriteChannel();
proc.waitForFinished();
QByteArray out = proc.readAllStandardOutput();
qDebug() << QCoreApplication::arguments().at(0);
qDebug() << out;
proc.waitForFinished();
out = proc.readAllStandardOutput();
qDebug() << out;
#endif
}