From 99928905f2104ff7b7d659f7fd42ffe7d929aeb4 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 2 May 2018 11:23:13 +0200 Subject: Imagine: use background insets All others have been updated, except GroupBox that has some strange special handling for positioning the background. Change-Id: Ief5a68cbeedbdc3c66b85e8d03198f70e35aac61 Reviewed-by: Qt CI Bot Reviewed-by: Mitch Curtis --- .../qquickninepatchimage/tst_qquickninepatchimage.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp b/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp index b5dd7f2f..5a62c00a 100644 --- a/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp +++ b/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp @@ -210,11 +210,20 @@ void tst_qquickninepatchimage::implicitSize_data() QTest::addColumn("file"); QTest::addColumn("implicitSize"); - const QStringList files = QStringList() << "foo.9.png" << "padding.9.png" << "inset-all.9.png" << "inset-topleft.9.png" << "inset-bottomright.9.png"; - - for (const QString &file : files) { + const struct TestFile { + QString name; + QSizeF sizeHint; + } testFiles [] = { + { "foo.9.png", QSizeF(40, 40) }, + { "padding.9.png", QSizeF(40, 40) }, + { "inset-all.9.png", QSizeF(45, 45) }, + { "inset-topleft.9.png", QSizeF(42, 41) }, + { "inset-bottomright.9.png", QSizeF(43, 44) } + }; + + for (const TestFile &file : testFiles) { for (int dpr = 1; dpr <= 4; ++dpr) - QTest::newRow(qPrintable(QString::fromLatin1("%1 DPR=%2").arg(file).arg(dpr))) << dpr << file << QSizeF(40, 40); + QTest::newRow(qPrintable(QString::fromLatin1("%1 DPR=%2").arg(file.name).arg(dpr))) << dpr << file.name << file.sizeHint; } } -- cgit v1.2.3