mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 18:25:42 +08:00
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:
@@ -20,7 +20,7 @@ template <class UsingClass> class CBaseStreamStringifier
|
|||||||
* \param uc
|
* \param uc
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
friend QDebug &operator<<(QDebug &debug, const UsingClass &uc)
|
friend QDebug operator<<(QDebug debug, const UsingClass &uc)
|
||||||
{
|
{
|
||||||
const CBaseStreamStringifier &s = uc;
|
const CBaseStreamStringifier &s = uc;
|
||||||
debug << s.stringForStreaming();
|
debug << s.stringForStreaming();
|
||||||
@@ -33,7 +33,7 @@ template <class UsingClass> class CBaseStreamStringifier
|
|||||||
* \param uc
|
* \param uc
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
friend QNoDebug &operator<<(QNoDebug &nodebug, const UsingClass &uc)
|
friend QNoDebug operator<<(QNoDebug nodebug, const UsingClass &uc)
|
||||||
{
|
{
|
||||||
return nodebug;
|
return nodebug;
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ template <class UsingClass> class CBaseStreamStringifier
|
|||||||
* \param uc
|
* \param uc
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
friend CLogMessage &operator<<(CLogMessage &log, const UsingClass &uc)
|
friend CLogMessage operator<<(CLogMessage log, const UsingClass &uc)
|
||||||
{
|
{
|
||||||
const CBaseStreamStringifier &s = uc;
|
const CBaseStreamStringifier &s = uc;
|
||||||
log << s.stringForStreaming();
|
log << s.stringForStreaming();
|
||||||
|
|||||||
Reference in New Issue
Block a user