summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-11-05 22:35:42 +0100
committerJake Petroules <jake.petroules@theqtcompany.com>2015-11-09 03:51:32 +0000
commit9daef8a54c32162a50b0f558dac829333165618f (patch)
treee96c5ed2a55db75dbbe206ddaf2f5916299b2085 /tests
parentcd0a1251232baf17fdfa002d2299305d5613063c (diff)
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 <ono@java.pl> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp6
1 files changed, 6 insertions, 0 deletions
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();