fix for g++ 4.5.2: this is the correct way to overload @operator<<@ for QDebug and CLogMessage because they are flyweight objects

This commit is contained in:
Mathew Sutcliffe
2013-04-29 23:45:30 +01:00
parent 177efba563
commit ba70a150e0

View File

@@ -20,7 +20,7 @@ template <class UsingClass> class CBaseStreamStringifier
* \param uc
* \return
*/
friend QDebug &operator<<(QDebug &debug, const UsingClass &uc)
friend QDebug operator<<(QDebug debug, const UsingClass &uc)
{
const CBaseStreamStringifier &s = uc;
debug << s.stringForStreaming();
@@ -33,7 +33,7 @@ template <class UsingClass> class CBaseStreamStringifier
* \param uc
* \return
*/
friend QNoDebug &operator<<(QNoDebug &nodebug, const UsingClass &uc)
friend QNoDebug operator<<(QNoDebug nodebug, const UsingClass &uc)
{
return nodebug;
}
@@ -57,7 +57,7 @@ template <class UsingClass> class CBaseStreamStringifier
* \param uc
* \return
*/
friend CLogMessage &operator<<(CLogMessage &log, const UsingClass &uc)
friend CLogMessage operator<<(CLogMessage log, const UsingClass &uc)
{
const CBaseStreamStringifier &s = uc;
log << s.stringForStreaming();