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>bb10
parent
f7241e8cb9
commit
8f79ab3549
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue