QtTestLib: port away from QRegion::rects()
Use begin()/rectCount() instead. Change-Id: I08cef424bf24ecf3c058e9b87411f2a5775ffb33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
8c8459258f
commit
784ed9b4f7
@ -91,8 +91,8 @@ template<> inline char *toString(const QRegion ®ion)
|
||||
} else if (region.isEmpty()) {
|
||||
result += "empty";
|
||||
} else {
|
||||
const QVector<QRect> &rects = region.rects();
|
||||
const int rectCount = rects.size();
|
||||
const auto rects = region.begin();
|
||||
const int rectCount = region.rectCount();
|
||||
if (rectCount > 1) {
|
||||
result += QByteArray::number(rectCount);
|
||||
result += " rectangles, ";
|
||||
@ -100,7 +100,7 @@ template<> inline char *toString(const QRegion ®ion)
|
||||
for (int i = 0; i < rectCount; ++i) {
|
||||
if (i)
|
||||
result += ", ";
|
||||
const QRect &r = rects.at(i);
|
||||
const QRect &r = rects[i];
|
||||
result += QByteArray::number(r.width());
|
||||
result += 'x';
|
||||
result += QByteArray::number(r.height());
|
||||
|
Loading…
Reference in New Issue
Block a user