aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_switch.qml
Commit message (Collapse)AuthorAgeFilesLines
* Restructure tests in preparation for merging into qtdeclarativeMitch Curtis2021-07-221-620/+0
| | | | | | | Task-number: QTBUG-95173 Change-Id: I541dc26cf2cdd6f2640824f693f7d059445367d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tests due to QQuickItem::contains() function behavior changeIgor Bugaev2021-06-301-6/+6
| | | | | | | | | | A lot of tests broke because they used to rely on the behavior that you can send an event to an item on its right and bottom edge, and the ability to send an event to an item of zero size. Pick-to: 6.2 Change-Id: I9c5883ddb327c751221b4f03bb9a699d69961d3a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* AbstractButton: emit doubleClicked() for touch eventsMitch Curtis2021-06-091-0/+8
| | | | | | | | | [ChangeLog][Controls][AbstractButton] doubleClicked() is now also emitted for touch events. Fixes: QTBUG-82146 Change-Id: Ie1e24d291bd4b592edd91fc762da8636e08698df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge branch 'dev' into nativestyleRichard Moe Gustavsen2020-08-261-3/+3
|\ | | | | | | Change-Id: I9999194551f71abec3731355cd746e69e2e0b187
| * Remove all version numbers from QML importsMitch Curtis2020-08-261-3/+3
| | | | | | | | | | | | | | | | | | As of Qt 6, the latest version will be used by default. This saves us a lot of effort in terms of version bumps. Task-number: QTBUG-82922 Change-Id: I74eba8185ec3ccc75bc293d4b2ea87d59e2d9928 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Let macOS have TabFocus focus policyJan Arve Sæther2020-06-221-1/+2
|/ | | | | | | | | This is how the macOS platform behaves. This will cause a slight behavior change for all Qt Quick Controls 2 styles on macOS, as reflected by the change in autotests. Change-Id: I9ea744737d0d157ee8c83955f718c1cd889a8c1d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_switch: fix test_mouse/test_touch failuresMitch Curtis2017-08-021-4/+4
| | | | | | | | Use the correct coordinates for the middle of the switch. Task-number: QTBUG-62241 Change-Id: Ibb3f21d72731d0d1a227a0af98e537cc80536953 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-241-2/+12
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickSwitch: handle touch eventsJ-P Nurmi2017-01-241-1/+201
| | | | | | | | This makes it possible to interact with multiple switches at the same time. Change-Id: I1a8c2ff6ddb7e867b3d9d66f15c49ae5b70231e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-201-0/+17
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickswitch.cpp src/quicktemplates2/qquickswitchdelegate.cpp tests/auto/controls/data/tst_dialogbuttonbox.qml tests/auto/controls/data/tst_toolbutton.qml Change-Id: I1da1d6de83c1d9ac854dfce1d6c9d6ba2c460404
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-141-0/+17
| |\ | | | | | | | | | Change-Id: Ibad627dfcd3389aeddfe08a10d13097c88f081a1
| | * Switch(Delegate): fix handle snappingv5.8.0J-P Nurmi2017-01-121-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Switch is released, nextCheckState() gets called to set the appropriate check state depending on the handle position. If the check state does not change, it must force a position update to avoid that the handle is left somewhere in the middle. Task-number: QTBUG-57944 Change-Id: I872160dafaa7dbf676b026fcc6ba0d0507a91a05 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | tst_control: fix TestCase::mouseMove() usageJ-P Nurmi2017-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | TestCase::mouseMove() does not take a mouse button argument. What we intended to pass as a button argument, was actually used as a 1ms delay (the value of Qt.LeftButton is 1). Change-Id: I5e6e6b05a521702e99418cceba2d0a7cdbc68109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | tst_controls: update import versions for controls and templatesJ-P Nurmi2017-01-121-1/+1
| | | | | | | | | | | | | | | Change-Id: I104bc44c361351719449cab94dcb14c96e91e32f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\| | | | | | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * | Welcome to 2017J-P Nurmi2017-01-091-1/+1
| |/ | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_switch: use TestCase's new createTemporaryObject functionsMitch Curtis2016-12-201-27/+10
| | | | | | | | | | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: I537581612f279e527a0304800bbe153b372e5c12 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add AbstractButton::toggled() signalJ-P Nurmi2016-12-021-1/+10
|/ | | | | | | | | | [ChangeLog][Controls][AbstractButton] Added a toggled() signal that is emitted whenever a checkable button is interactively toggled by the user by using either touch, mouse, or keys. Task-number: QTBUG-57203 Change-Id: If0b0d71d19cbed00f04d8a4309894a055c4254c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-0/+127
|\ | | | | | | Change-Id: I37aab846346692fd4bff08b0dbab66db3a8e2716
| * Switch/Delegate: improve dragging behaviorJ-P Nurmi2016-09-201-0/+34
| | | | | | | | | | | | | | | | | | Don't start dragging the handle unless the initial press was at the indicator, or the drag has reached the indicator area. This prevents unnatural jumps when dragging far outside the indicator. Change-Id: I2b31b319a347ab489f2de5c044e42d908827b425 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickSwitch: fix event handlingJ-P Nurmi2016-09-191-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | Switch implemented custom event handling for the indicator, and used QQuickAbstractButton's event handling for the background. This lead to inconsistent signals depending on whether interacting with the handle or the background. This change gets rid of the child mouse event filter for the indicator and makes QQuickSwitch fully utilize the base class event handlers. Change-Id: I773e2eb939cbbf4bc9086cdf2b34e876597ea08e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix Switch to stay pressed as appropriateJ-P Nurmi2016-09-191-0/+23
| | | | | | | | | | | | | | | | | | | | Switch is a special type of button that should stay pressed (similarly to Slider) even if the finger slips outside the bounds of the control. It was doing that only when dragged from the handle, not when dragged from the background. Change-Id: I462c66cfe2e67fc3c95215ffeafe3e5771174418 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-061-75/+63
|\| | | | | | | Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
| * Switch: fix missing pressed() and released() signalsJ-P Nurmi2016-09-051-75/+63
| | | | | | | | | | Change-Id: I4bf81c06a77980ed3201b43f9d106017f236a8bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-021-0/+11
|\| | | | | | | Change-Id: I82da1e547c4ead1181ade19f77c62651c00998a3
| * Switch: fix Qt::ClickFocus on the indicatorJ-P Nurmi2016-09-021-0/+11
| | | | | | | | | | | | Task-number: QTBUG-55647 Change-Id: Ic89beaa1e6674d3f94c9a713fd9bd8e8fdfafbb6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-1/+1
|/ | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickSwitch: fix the order of checkedChanged() vs. clicked()J-P Nurmi2016-05-041-3/+3
| | | | | | | | | And emit clicked() also when the switch was dragged to make it possible to use clicked() reliably to detect user interaction. Change-Id: Iefbd95b90ed40f04d84e03e247a8ac12c7f0e9ca Task-number: QTBUG-52558 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Switch: migrate from label to contentItemJ-P Nurmi2016-02-061-1/+1
| | | | | Change-Id: Ic287fc207b689d5f4a252a527b536272ad94c057 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Specify baseline offsetsJ-P Nurmi2015-11-251-0/+7
| | | | | | Change-Id: I4845a7beac2edc0f0bcc1c810edd7d9e86f31c87 Task-number: QTBUG-49468 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-011-1/+1
| | | | | Change-Id: I142622dd85e95ef70b11132e77ccf48701f2cabc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Cleanup & improve auto testsJ-P Nurmi2015-06-291-10/+6
| | | | | | | | | - always verify component creation to catch errors early - remove empty init() and cleanup() functions - remove redundant "defaults" checks Change-Id: I39f16404fa2e3d3e38348742afd8f51ea36b2f05 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Promote layoutDirection & effectiveLayoutDirection to ControlJ-P Nurmi2015-05-221-28/+0
| | | | | Change-Id: I44df09c17d6d20cfd929af4e331e15f48b19587e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* BSD license for QML code in testsJ-P Nurmi2015-03-041-22/+26
| | | | | Change-Id: Ia1556502ece0bc385375e61653169bdc855f592e Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>
* Import the Qt Quick Controls 2 prototypeJ-P Nurmi2015-02-051-0/+287
Change-Id: Ib8c0c4160958e5cfea29a6e9df1b3f1fb19715fc Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>