summaryrefslogtreecommitdiffstats
path: root/async/src/debug.cpp
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2015-05-15 16:00:32 +0200
committerDan Vrátil <dvratil@redhat.com>2015-05-15 16:22:28 +0200
commit5b78e0da1d64b6096829f54b29f14ec5643b5ece (patch)
tree2091795596f9721bc1d9d8cb9965103d5a32df7a /async/src/debug.cpp
parent3bbee6c42683db5f85b01e4eb6dab8135e199f6c (diff)
downloadsink-5b78e0da1d64b6096829f54b29f14ec5643b5ece.tar.gz
sink-5b78e0da1d64b6096829f54b29f14ec5643b5ece.zip
Async: rename Async namespace to KAsync
Diffstat (limited to 'async/src/debug.cpp')
-rw-r--r--async/src/debug.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/async/src/debug.cpp b/async/src/debug.cpp
index fdf2fa1..64a3a3b 100644
--- a/async/src/debug.cpp
+++ b/async/src/debug.cpp
@@ -25,7 +25,7 @@
25#include <memory> 25#include <memory>
26#endif 26#endif
27 27
28namespace Async 28namespace KAsync
29{ 29{
30 30
31Q_LOGGING_CATEGORY(Debug, "org.kde.async", QtWarningMsg); 31Q_LOGGING_CATEGORY(Debug, "org.kde.async", QtWarningMsg);
@@ -37,15 +37,15 @@ QString demangleName(const char *name)
37 int status = 1; // uses -3 to 0 error codes 37 int status = 1; // uses -3 to 0 error codes
38 std::unique_ptr<char, void(*)(void*)> demangled(abi::__cxa_demangle(name, 0, 0, &status), std::free); 38 std::unique_ptr<char, void(*)(void*)> demangled(abi::__cxa_demangle(name, 0, 0, &status), std::free);
39 if (status == 0) { 39 if (status == 0) {
40 return QString(demangled.get()); 40 return QString::fromLatin1(demangled.get());
41 } 41 }
42#endif 42#endif
43 return QString(name); 43 return QString::fromLatin1(name);
44} 44}
45 45
46} 46}
47 47
48using namespace Async; 48using namespace KAsync;
49 49
50int Tracer::lastId = 0; 50int Tracer::lastId = 0;
51 51
@@ -53,12 +53,12 @@ Tracer::Tracer(Private::Execution *execution)
53 : mId(lastId++) 53 : mId(lastId++)
54 , mExecution(execution) 54 , mExecution(execution)
55{ 55{
56 msg(Async::Tracer::Start); 56 msg(KAsync::Tracer::Start);
57} 57}
58 58
59Tracer::~Tracer() 59Tracer::~Tracer()
60{ 60{
61 msg(Async::Tracer::End); 61 msg(KAsync::Tracer::End);
62 // FIXME: Does this work on parallel executions? 62 // FIXME: Does this work on parallel executions?
63 --lastId; 63 --lastId;
64 --mId; 64 --mId;
@@ -68,8 +68,8 @@ void Tracer::msg(Tracer::MsgType msgType)
68{ 68{
69#ifndef QT_NO_DEBUG 69#ifndef QT_NO_DEBUG
70 qCDebug(Trace).nospace() << (QString().fill(QLatin1Char(' '), mId * 2) % 70 qCDebug(Trace).nospace() << (QString().fill(QLatin1Char(' '), mId * 2) %
71 (msgType == Async::Tracer::Start ? " START " : " END ") % 71 (msgType == KAsync::Tracer::Start ? QStringLiteral(" START ") : QStringLiteral(" END ")) %
72 QString::number(mId) % " " % 72 QString::number(mId) % QStringLiteral(" ") %
73 mExecution->executor->mExecutorName); 73 mExecution->executor->mExecutorName);
74#endif 74#endif
75} 75}