aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup obsolete references to doc/snippets/screenshotsJ-P Nurmi2017-05-041-1/+1
| | | | | Change-Id: Ia631cd493d695aaac44d612f234756b4e5b558dd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_snippets: take screenshots only when requestedJ-P Nurmi2017-05-031-61/+43
| | | | | | | | | | | | The component loading code has been adjusted so that it can load snippets that use either a Window root element too. This speeds up the test a lot in the CI, and allows us to flatten the snippet-structure. Set SCREENSHOTS=1 environment variable to take screenshots. Change-Id: Ibd9e76befe62044dd1374899f18ea3d8c7ad454b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Drawer: fix drag-over-threshold calculationJ-P Nurmi2017-05-022-20/+45
| | | | | | | | | | Don't steal a horizontal drag if a flickable has been dragged a long distance vertically, and then later the flick happens to exceed the horizontal drag threshold. Change-Id: Idf39997aa20cc41da561f182119199f30c63ba32 Task-number: QTBUG-60521 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_popup: disable touch compressionJ-P Nurmi2017-05-021-0/+7
| | | | | | | | 09b9a55 added touch event tests to tst_popup::overlay(). In order to make touch tests reliable, touch event compression must be disabled. Change-Id: I9fcda132447d9a8cf6ef80163be46aea391eff24 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickPopopPositioner: fix reposition() callsJ-P Nurmi2017-05-022-0/+18
| | | | | | | | | | QQuickDrawer still overrides QQuickPopupPrivate::reposition(), so it must be called instead of calling QQuickPopupPositioner::reposition() directly. Task-number: QTBUG-60493 Change-Id: I45ba7364c32d89d2fd128c07f68274b962467ced Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't close a popup when pressed inside and released outsideJ-P Nurmi2017-04-291-0/+6
| | | | | Change-Id: Iadf58b0c98d7410e4cc9f75f4baf42adf8c521b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickDrawer: fix flicking inside drawersJ-P Nurmi2017-04-282-22/+141
| | | | | | | | The pressPoint must be stored before rejecting a press event, to be able to calculate correctly when to steal/grab move. Change-Id: I4c9225fdaf730800fec30b3f37a2a0fe773e8b03 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_combobox: get rid of waitForRendering()J-P Nurmi2017-04-271-9/+31
| | | | | Change-Id: I91b0a529b293aaef8d17cfbc2aafa5ea1805a3f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_rangeslider: remove unnecessary waitForRendering()J-P Nurmi2017-04-271-1/+0
| | | | | | | Apparently missed in 87c1ec3. Change-Id: Iafeee4d44790eaa37f0e51b5ebe1aefb5d532cf6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix Popup.CloseOnRelease for non-modal popupsJ-P Nurmi2017-04-271-16/+40
| | | | | Change-Id: I70ac251a02a7856e6770cdb9b3e5b2a2d027d133 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Container: document and test current index managementJ-P Nurmi2017-04-271-0/+36
| | | | | Change-Id: I368dd50a4ded743826d6dc4d25dde379c98af20d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_popup: get rid of waitForRendering()J-P Nurmi2017-04-271-1/+6
| | | | | Change-Id: I4db519712ad3d2aa53d8fa7cd387c8a893fc6472 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_dialog: get rid of waitForRendering()J-P Nurmi2017-04-271-4/+20
| | | | | | | | | | | | The intention is to wait until a dialog and its content is fully open and visible. While waitForRendering() does the job, it can sometimes take a bit of unnecessary extra time. Using SignalSpy to wait for opened() allows the test to continue immediately after the enter transition is finished. Change-Id: I86f2d524c616981148988f67dfed09c79002f7a9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Popups: fix non-dimming modal background leaking events throughJ-P Nurmi2017-04-261-4/+28
| | | | | | | | | | | This piece of code, which was thought unnecessary, went missing when moved from mousePressEvent() to handlePress() in 7faafa4. It is needed after all for non-dimming modal popups, because in that case we simply cannot rely on the background dimming blocking the press... Task-number: QTBUG-60405 Change-Id: I53d89133eeae4ad8531b3c1e07c3b22295d438de Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Forward focus to the contentItem of editable spinboxesMitch Curtis2017-04-242-1/+11
| | | | | | | | | | | | 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>
* QQuickDrawer: don't jump when dragging openJ-P Nurmi2017-04-241-15/+25
| | | | | | | | | | | | | | | | Typically drawer's drag margin is so small that one can barely notice that it jumps when dragging begins. On systems with larger start drag distance, or when drawer's drag margin is manually increased, the jump was noticeable and disturbing. Unfortunately several tests had to be adjusted accordingly, because they were assuming that pressing at the edge and then dragging in the middle would immediately snap the drawer. Now the tests are sending a press at the edge, first moving past the start drag distance, and then moving to the actual tested position. Change-Id: Id8badf256fd4dd51f34db76ebe03bf6b15203cd9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_Drawer: disable compression for touch eventsJ-P Nurmi2017-04-241-3/+10
| | | | | | | | | | Touch event compression makes auto tests unpredictable and is causing headache for the upcoming "smooth dragging" changes. Disable touch event compression and remove the manual flushing that is no longer needed. Change-Id: I1264203255d1c796829479026c84ba368f4758b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_slider & tst_dial: add simple tests for null handlesJ-P Nurmi2017-04-242-0/+26
| | | | | | | | Just to ensure that these corner cases are also tested. We should not assume that the handle visuals exist, so these tests must not crash. Change-Id: I3dbf6ec78667bd9e99b3de79ffa8109858f9edd5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickRangeSlider: don't crash on press with null handlesJ-P Nurmi2017-04-241-0/+27
| | | | | | | | The handle visuals should be optional. There were a few missing checks for null pointers. Change-Id: I13e38f373428dbe0c8e338442370fbe7bb02c15a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix QQuickApplicationWindow::isComponentComplete()J-P Nurmi2017-04-211-0/+23
| | | | | | | | | | It has to default to true to ensure that a QQuickApplicationWindow instantiated in C++ is not stuck to false forever. When instantiated by the QML engine, it is set to false during the QML component initialization phase from classBegin() to componentComple(). Change-Id: Ieba2bbfb8fc0296b8cb28df91b12bcc55dd31bf4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix QQuickPopup::isComponentComplete()J-P Nurmi2017-04-211-0/+23
| | | | | | | | | | | | | | | It has to default to true to ensure that a QQuickPopup instantiated in C++ is not stuck to false forever. When instantiated by the QML engine, it is set to false during the QML component initialization phase from classBegin() to componentComple(). NOTE: QQuickPopupItem's visibility has to be now set outside of QQuickPopupItem constructor, because QQuickPopupItem::itemChange() calls back to QQuickPopup::itemChange(). At that point QQuickPopupPrivate::popupItem should be set. Change-Id: I96fa4ab4b2f29344c4a0d5bce5f8c7642e9db1a6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* *.pro: osx -> macosJ-P Nurmi2017-04-2011-11/+11
| | | | | Change-Id: I29b36eaa417986be24c917bc9c9b1f6441773e3d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_controls: remove waitForRendering() from test_multiTouchJ-P Nurmi2017-04-205-5/+0
| | | | | | | | | | Not sure why this was added in the first place. Now it has been copied to all test_multiTouch() implementations and sometimes slows down the test round quite a bit. Change-Id: I76e259e0267b34de6432998385b9f2e6759b9819 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> 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>
* Re-enable tst_focus on LinuxJ-P Nurmi2017-04-201-4/+1
| | | | | | | | | | The auto test was disabled on Linux, because it was randomly crashing in libdbus on Ubuntu 14.04. The CI has upgraded to Ubuntu 16.04 so this should no longer be a problem. Task-number: QTBUG-50295 Change-Id: If654a30456a0d5e2a516b5e235b9b75e89425c92 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* 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>
* QQuickComboBox: handle touch eventsJ-P Nurmi2017-04-191-0/+44
| | | | | | Task-number: QTBUG-58389 Change-Id: I7120d7bce827beb97a9ae3eaf4e99cf6b6e9f209 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollBar: react immediately when using a mouseJ-P Nurmi2017-04-101-1/+1
| | | | | | | | | | | | | | | The initial drag threshold is a necessary evil on touch to avoid conflicting with flickables, but leads to bad experience (QTBUG-47081) when using a mouse. Now that we have separate mouse and touch handling, we can apply immediate moves when using a mouse, but keep the old behavior on touch. [ChangeLog][Important Behavior Changes] ScrollBar now reacts immediately when using a mouse. Task-number: QTBUG-58667 Change-Id: I51759fc01dc8b8536834a8a3cca635ff512f7dc9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickScrollBar: handle touch eventsJ-P Nurmi2017-04-101-0/+201
| | | | | Change-Id: I0521eb36ee01abc72edc869d92910e823f00a2f2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Another attempt to fix tst_snippets on OS X 10.10J-P Nurmi2017-04-071-1/+1
| | | | | | | | | | | | | | | | | | | The test is sharing (and showing, and resizing) the same view for every snippet. In the CI system we keep having issues that sometimes, after running the test for a while, the window content stops being resized as appropriate. Considering that QQuickWindow resizes its content item in resizeEvent(), this probably means that in the CI the window does sometimes not receive the resize event as appropriate. Before, the window was left hanging there after taking the very first screenshot. Now we try to close the window so that each and every screenshot snippet gets loaded while the window is hidden, shows it, and waits for it to become visible/active. This will hopefully ensure that the window will always receive an "initial" resize event. Task-number: QTBUG-58606 Change-Id: If4b38443cfdc9175f313bf8e70c7daf42d34f687 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* RangeSlider: react immediately when using a mouseJ-P Nurmi2017-04-051-14/+15
| | | | | | | | | | | | The initial drag threshold is a necessary evil on touch to avoid conflicting with flickables, but leads to bad experience (QTBUG-47081) when using a mouse. Now that we have separate mouse and touch handling, we can apply immediate moves when using a mouse, but keep the old behavior on touch. Task-number: QTBUG-59920 Change-Id: Ida36eed1f59a30173e3a2c53b55e044a87c98d8b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Dial: react immediately when using a mouseJ-P Nurmi2017-04-051-7/+7
| | | | | | | | | | | | The initial drag threshold is a necessary evil on touch to avoid conflicting with flickables, but leads to bad experience (QTBUG-47081) when using a mouse. Now that we have separate mouse and touch handling, we can apply immediate moves when using a mouse, but keep the old behavior on touch. Task-number: QTBUG-59920 Change-Id: I097cbdaed4933c0d907097b75f15ba16dcf615b1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Slider: react immediately when using a mouseJ-P Nurmi2017-04-051-15/+15
| | | | | | | | | | | | | | | | | | | The initial drag threshold is a necessary evil on touch to avoid conflicting with flickables, but leads to bad experience (QTBUG-47081) when using a mouse. Now that we have separate mouse and touch handling, we can apply immediate moves when using a mouse, but keep the old behavior on touch. Changing the behavior is simple, but auto tests need quite many tweaks so RangeSlider and Dial will be done separate follow up changes. [ChangeLog][Important Behavior Changes] Sliders and Dials now react immediately when using a mouse. Now the initial drag threshold applies only on touch, to avoid conflicting with flickables. Task-number: QTBUG-59920 Change-Id: Ifc1e6ed74c7894c3c854c975dff5238278827590 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* auto tests: utilize TestCase::fuzzyCompare()J-P Nurmi2017-04-052-28/+20
| | | | | Change-Id: I9c3f7997a14bd1824663c7521061c4ee43d6380e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Set explicit cursors on all interactive controlsJ-P Nurmi2017-04-056-1/+499
| | | | | | | | | | | | For example, if you have a floating button on top of a text editor, hovering the button must change the cursor from the editor's ibeam cursor to an arrow cursor. This applies to all interactive controls that call setAcceptedMouseButtons(). If a control blocks mouse events, it should not use some random cursor from another control underneath. Task-number: QTBUG-59629 Change-Id: I8a6ae306bbc76a9b22377361cb19cf9c3a872d31 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename tst_scrollbar to tst_cursorJ-P Nurmi2017-04-054-9/+9
| | | | | | | | | | | This test was added in 88a62b3 that fixed the scrollbar cursor. It was not possible to test in QML, so a separate C++ test was added. It was noticed that most interactive controls have the exact same issue, so we want to utilize the same test for testing the cursors of all relevant controls. Change-Id: I7c307de9f72760b0993007246beb3357a1b5ec2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_combobox: use larger windowJ-P Nurmi2017-04-041-2/+4
| | | | | | | | | | | test_down() needs to place the popup below the combobox button to be able to test its pressed and down states while the popup is open. On some high DPI displays (Chromebook Pixel) the popup did not fit fully below, but got pushed partly over the button. Consequently, mouse presses went to the popup instead of the button and the test failed. Change-Id: I03e5768e00cf1eaf6d704a16ffe2b8d1705021b2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* StackView: resolve relative URLs to the callerJ-P Nurmi2017-04-041-0/+9
| | | | | | Task-number: QTBUG-59309 Change-Id: I3c19d55431dd4831c4510acb5ef0e9fffa8f478f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickScrollBar: set implicit Cursor as Qt::ArrowCursorKarol Polak2017-04-044-0/+170
| | | | | | | | Scrollbar over TextArea had Qt::IBeamCursor, although the textarea would not be activated when clicked. Task-number: QTBUG-59629 Change-Id: Ie96ba03360fcfb5872f5bb6345e168c987978aca Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Attempt to fix tst_snippets on OS X 10.10J-P Nurmi2017-03-291-8/+7
| | | | | | | | | | Don't show the window until we start taking the screenshots and actually need a visible window. Task-number: QTBUG-58606 Change-Id: I2fcab3b54f0faf67588a21e0732d2e6dbcee9194 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* StackView: provide better warnings and errorsJ-P Nurmi2017-03-241-0/+14
| | | | | | | | | Check for valid URLs and test object types. Throw warnings when appropriate instead of crashing later. Task-number: QTBUG-59634 Change-Id: Ia269dc8afd31b618f1ff7aec94d684029cb78244 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* StackView: improve the component creation errorsJ-P Nurmi2017-03-241-2/+4
| | | | | | | | | | Previously it just dumped the error from the component, without telling that it was anyhow related to StackView. Now it uses the standard QML warning syntax and includes the name of the operation (push/replace). Task-number: QTBUG-59634 Change-Id: Iea8df51f587c243ca065627e59bb0e5b5b526664 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update expected result of SwipeDelegate warning messagesMitch Curtis2017-03-201-1/+1
| | | | | | | | | It looks like af9536deeaf1123aaae5ce78cee7b4014a01d595 (in declarative) changed the format of warning messages. Task-number: QTBUG-59536 Change-Id: I9a8228448ef136f65258b985c3dddf011063c49c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Revert "Temporarily comment out line number-dependent SwipeDelegate tests"Mitch Curtis2017-03-201-104/+103
| | | | | | | | | | This reverts commit 6a5e030fbfa5f2adeabc6284f6ae3993e3d658c7. The qt5.git integration went through, so this can be reverted now to make way for a proper fix. Change-Id: I73f9aef29683172360e85026e1c8c93b8409eeae Reviewed-by: Liang Qi <liang.qi@qt.io>
* Temporarily comment out line number-dependent SwipeDelegate testsMitch Curtis2017-03-171-103/+104
| | | | | | | | | This is needed in order for af9536deeaf1123aaae5ce78cee7b4014a01d595 to be integrated into qt5.git. Task-number: QTBUG-59536 Change-Id: Ie1405a498018473029ce34de7dd95189aa75f203 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-103-3/+126
|\ | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextfield.cpp Change-Id: Ie80a2d3bcbb961a38e3dffa247547d3d860c231a
| * Fix a crash with focus handling when destructing QQAppWindowJan Arve Saether2017-02-072-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because QQuickApplicationWindow connected SIGNAL(activeFocusItemChanged()) to SLOT(_q_updateActiveFocus())); it would enter _q_updateActiveFocus() from the dtor of QQuickWindow (because dtor of QQuickWindow would emit activeFocusItemChanged()). At that point the QQuickApplicationWindow object for the member function _q_updateActiveFocus() was already destroyed, so we would crash. Instead, make sure we clear the focus as early as possible, and then disconnect in case activeFocusItemChanged() is emitted after QQuickApplicationWindow is destroyed. Task-number: QTBUG-57846 Change-Id: I4b1999e647b970394436a2d462b7f352f1c8a811 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * tst_snippets: share a single QQuickView instance for all data rowsJ-P Nurmi2017-01-251-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | This test contains a lot of data rows. Re-creating a QQuickView for every data row puts a lot of stress on the system. In the new Open Nebula -based CI, things start consistently exploding after a random amount of tst_snippets data rows. This change fixes that. Task-number: QTBUG-58196 Change-Id: I6549944a6d7b2bd384d09ee974bee6423ffe625c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Port from QT_NO_ACCESSIBILITY to QT_CONFIG(accessibility)J-P Nurmi2017-02-241-3/+5
| | | | | | | | | | Change-Id: I03deebff661746d49e537af5b1c8899b938efb0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-24112-264/+1384
| | | | | | | | | | | | | | | | | | | | 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>