diff --git a/core/area.cpp b/core/area.cpp index 86bec7268..bc31cc65c 100644 --- a/core/area.cpp +++ b/core/area.cpp @@ -267,6 +267,11 @@ void NormalizedRect::transform( const QTransform &matrix ) bottom = rect.bottom(); } +uint qHash( const NormalizedRect& r, uint seed ) +{ + return qHash(r.bottom, qHash(r.right, qHash(r.top, qHash(r.left, seed)))); +} + QDebug operator<<( QDebug str, const Okular::NormalizedRect& r ) { str.nospace() << "NormRect(" << r.left << "," << r.top << " x " << ( r.right - r.left ) << "+" << ( r.bottom - r.top ) << ")"; diff --git a/core/area.h b/core/area.h index 5e0f52234..a595f429c 100644 --- a/core/area.h +++ b/core/area.h @@ -898,6 +898,8 @@ class HighlightAreaRect : public RegularAreaRect } +uint qHash(const Okular::NormalizedRect& r, uint seed = 0); + #ifndef QT_NO_DEBUG_STREAM /** * Debug operator for normalized @p point.