summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-04-11 17:12:21 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-04-11 17:12:21 (GMT)
commit1ac387f8e8f9606b9892cfe6b7a69b33a9557abb (patch)
tree225330564d28f14c3efe3f4130a2eb7c9f90b1d1
parenteed6b316aa83ca005cfd7520602ea1b752afe645 (diff)
downloadlibkolab-1ac387f8e8f9606b9892cfe6b7a69b33a9557abb.tar.gz
qdebug serializer for std::string
-rw-r--r--kolabformat/errorhandler.cpp6
-rw-r--r--kolabformat/errorhandler.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/kolabformat/errorhandler.cpp b/kolabformat/errorhandler.cpp
index f53eb81..91021f4 100644
--- a/kolabformat/errorhandler.cpp
+++ b/kolabformat/errorhandler.cpp
@@ -26,6 +26,12 @@
#include <kolabformat.h>
+QDebug operator<<(QDebug dbg, const std::string &s)
+{
+ dbg.nospace() << QString::fromStdString(s);
+ return dbg.space();
+}
+
namespace Kolab {
DebugStream::DebugStream()
diff --git a/kolabformat/errorhandler.h b/kolabformat/errorhandler.h
index bf32d85..2a3d34e 100644
--- a/kolabformat/errorhandler.h
+++ b/kolabformat/errorhandler.h
@@ -134,4 +134,7 @@ private:
#define Critical() Kolab::ErrorHandler::debugStream(Kolab::ErrorHandler::Critical, __LINE__, __FILE__)
}
+
+QDebug operator<<(QDebug dbg, const std::string &s);
+
#endif // ERRORHANDLER_H