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()) {
|
} else if (region.isEmpty()) {
|
||||||
result += "empty";
|
result += "empty";
|
||||||
} else {
|
} else {
|
||||||
const QVector<QRect> &rects = region.rects();
|
const auto rects = region.begin();
|
||||||
const int rectCount = rects.size();
|
const int rectCount = region.rectCount();
|
||||||
if (rectCount > 1) {
|
if (rectCount > 1) {
|
||||||
result += QByteArray::number(rectCount);
|
result += QByteArray::number(rectCount);
|
||||||
result += " rectangles, ";
|
result += " rectangles, ";
|
||||||
@ -100,7 +100,7 @@ template<> inline char *toString(const QRegion ®ion)
|
|||||||
for (int i = 0; i < rectCount; ++i) {
|
for (int i = 0; i < rectCount; ++i) {
|
||||||
if (i)
|
if (i)
|
||||||
result += ", ";
|
result += ", ";
|
||||||
const QRect &r = rects.at(i);
|
const QRect &r = rects[i];
|
||||||
result += QByteArray::number(r.width());
|
result += QByteArray::number(r.width());
|
||||||
result += 'x';
|
result += 'x';
|
||||||
result += QByteArray::number(r.height());
|
result += QByteArray::number(r.height());
|
||||||
|
Loading…
Reference in New Issue
Block a user