summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r--src/corelib/io/qdebug.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 3498351639a..b737d3e41a6 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -157,20 +157,11 @@ public:
{ stream->ts << m; return *this; }
template <typename T>
- static QString toString(const T &object)
+ static QString toString(T &&object)
{
QString buffer;
QDebug stream(&buffer);
- stream.nospace() << object;
- return buffer;
- }
-
- template <typename T>
- static QString toString(const T *object)
- {
- QString buffer;
- QDebug stream(&buffer);
- stream.nospace() << object;
+ stream.nospace() << std::forward<T>(object);
return buffer;
}
};