summaryrefslogtreecommitdiffstats
path: root/tools/runonphone
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
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')
-rw-r--r--tools/runonphone/symbianutils/launcher.cpp2
-rw-r--r--tools/runonphone/texttracehandler.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp
index ff67881..2909696 100644
--- a/tools/runonphone/symbianutils/launcher.cpp
+++ b/tools/runonphone/symbianutils/launcher.cpp
@@ -440,7 +440,7 @@ void Launcher::handleResult(const TrkResult &result)
quint64 timestamp = extractInt64(result.data) & 0x0FFFFFFFFFFFFFFFULL;
quint64 secs = timestamp / 1000000000;
quint64 ns = timestamp % 1000000000;
- msg = QString("[%1.%2] %3").arg(secs).arg(ns).arg(QString(result.data.mid(8)));
+ msg = QString("[%1.%2] %3").arg(secs).arg(ns,9,10,QLatin1Char('0')).arg(QString(result.data.mid(8)));
logMessage("TEXT TRACE: " + msg);
}
} else {
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;
}