diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-08 18:27:17 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-10 12:48:56 +0000 |
commit | e41b16ea55b739bfaf7b2802bc38bb8d9a3c5cff (patch) | |
tree | 34f7573e693b4f4e0f107d5275526ecd84a50c6b | |
parent | 720c871f32386a385a2252baf2e431e550b81d04 (diff) |
Fix the width of error codes at 32 bits
... and improve the formatting for error messages.
Change-Id: I6b0553bae2d70f0300fbf21499198b688bdf3554
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | app/perfunwind.cpp | 4 | ||||
-rw-r--r-- | app/perfunwind.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp index e06a3ac..3cd7414 100644 --- a/app/perfunwind.cpp +++ b/app/perfunwind.cpp @@ -518,10 +518,10 @@ void PerfUnwind::sendSymbol(qint32 id, const PerfUnwind::Symbol &symbol) void PerfUnwind::sendError(ErrorCode error, const QString &message) { - qWarning() << error << message; + qWarning().noquote().nospace() << error << ": " << message; QByteArray buffer; QDataStream(&buffer, QIODevice::WriteOnly) << static_cast<quint8>(Error) - << error << message; + << static_cast<qint32>(error) << message; sendBuffer(buffer); } diff --git a/app/perfunwind.h b/app/perfunwind.h index 23d256e..57ca7f0 100644 --- a/app/perfunwind.h +++ b/app/perfunwind.h @@ -199,6 +199,7 @@ public: MissingElfFile = 2, InvalidKallsyms = 3, }; + Q_ENUM(ErrorCode) void sendError(ErrorCode error, const QString &message); void sendProgress(float percent); |