summaryrefslogtreecommitdiffstats
path: root/tools/runonphone/texttracehandler.cpp
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2011-10-13 13:54:45 (GMT)
committermread <qt-info@nokia.com>2011-10-13 14:02:22 (GMT)
commit138b9d7349d5daa1808d8bd891c5ecf817f98c52 (patch)
tree4f367f35aa90b9fa89e615e388bd1b909fdd1bad /tools/runonphone/texttracehandler.cpp
parentfe5f996eac2a4b4e7e704f7cdaebe990a76c6034 (diff)
downloadQt-138b9d7349d5daa1808d8bd891c5ecf817f98c52.zip
Qt-138b9d7349d5daa1808d8bd891c5ecf817f98c52.tar.gz
Qt-138b9d7349d5daa1808d8bd891c5ecf817f98c52.tar.bz2
runonphone timestamps nanosecond formating set to 9 chars, 0 padded
runonphone was dropping leading zeros after the decimal point in its timestamp formating. For example [123.000456789] was printed as [123.456789], which is quite a different number. The formatting now pads the nanoseconds component with leading zeros to 9 characters. Timestamps are now always displayed with a 9 character nanoseconds component, with leading and trailing zeros as appropriate. For example: [1897.070556640] [Qt Message] QEglContext::swapBuffers Reviewed-by: Shane Kearns
Diffstat (limited to 'tools/runonphone/texttracehandler.cpp')
-rw-r--r--tools/runonphone/texttracehandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/runonphone/texttracehandler.cpp b/tools/runonphone/texttracehandler.cpp
index fff02e9..a121c08 100644
--- a/tools/runonphone/texttracehandler.cpp
+++ b/tools/runonphone/texttracehandler.cpp
@@ -85,5 +85,5 @@ void TextTraceHandler::dataAvailable()
secs = timestamp / 1000000000;
ns = timestamp % 1000000000;
}
- d->out << QString("[%1.%2] %3").arg(secs).arg(ns).arg(QString(result.mid(8))) << endl;
+ d->out << QString("[%1.%2] %3").arg(secs).arg(ns,9,10,QLatin1Char('0')).arg(QString(result.mid(8))) << endl;
}