From 2e0ac76a76f02e22f101b24ba222f8251d0c2580 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 25 May 2010 14:20:31 +0200 Subject: Fix tst_QComboBox::maxVisibleItems() auto-test on Mac Reviewed-by: Olivier --- tests/auto/qcombobox/tst_qcombobox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(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()); } -- cgit v0.12