summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcombobox
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-05-25 12:20:31 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-05-25 12:26:31 (GMT)
commit2e0ac76a76f02e22f101b24ba222f8251d0c2580 (patch)
treedb30669889e31fb4ca611caf142fe2bf344c230b /tests/auto/qcombobox
parent3985150b2a3f30e3676c82412446aa2735d42b34 (diff)
downloadQt-2e0ac76a76f02e22f101b24ba222f8251d0c2580.zip
Qt-2e0ac76a76f02e22f101b24ba222f8251d0c2580.tar.gz
Qt-2e0ac76a76f02e22f101b24ba222f8251d0c2580.tar.bz2
Fix tst_QComboBox::maxVisibleItems() auto-test on Mac
Reviewed-by: Olivier
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());
}