diff options
Diffstat (limited to 'tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index c65cfa3e1a..0c229c9194 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -2052,13 +2052,13 @@ void tst_QComboBox::mouseWheel_data() QTest::newRow("upper locked") << disabled << start << wheel << expected; wheel = -1; -#ifdef Q_OS_DARWIN + const bool allowsWheelScroll = QApplication::style()->styleHint(QStyle::SH_ComboBox_AllowWheelScrolling); // on OS X & iOS mouse wheel shall have no effect on combo box - expected = start; -#else - // on other OSes we should jump to next enabled item (no. 5) - expected = 5; -#endif + if (!allowsWheelScroll) + expected = start; + else // on other OSes we should jump to next enabled item (no. 5) + expected = 5; + QTest::newRow("jump over") << disabled << start << wheel << expected; disabled.clear(); |