Implement qHash() for Okular::NormalizedRect.

This commit is contained in:
Gleb Popov 2015-10-17 15:10:16 +03:00
parent 9d0f5e6312
commit b8d22401f2
2 changed files with 7 additions and 0 deletions

View file

@ -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 ) << ")";

View file

@ -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.