aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/focus
Commit message (Collapse)AuthorAgeFilesLines
* Forward focus to the contentItem of editable spinboxesMitch Curtis2017-04-241-1/+0
| | | | | | | | | | | | This fixes the scenario where a SpinBox is shown for the first time with focus, but its editor (TextInput) doesn't have active focus. tst_focus' keyNavigation.qml had to be adjusted, as an editable spinbox will now consume key events. Task-number: QTBUG-60356 Change-Id: I3af0260a22e9633ab6110d6adab7b39a22b849de Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* *.pro: osx -> macosJ-P Nurmi2017-04-201-1/+1
| | | | | Change-Id: I29b36eaa417986be24c917bc9c9b1f6441773e3d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Override QQuickControlPrivate::handleXxx()J-P Nurmi2017-04-201-1/+0
| | | | | | Change-Id: I5c5be24142a758637e18df24b43847a8c6079346 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQuickControl: implement focus handling on touchJ-P Nurmi2017-04-201-2/+53
| | | | | | | | | | | | | | | | | | | | QQuickControl::focusPolicy was only managed in mousePressEvent() and mouseReleaseEvent(). All controls call the base class implementations of these event handlers to get the focus policy handling "for free". Move focus policy handling to handlePress() and handleRelease() that can be re-used for touch events, and make sure that various controls call the base class implementation of touch event handlers. There's still a bit of duplication in QQuickControl::touchEvent() and the overridden handlers in sub-classes, but this will be improved step by step. QQuickControlPrivate::handlePress/Move/Release/Ungrab() are planned to be made virtual, overridden in subclasses, and only called from QQuickControl event handlers. Most mouse and touch event handlers in QQuickControl subclasses can be removed later when we get there. Task-number: QTBUG-58389 Change-Id: I7e82dc2ef49762a005c482ce1353e03cc841659f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-243-6/+36
| | | | | | | | | | 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>
* Welcome to 2017J-P Nurmi2017-01-094-4/+4
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-032-0/+85
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * Fix QQuickControl::setFocusReason()J-P Nurmi2016-10-022-0/+85
| | | | | | | | | | | | | | | | | | | | | | There is a little behavior change in focus handling in Qt Quick after qdeclarative commit e7da97b. The order of QQuickItem::focusOutEvent() and QQuickItem::ItemActiveFocusHasChanged have changed. Now we need to emit visualFocusChanged() in setFocusReason() when losing visual focus to ensure that bindigs to visualFocus get re-evaluated as appropriate. Change-Id: I52e728c7df751a54b36f353415b2666cfedc73ad Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-061-1/+1
|\| | | | | | | Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
| * Replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-021-1/+1
| | | | | | | | | | | | | | | | And add QT_NO_FOREACH define to .qmake.conf. Now QuickControls2 is 'foreach' free. Change-Id: I98695258859decadae6fd2f23f5f6f5ef2b0550f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-083-4/+4
|/ | | | | | | | | | | | 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>
* Popup: restore focus to contentItem of ApplicationWindow when closingMitch Curtis2016-05-111-1/+1
| | | | | | | | | In Controls2, Popup and normal content are in same window, then we should maintain the focus restore work. Task-number: QTBUG-53275 Change-Id: I57f5aaf3febf1b7d2071c1734d8561932f95c699 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Control: rename activeKeyFocus to visualFocusJ-P Nurmi2016-04-261-11/+11
| | | | | | | | | This is a bit more flexible, because the name is not strictly coupled with key focus. We can even add a (re)setter later if we want. This change only renames the property. Change-Id: I6707e44040f584480a8712df1af0915ae2829d57 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Set "strong" focus policy for buttons and slidersJ-P Nurmi2016-04-231-1/+2
| | | | | | | | | | | | Except item delegates, so they won't steal focus from the parent view (ListView) or control (ComboBox). NOTE: RangeSlider must be handled as a special case, because focus must go to the handle which is interacted with. Change-Id: Ie1aa8bb9b561e6242e373ec9fe874e3aaeacd16a Task-number: QTBUG-51796 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-213-4/+4
| | | | | | | | | 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>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-132-2/+2
| | | | | Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Control::activeKeyFocusJ-P Nurmi2016-04-111-0/+34
| | | | | | | | | | | | | | | This is a convenience property that combines Item::activeFocus and Control::focusReason. This allows us to solve QTBUG-51796 in an elegant way - we can simply set Qt::StrongFocus policy on most of the interactive controls, such as buttons. The only thing we need to make sure is to use activeKeyFocus instead of activeFocus in the styles. This ensures that key focus is only visualized when actually interacting with keys - not when interacting via touch or mouse. This is a generalized version of the solution that was already used in the Universal style ApplicationWindow. Change-Id: Ifbf78e3e412f3791c8f7c369bb2de53af9ac6b0f Task-number: QTBUG-51796 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename Qt Labs Controls to Qt Quick Controls 2 - build systemMitch Curtis2016-03-182-2/+2
| | | | | | | | | The imports will be done later, as we don't want to change them until the module is releasable (which requires things like selection handles, etc.). Change-Id: I2140cff7058fc3b696e92ca8c0e5e06dca9a7c9c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Move focusReason and focusPolicy tests to tst_focusJ-P Nurmi2016-03-152-1/+97
| | | | | | | | This speeds up 'make check' a bit. There's no reason to repeat these tests for all styles. Change-Id: I091f6430172d55dbf1974d88f81a383167b30f20 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Auto test focus navigation with keysJ-P Nurmi2016-03-154-0/+574
Change-Id: Ieb75c3043b9fac972af492598853ad8501637dbb Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>