From 9daef8a54c32162a50b0f558dac829333165618f Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Thu, 5 Nov 2015 22:35:42 +0100 Subject: QComboBox: Disable wheel events on OS X & iOS This is follow-up for QTabBar fix ea47d152b35158ba07a55d009f57df0e4c2a048f. In native OS X applications using mouse wheel on combo boxes have absolutely no effect. We should bring the same behavior to Qt based OS X apps too, as users are complaining of unexpected behavior, eg. randomly switching Qt Creator sidebar mode when scrolling file list and moving mouse pointer little bit above. Moreover inertial mouse behavior on OS X makes combo box usually move several indexes, rather than single one on slight finger slide. This also applies to iOS apps so the change affects all Apple platforms. Task-number: QTBUG-10707 Change-Id: I6582265039198707ad8c2f54de96ee2a0b0e0b47 Reviewed-by: Adam Strzelecki Reviewed-by: Jake Petroules --- tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 7824172812..21446de069 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -2044,7 +2044,13 @@ void tst_QComboBox::mouseWheel_data() QTest::newRow("upper locked") << disabled << start << wheel << expected; wheel = -1; +#ifdef Q_OS_DARWIN + // 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 QTest::newRow("jump over") << disabled << start << wheel << expected; disabled.clear(); -- cgit v1.2.3