aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-05-02 11:23:13 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-05-09 08:26:57 +0000
commit99928905f2104ff7b7d659f7fd42ffe7d929aeb4 (patch)
tree15c124ac6b8dadc8200d7c6797aec16d4b649e8d /tests
parent677d9420622fcc9138606260da380d1d794b6685 (diff)
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 <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp17
1 files changed, 13 insertions, 4 deletions
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<QString>("file");
QTest::addColumn<QSizeF>("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;
}
}