diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2012-10-13 19:15:17 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-16 10:47:41 +0200 |
commit | 8f79ab354956119810490a18a1471141025a6db2 (patch) | |
tree | 2b931699b02fb25183eb498d8b83b8894473f90b /tests/auto/widgets | |
parent | f7241e8cb949ecf2d86fae2a759a8e1fdb148a26 (diff) |
Fix QComboBox icon testing
The icons used were always null -- the files used to create them were
not present. So
1) add back the files used for the test (qtlogo.png,
copied from src/widgets/dialogs/images/qtlogo-64.png, and qtlogoinverted.png,
its copy rotated by 180°);
2) use QFINDTESTDATA to get the paths to the files.
Change-Id: I26f094079e037116e49e2a95345c2dea7496eecb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/qtlogo.png | bin | 0 -> 2991 bytes | |||
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png | bin | 0 -> 2827 bytes | |||
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 6 |
3 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/qtlogo.png b/tests/auto/widgets/widgets/qcombobox/qtlogo.png Binary files differnew file mode 100644 index 0000000000..4f68e162de --- /dev/null +++ b/tests/auto/widgets/widgets/qcombobox/qtlogo.png diff --git a/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png b/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png Binary files differnew file mode 100644 index 0000000000..61efb2f001 --- /dev/null +++ b/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 6dfb362c83..6016a19ff2 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -1282,6 +1282,8 @@ void tst_QComboBox::textpixmapdata_data() QStringList text; IconList icon; VariantList variant; + QString qtlogoPath = QFINDTESTDATA("qtlogo.png"); + QString qtlogoinvertedPath = QFINDTESTDATA("qtlogoinverted.png"); { text.clear(); icon.clear(); variant.clear(); @@ -1293,7 +1295,7 @@ void tst_QComboBox::textpixmapdata_data() { text.clear(); icon.clear(); variant.clear(); text << QString() << QString(); - icon << QIcon(QPixmap("qtlogo.png")) << QIcon(QPixmap("qtlogoinverted.png")); + icon << QIcon(QPixmap(qtlogoPath)) << QIcon(QPixmap(qtlogoinvertedPath)); variant << QVariant() << QVariant(); QTest::newRow("just icons") << text << icon << variant; } @@ -1307,7 +1309,7 @@ void tst_QComboBox::textpixmapdata_data() { text.clear(); icon.clear(); variant.clear(); text << "foo" << "bar"; - icon << QIcon(QPixmap("qtlogo.png")) << QIcon(QPixmap("qtlogoinverted.png")); + icon << QIcon(QPixmap(qtlogoPath)) << QIcon(QPixmap(qtlogoinvertedPath)); variant << 12 << "bingo"; QTest::newRow("text, icons and user data") << text << icon << variant; } |