QRegion: mark boundingRect() and rectCount() nothrow
With this, the operations usually called when inspecting a QRegion are now all nothrow (when using begin()/end() instead of rects()). Change-Id: I7012be2ac2350ab7d14dae58df3b8fe4956233db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
e81ba336e9
commit
2ddad99979
|
|
@ -4288,7 +4288,7 @@ QRegion QRegion::xored(const QRegion &r) const
|
|||
}
|
||||
}
|
||||
|
||||
QRect QRegion::boundingRect() const
|
||||
QRect QRegion::boundingRect() const Q_DECL_NOTHROW
|
||||
{
|
||||
if (isEmpty())
|
||||
return QRect();
|
||||
|
|
@ -4386,7 +4386,7 @@ void QRegion::setRects(const QRect *rects, int num)
|
|||
}
|
||||
}
|
||||
|
||||
int QRegion::rectCount() const
|
||||
int QRegion::rectCount() const Q_DECL_NOTHROW
|
||||
{
|
||||
return (d->qt_rgn ? d->qt_rgn->numRects : 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,10 +120,10 @@ public:
|
|||
bool intersects(const QRegion &r) const;
|
||||
bool intersects(const QRect &r) const;
|
||||
|
||||
QRect boundingRect() const;
|
||||
QRect boundingRect() const Q_DECL_NOTHROW;
|
||||
QVector<QRect> rects() const;
|
||||
void setRects(const QRect *rect, int num);
|
||||
int rectCount() const;
|
||||
int rectCount() const Q_DECL_NOTHROW;
|
||||
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
|
||||
// ### Qt 6: remove these, they're kept for MSVC compat
|
||||
const QRegion operator|(const QRegion &r) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue