diff options
author | David Schulz <[email protected]> | 2013-11-12 15:25:10 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2013-11-15 11:09:06 +0100 |
commit | c09616aa18d5b9cbecb9296b183715b312ea6cb1 (patch) | |
tree | eacecea704b072d57183d64de67fe90faed60a9a /src/plugins/debugger/debuggerprotocol.cpp | |
parent | 6eed8e385f47cfd41bd37d651e162a6cac094096 (diff) |
Debugger: Print invalid when QByteArray can not be converted...
...to a numeric value for encoded debugger values.
Change-Id: I9969ea01f50738210963fa08dc871edc90c1bae2
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerprotocol.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerprotocol.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index 991e83324fc..a65f4f2997b 100644 --- a/src/plugins/debugger/debuggerprotocol.cpp +++ b/src/plugins/debugger/debuggerprotocol.cpp @@ -630,7 +630,10 @@ QString decodeData(const QByteArray &ba, int encoding) return QString::fromUtf8(decodedBa); } case MillisecondsSinceEpoch: { - const qint64 ms = ba.toLongLong(); + bool ok = false; + const qint64 ms = ba.toLongLong(&ok); + if (!ok) + return QLatin1String(ba); QDateTime d; d.setTimeSpec(Qt::UTC); d.setMSecsSinceEpoch(ms); |