[vlmc-devel] VlmcDebug: Add an overload for std::string
Hugo Beauzée-Luyssen
git at videolan.org
Thu Mar 24 13:22:30 CET 2016
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 21 20:40:02 2016 +0100| [a7209e062db547fa5baf0086af5f613bd9a0286b] | committer: Hugo Beauzée-Luyssen
VlmcDebug: Add an overload for std::string
> https://code.videolan.org/videolan/vlmc/commit/a7209e062db547fa5baf0086af5f613bd9a0286b
---
src/Tools/VlmcDebug.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/Tools/VlmcDebug.h b/src/Tools/VlmcDebug.h
index c93915f..be026c0 100644
--- a/src/Tools/VlmcDebug.h
+++ b/src/Tools/VlmcDebug.h
@@ -27,6 +27,12 @@
#include <QThread>
#include <QTime>
+inline QDebug operator<<( QDebug& qdbg, const std::string& str )
+{
+ qdbg << str.c_str();
+ return qdbg;
+}
+
inline QDebug vlmcDebug()
{
return (qDebug().nospace() << '[' << qPrintable(QTime::currentTime().toString("hh:mm:ss.zzz")) << "] T #" << QThread::currentThreadId() << " D:").space();
More information about the Vlmc-devel
mailing list