forked from qt-creator/qt-creator
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:
@@ -55,12 +55,10 @@ void dumpBacktrace(int maxdepth)
|
|||||||
for (int i = 0; i < qMin(size, maxdepth); i++)
|
for (int i = 0; i < qMin(size, maxdepth); i++)
|
||||||
proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + '\n');
|
proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + '\n');
|
||||||
proc.closeWriteChannel();
|
proc.closeWriteChannel();
|
||||||
|
proc.waitForFinished();
|
||||||
QByteArray out = proc.readAllStandardOutput();
|
QByteArray out = proc.readAllStandardOutput();
|
||||||
qDebug() << QCoreApplication::arguments().at(0);
|
qDebug() << QCoreApplication::arguments().at(0);
|
||||||
qDebug() << out;
|
qDebug() << out;
|
||||||
proc.waitForFinished();
|
|
||||||
out = proc.readAllStandardOutput();
|
|
||||||
qDebug() << out;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user