diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-10-15 09:10:08 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-16 09:48:09 +0200 |
commit | 40976532158fc49be45bb976455f48e98f9690cf (patch) | |
tree | e14710c51c2d6c51857f32f6cff08215d5f810c9 /src/corelib/io/qdebug.h | |
parent | 0461c535fcb26ea231ee8645e67ef2e8d4429e95 (diff) |
Fix signature of QDebug::toString()
We don't need two overloads here.
Change-Id: Ia6a3bcd93491843e07b0295fefe8da42ae9d6519
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r-- | src/corelib/io/qdebug.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 3498351639..b737d3e41a 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; } }; |