summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcombobox
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qcombobox')
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index aa821c2..fb6c741 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -2556,7 +2556,9 @@ void tst_QComboBox::maxVisibleItems()
QListView *lv = qobject_cast<QListView*>(v);
if (lv)
itemHeight += lv->spacing();
- if (!v->style()->styleHint(QStyle::SH_ComboBox_Popup))
+ QStyleOptionComboBox opt;
+ opt.initFrom(&comboBox);
+ if (!comboBox.style()->styleHint(QStyle::SH_ComboBox_Popup, &opt))
QCOMPARE(v->viewport()->height(), itemHeight * comboBox.maxVisibleItems());
}