From 000dc825e3fbbd8b5cd60140f2e24012fc0797d4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 30 Jul 2007 23:58:04 +0000 Subject: [PATCH] Use QDebug instead of kdbgstream svn path=/trunk/KDE/kdegraphics/okular/; revision=694533 --- core/area.cpp | 6 +++--- core/area.h | 8 +++++--- core/generator.cpp | 2 +- core/generator.h | 5 +++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/area.cpp b/core/area.cpp index d2730f512..89bd2f6fb 100644 --- a/core/area.cpp +++ b/core/area.cpp @@ -44,7 +44,7 @@ void NormalizedPoint::transform( const QMatrix &matrix ) matrix.map( x, y, &x, &y ); } -kdbgstream& operator<<( kdbgstream& str, const Okular::NormalizedPoint& p ) +QDebug operator<<( QDebug str, const Okular::NormalizedPoint& p ) { str << "NormPt(" << p.x << "," << p.y << ")"; return str; @@ -140,7 +140,7 @@ bool NormalizedRect::operator==( const NormalizedRect & r ) const } /* -kdbgstream& operator << (kdbgstream& str , const NormalizedRect &r) +QDebug operator << (QDebug str , const NormalizedRect &r) { str << "[" < #include #include +#include #include class QPolygonF; class QRect; -class kdbgstream; namespace Okular { @@ -724,14 +724,16 @@ class HighlightAreaRect : public RegularAreaRect } +#ifndef QT_NO_DEBUG_STREAM /** * Debug operator for normalized @p point. */ -OKULAR_EXPORT kdbgstream& operator<<( kdbgstream& str, const Okular::NormalizedPoint &point ); +OKULAR_EXPORT QDebug operator<<( QDebug str, const Okular::NormalizedPoint &point ); /** * Debug operator for normalized @p rect. */ -OKULAR_EXPORT kdbgstream& operator<<( kdbgstream& str, const Okular::NormalizedRect &rect ); +OKULAR_EXPORT QDebug operator<<( QDebug str, const Okular::NormalizedRect &rect ); +#endif #endif diff --git a/core/generator.cpp b/core/generator.cpp index 57adfe215..8ece5bca7 100644 --- a/core/generator.cpp +++ b/core/generator.cpp @@ -456,7 +456,7 @@ bool ExportFormat::operator!=( const ExportFormat &other ) const return d != other.d; } -kdbgstream& operator<<( kdbgstream &str, const Okular::PixmapRequest &req ) +QDebug operator<<( QDebug str, const Okular::PixmapRequest &req ) { QString s = QString( "%1 PixmapRequest (id: %2) (%3x%4), prio %5, pageNo %6" ) .arg( QString( req.asynchronous() ? "Async" : "Sync" ) ) diff --git a/core/generator.h b/core/generator.h index 4a3fdde93..5890baf09 100644 --- a/core/generator.h +++ b/core/generator.h @@ -35,7 +35,6 @@ class KAboutData; class KComponentData; class KIcon; class KPrinter; -class kdbgstream; namespace Okular { @@ -546,6 +545,8 @@ class OKULAR_EXPORT PixmapRequest } -kdbgstream& operator<<( kdbgstream &str, const Okular::PixmapRequest &req ); +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<( QDebug str, const Okular::PixmapRequest &req ); +#endif #endif