summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcombobox
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-05-21 13:28:38 +0200
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-05-21 13:37:45 +0200
commitf1dc8ed5d852a02dcacafb79195d8ca17d4a20ea (patch)
treede1ab79ee9756461e8048bb8e438fdb38abb95fc /tests/auto/qcombobox
parent1c4846bc35613f388fda28841e19c3a9cbc8c11f (diff)
QComboBox: Fix documentation and make auto-test pass.
Reviewed-by: Olivier
Diffstat (limited to 'tests/auto/qcombobox')
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index 1fcea9e034..aa821c227a 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -2553,9 +2553,11 @@ void tst_QComboBox::maxVisibleItems()
QAbstractItemView *v = comboBox.view();
int itemHeight = v->visualRect(v->model()->index(0,0)).height();
- if (v->style()->styleHint(QStyle::SH_ComboBox_Popup))
+ QListView *lv = qobject_cast<QListView*>(v);
+ if (lv)
+ itemHeight += lv->spacing();
+ if (!v->style()->styleHint(QStyle::SH_ComboBox_Popup))
QCOMPARE(v->viewport()->height(), itemHeight * comboBox.maxVisibleItems());
- // QCombobox without a popup does not work, see QTBUG-760
}