qt 6.6.0 clean

This commit is contained in:
kleuter
2023-11-01 22:23:55 +01:00
parent 7b5ada15e7
commit 5d8194efa7
1449 changed files with 134276 additions and 31391 deletions

View File

@ -349,8 +349,10 @@ void tst_QColorSpace::imageConversion64PM()
for (int j = 0; j < 16; ++j) {
int a = j * 15;
for (int i = 0; i < 256; ++i)
testImage.setPixel(i, j, qPremultiply(qRgba(i, i, i, a)));
for (int i = 0; i < 256; ++i) {
QRgba64 color = QRgba64::fromRgba(i, i, i, a);
testImage.setPixelColor(i, j, QColor::fromRgba64(color));
}
}
testImage.setColorSpace(fromColorSpace);
@ -389,8 +391,8 @@ void tst_QColorSpace::imageConversion64PM()
for (int i = 0; i < 256; ++i) {
QRgb expected = qPremultiply(qRgba(i, i, i, expectedAlpha));
QRgb p = testImage.pixel(i, j);
QCOMPARE(qRed(p), qGreen(p));
QCOMPARE(qRed(p), qBlue(p));
QVERIFY(qAbs(qRed(p) - qGreen(p)) <= 1);
QVERIFY(qAbs(qRed(p) - qBlue(p)) <= 1);
QCOMPARE(qAlpha(p), expectedAlpha);
QVERIFY((lastRed - qRed(p)) <= 0);
QVERIFY((lastGreen - qGreen(p)) <= 0);

View File

@ -470,15 +470,19 @@ void tst_QPathClipper::clipTest(int subjectIndex, int clipIndex, QPathClipper::O
break;
}
if (expected != inResult) {
char str[256];
const char *opStr =
op == QPathClipper::BoolAnd ? "and" :
op == QPathClipper::BoolOr ? "or" : "sub";
sprintf(str, "Expected: %d, actual: %d, subject: %d, clip: %d, op: %s\n",
int(expected), int(inResult), subjectIndex, clipIndex, opStr);
QFAIL(str);
}
auto failLogger = qScopeGuard([&]{
qCritical().noquote().nospace()
<< "\n\tExpected: " << expected
<< "\n\tActual: " << inResult
<< "\n\tSubject: " << subjectIndex
<< "\n\tClip: " << clipIndex
<< "\n\tOp: " << (op == QPathClipper::BoolAnd
? "and"
: op == QPathClipper::BoolOr
? "or" : "sub");
});
QCOMPARE(inResult, expected);
failLogger.dismiss();
}
}