summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix QSpinBox tests failing after change in the Windows QPAAndre de la Rocha2019-02-121-0/+10
| | | | | | | | | | | | | | | | | | | Some QSpinBox tests start failing after reverting to using legacy mouse messages to handle mouse input in the Windows QPA. It seems to be caused by a test that runs before it and moves the mouse cursor. Then when the QSpinBox tests run, they create widgets that appear below the mouse cursor, causing some mouse events to be generating and messing with the events synthesized by the test itself. With the pointer messages being used for mouse input, the legacy mouse messages that are generated under this condition were being ignored. But by reverting to the old implementation, the legacy messages are handled again, causing the test to fail. This change moves the mouse pointer to a safe position during the test initialization, so it does not depend on the state left by previous tests. This change needs to be integrated together or before the change in the windows QPA. Change-Id: I91f7e9376dc495ee61250e0a7d908c1c2b685bc8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QAbstractSlider: fix invertedControls having no effect for left/right keysMitch Curtis2018-12-131-3/+487
| | | | | | | | | | | | | | | | | | | | There was a comment in the code that said: // It seems we need to use invertedAppearance for Left and right, otherwise, things look weird. It's not clear what that was referring to, but in its current state, a slider with invertedControls set to true will not behave as expected: pressing the left arrow key will decrease its value instead of increasing it, and vice versa for the right arrow key. As stated in the documentation (and by its name), invertedAppearance only controls the appearance of the slider, and not the effect of key events. Remove the comment and use invertedControls instead. Change-Id: I13296cbda9244413978ef0d7f0856065f74fd0bf Fixes: QTBUG-25988 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Refactor tst_QAbstractSlider::keyPressed()Mitch Curtis2018-12-131-163/+482
| | | | | | | | | | Don't do several tests at once in the test function. Instead, move the extra tests to the data function. This makes it possible to easily add a self-contained test (i.e row) for an upcoming fix. Task-number: QTBUG-25988 Change-Id: I65c8d7620f01107f8f59c96896b1a641d97f5fdc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QFocusFrame: protect it from being moved around by accidentRichard Moe Gustavsen2018-11-271-0/+39
| | | | | | | | | | | | | | | | | | | If a focus frame is set around a widget that exist inside a QAbstractItemView, both the focus frame and the widget will be scrolled when the table is scrolled (since the focus frame is a child of the view). The result is that after the widget has been scrolled (which will move the focus frame to the correct position as well), the focus frame will be scrolled next, and therefore away from the widget. This patch will catch this case by always adjusting the focus frame position when someone tries to move it. Trying to move the focus frame away from the widget it tracks will anyway be flaky. Fixes: QTBUG-63877 Change-Id: Ic2aacc4fafc219280e32092c258a7539d0db9cd0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-11-271-0/+12
|\ | | | | | | Change-Id: I12bcee17e349edd0dd4fd08da76361d1ffb1a727
| * Make developer build tests pass for boot2qtSami Nurmenniemi2018-11-261-0/+12
| | | | | | | | | | | | | | | | Some tests were fixed and others were skipped/blacklisted. Task-number: QTBUG-63152 Change-Id: Ica7df555f8d152ee589865911130525101d4b941 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Fix calculation of text margin if line edit contains side widgetsVitaly Fanaskov2018-11-262-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation leads to infinite chain of showing/hidden line edit under circumstances described in QTBUG-54676. We basically got the situation when size hint were calculated differently depending on the line edit visibility state. In this case toolbar layout have to show/hide extension button and line edit a lot of times and can never leave this "loop" (please note, that the chain is much more complicated in reality): Resize toolbar -> Set layout geometry -> Size is OK to display line edit -> Set layout geometry -> Hide extension button -> Set layout geometry (wrong size is calculated here, so "run out of space") -> Hide line edit -> Set layout geometry -> Show extension button -> Set layout geometry - > Size is OK to display line edit ... And we're in the "loop" Clear button is hidden if there is no text in a line edit. In the previous implementation, the button was always visible, only opacity was changing in order to "hide" the button. It resulted to incorrect size hints (regular and minimum). In the current implementation the button is really hidden/shown, and size hints calculated correctly. Also updated unit test for line edit. Remove code duplication in functions for calculation text margin Fixes: QTBUG-54676 Change-Id: I4549c9ea98e10b750ba855a07037f6392276358b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | macOS: Remove blacklist entries for no longer supported OS versionsTor Arne Vestbø2018-11-121-1/+0
| | | | | | | | | | Change-Id: Iae6552f1fdcf1dea07a03d3788d378af9140d1a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Update to CLDR v34Edward Welbourne2018-11-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This only updates data on languages already present in 5.12; once it has merged up to dev, the scripts need to be run again to pick up a few more languages and possibly add any more new languages present in v34. Change some tests to match changes in en_AU's abbreviated day and month names. [ChangeLog][ThirdParty][CLDR] Update locale data to CLDR v34. Task-number: QTBUG-71144 Change-Id: I68402b5e7e9d3dba669b8ba31b9a8abd86675c6e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_QMdiSubWindow: fix flaky setOpaqueResizeAndMove testChristian Ehrlicher2018-09-152-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QMdiSubWindow::setOpaqueResizeAndMove checks if a resize of the mdi subwindow works as expected by simulating mouse events. Those events are sent to fast and therefore the operationMap of QMdiSubWindowPrivate is not yet updated which let the test fail. There was already a call to qWait(250) to wait for the 200ms timer but sometimes (esp. in virtual environments) the timer was not triggered after this period. Fix it by checking if resizeTimerId is set back to -1 which means that updateDirtyRegions() was called. Change-Id: I961ba80589d2f725a6858ba70b84fb35750a6964 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | Blacklist an extremely flaky tst_QDoubleSpinBox::editingFinished testTony Sarajärvi2018-09-151-0/+2
| | | | | | | | | | | | Task-number: QTBUG-70088 Change-Id: I9239f379121f6167dd665ae3137a449d0ac5b6c7 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Extend opensuse blacklistings to opensuse-leapTony Sarajärvi2018-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In openSUSE 15.0 /etc/os-release the ID of the OS was changed from "opensuse" to "opensuse-leap". So every blacklisting we did for opensuse, didn't cover opensuse-leap. This one adds opensuse-leap as a blacklisted platform whenever opensuse was blacklisted. Task-number: QTBUG-70463 Task-number: QTBUG-51399 Change-Id: I5879eb34926757163973d8b9442eae58f47d2f11 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-101-0/+54
|\| | | | | | | | | | | | | Conflicts: mkspecs/common/macx.conf Change-Id: I8576493b417912fa5e5501bc2c1b935d186ac209
| * Fix crash when combining QOpenGLWidget, QStaticText and Qt QuickEskil Abrahamsen Blomfeldt2018-08-241-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain circumstances, if you had a widget with a QOpenGLPaintEngine, and drew QStaticText into this, and then later had Qt Quick access the same cache and try to resize it, we would get a crash because the resize function would have a pointer to the paint engine and try to access its shader manager (which would now be null, since this is outside the begin()/end() phase of the paint engine. The solution is to reset the paint engine pointer to null on the cache once it has been populated and it is no longer needed. [ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText, QOpenGLWidget and Qt Quick in the same application. Task-number: QTBUG-70096 Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add debugging output to help diagnose cause of tst_qspinbox failureMitch Curtis2018-08-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | I've tried to reproduce the failures in the CI a couple of times now, but it keeps passing. Let's leave some debug output in the test so that if/when it does fail, we might know a bit more about why it does so. Task-number: QTBUG-69492 Change-Id: I5b39ac692e9026ce4b25cd13d342b11e061b777b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Nathan Collins <nathan.collins@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | tst_qmenu: Fix funky use of QTRY_VERIFY with qWaitForTor Arne Vestbø2018-08-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The QTRY_VERIFY was needed because the window doesn't initially have a handle, and QTest::qWaitForWindowActive(QWidget *) only checks the active state of the widget if it does, returning false if not. This broken logic should be fixed, but for now let's make it clear what's actually going on by using an explicit wait for the window handle. Change-Id: I6dd89e0894efed14f4b9a2562dfe8ca76b5ef89c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qspinbox: include actual emission count in failure messageMitch Curtis2018-08-071-1/+2
| | | | | | | | | | | | | | | | | | | | It's useful to know how many times the signal was emitted, because it gives us insight into why the test may have failed, especially when it's difficult to reproduce. Task-number: QTBUG-69492 Change-Id: I94796ed880512b060e0a724c87edde8c3b91bb7c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qdatetimeedit: call setCalendarPopup(false) when cleaning upMitch Curtis2018-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | Tests could change this property, and since the majority of the tests share testWidget instead of creating local instances, we should be thorough when cleaning up. Change-Id: I6039fb6857f4f788f809b1d1fd491b4ef34923ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_qdatetimeedit: hide testWidget when creating widgets on the stackMitch Curtis2018-08-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The majority of the test reuses testWidget. While this may be faster than creating a QDateTimeEdit instance on the stack for each test, it introduces issues when certain properties aren't unset when cleaning up. This happens easily when new tests are introduced which rely on certain properties, for example. Rather than making the newly introduced step-modifier-related tests use testWidget, this patch goes with the simpler option of hiding testWidget, just like other tests currently do. Eventually we should probably switch to using local instances everywhere. Task-number: QTBUG-69492 Change-Id: I4d5625be0b7c72db793346f43fe3a7e7c1241f13 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist flaky tst_QSpinBox::stepModifierPressAndHold on OpenSUSETor Arne Vestbø2018-08-041-0/+2
| | | | | | | | | | | | Task-number: QTBUG-69492 Change-Id: Ic24bad5a6b0c085e82f95e0b418d4d57405de4ea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add QStyle::SH_SpinBox_StepModifier style hintNathan Collins2018-07-123-275/+613
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the developer to pick which keyboard modifier increases the number of steps a QAbstractSpinBox takes when the user interacts with it. The modifier can be either Qt::ControlModifier (default), Qt::ShiftModifier or Qt::NoModifier. Qt::NoModifier disables the step modifier. Note that on macOS, Control corresponds to the Command key. Holding the modifier increases the step rate when: - scrolling; - pressing the up/down keys; - pressing the spin box up/down buttons. [ChangeLog][QtWidgets][QStyle] QStyle::SH_SpinBox_StepModifier allows the developer to pick which keyboard modifier increases the number of steps a QAbstractSpinBox takes for the following interactions: scrolling, up/down keyboard keys and the spin box buttons. The Qt::ShiftModifier can now be used, or the feature can be disabled using Qt::NoModifier. Previously, only Qt::ControlModifier could be used as the modifier. Change-Id: Ib5518127e86a8f67798a9a1d6e860c6e35896e6f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-023-0/+47
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Android: Blacklist various cases in tst_QLineEditMårten Nordheim2018-06-261-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-69111 Task-number: QTBUG-69112 Task-number: QTBUG-69113 Task-number: QTBUG-69114 Task-number: QTBUG-69115 Task-number: QTBUG-69116 Task-number: QTBUG-69118 Task-number: QTBUG-69119 Change-Id: I424cb472e97bd427e800ee230e0e57d763d1b8a6 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Android: Blacklist a few cases in tst_qgroupboxMårten Nordheim2018-06-261-0/+13
| | | | | | | | | | | | | | Task-number: QTBUG-69084 Task-number: QTBUG-69083 Change-Id: Icf218795f81f01a559094cf2088f53a9fd597c24 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Android: Blacklist tst_qframe::testPaintingMårten Nordheim2018-06-261-0/+3
| | | | | | | | | | | | | | | | It causes most of the fails seen on Android. Task-number: QTBUG-69064 Change-Id: I2f97fea41ee78e7962b8c34ed996bbe4bcb88732 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | tst_QMenu: Skip tests when window activation is not supportedJohan Klokkhammer Helsing2018-06-291-0/+18
| | | | | | | | | | | | | | | | Makes sure the tests are skipped on Wayland. Task-number: QTBUG-62188 Change-Id: Ia50d6cc02fbbac0fb6b77a16eb6372c1adb422d8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QIntValidator: Intermediate for number if digits equal or less than maxTuomas Heimonen2018-06-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Input value which is over the highest acceptable value, but consisting of a number of digits equal to or less than the max value should be considered intermediate. [ChangeLog][QtGui][QIntValidator] Input value with over the highest acceptable value, but with equal or less amount of digits than the maximum value is now considered intermediate. Task-number: QTBUG-59650 Change-Id: I71a77c9c266f0f3b62c71ac6cb995019385c1cf5 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | winrt: tst_qdoublespinbox: Remove QEXPECT_FAIL for editingFinishedOliver Wolff2018-06-261-7/+0
| | | | | | | | | | | | | | | | Behavior has been fixed. Task-number: QTBUG-68297 Change-Id: I217fffc3c9a189d48e673356b1123f9eda8af94a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | tests: un-blacklist tst_QSizeGrip::hideAndShowOnWindowStateChange on xcbGatis Paeglis2018-06-251-2/+0
| | | | | | | | | | | | | | | | According to local testing and Grafana statistics for the period of the last 1 year, this test has not been failing on XCB. Change-Id: I86640b22c9e7a258965805a661e1e8c3ead8d012 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* | widgets: fix QWidget::save/restoreGeometry()Gatis Paeglis2018-06-251-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::restoreGeometry() is calling QWidget::move() with restoredFrameGeometry, which internally calls setGeometry() and sets positionPolicy = QWindowPrivate::WindowFrameExclusive, which is invalid: restoredFrameGeometry is WindowFrameInclusive geometry. QPA plugins rely on correctly set policies when interpreting x,y. QWidget::move() was not designed for this AFAICT, so making it to accept frame geometry is no-op. It is widely used legacy code, changing it could cause regressions. Save/restore API was introduced in Qt 4.2, at that time we did not have APIs like QWindow::setFramePosition(), so its unclear why geometry() was not stored instead. The documentation also is somewhat unclear: "[..] save the geometry when the window closes [..]" Frame or client geometry? It does not specify. And from the code we see that frame geometry was passed as client geometry, not making the original intention clearer. Besides that, restoreGeometry() is full of other undocumented assumptions where to place windows and when to fail (fortunately its easy to write your own save/restore logic). Added a Qt 6 note in the source code. What this patch changes: Now we store geometry() in saveGeometry() and use that value in restoreGeometry() by setGeometry(). This does not cause any behavior difference in window positioning (tst_QWidget::saveRestoreGeometry still works). Geometry restored from data saved with earlier versions of saveGeometry() might be positioned at: x + leftMargin, y + topMargin. This patch makes tst_QWidget::saveRestoreGeometry to always fail instead of being flaky. Blacklisting for XCB instead of selected distros. Also enabled excluded code paths for XCB on tst_QDockWidget::restoreDockWidget(). It does not seem to be flaky, maybe it was in 2015, but lot of things have changed since then. Task-number: QTBUG-66708 Change-Id: Ic86a6fd091e2c71b7550b2f476386da704253cd4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix tst_qtextbrowser for configurations with builtin testdataOliver Wolff2018-06-222-13/+25
| | | | | | | | | | Change-Id: I1dc17642934e8fd2d5e3b7f245e1fb0c26b8e75a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | winrt: Make widgets/widgets auto tests passOliver Wolff2018-06-2224-2/+185
| | | | | | | | | | | | Task-number: QTBUG-68297 Change-Id: I64d6e89e515a6284fbd8625cded22511de783481 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Blacklist tst_QMenuBar::check_menuPositionJoni Jantti2018-06-151-0/+1
| | | | | | | | | | | | | | | | This autotest fails on Ubuntu 18.04 builds. Task-number: QTBUG-68865 Change-Id: Ia245f72826be071e5617c417e3d9f50bdcc689a9 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | QLineEdit: Emit inputRejected() when part of the input is rejectedAndy Shaw2018-06-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | When pasting text, it is possible that part of the text is still pasted but part of it is not. For example, if there is a maximum length set then only the first part of the text is pasted and the rest is dropped. In this case it should still emit inputRejected() as not all of the input was accepted. This amends c901cdadc0a6ec65eddfe4f181274e56567f9973. Change-Id: If7906767be27e88ed9914c50bf0427833de5b8fa Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QLineEdit: Add an inputRejected() signal for when a key is not allowedAndy Shaw2018-06-011-1/+40
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] Added inputRejected() signal for when a key press is not accepted by the QLineEdit. For instance, when an invalid key is pressed for a validator set. Task-number: QTBUG-57448 Change-Id: I39182a78b07b37c6da01905b8da4c57930e3454b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Eliminate an un-needed #includeEdward Welbourne2018-05-311-1/+0
| | | | | | | | | | | | | | Nothing in this test references date-times. Change-Id: I4005cda550d54abe46370963b1e91fab9829298d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Tests: replace deprecated QDesktopWidget::screenGeometry()Christian Ehrlicher2018-05-283-12/+12
| | | | | | | | | | | | | | | | QDesktopWidget::screenGeometry() and similar was deprecated in 5.11 and replaced by QScreen::geometry() Change-Id: Ic630d022bc6461af78f49684c8ac9d1836d738bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | winrt: Skip/blacklist failing opengl testsOliver Wolff2018-05-281-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68297 Change-Id: I1396b658b49baf5a8d4b97e35c22ddc25727b68a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Fix tst_qtextedit for configurations with builtin testdataOliver Wolff2018-05-281-0/+2
| | | | | | | | | | Change-Id: Ic692acd8053a02270416deb1be3d58a5f0424526 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Fix tst_qcombobox for configurations with builtin testdataOliver Wolff2018-05-281-0/+2
| | | | | | | | | | Change-Id: Id3a1166428873618b253989da98ccdbe13afd1a0 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-242-8/+11
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Fix tst_QDoubleSpinBox::editingFinished failing after other testsKari Oikarinen2018-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Wait for the spinbox to show become active in the previous test. Also use QWidget::activateWindow() instead of QApplication::setActiveWindow(). Use of the latter seemed to result in some confusion where QWidget::isActiveWindow() returned true but QWindow::isActive() on the underlying window returned false, leading qWaitForWindowActive() to fail. Also remove superfluous setting of focus. It was just set and verified. Change-Id: I023cdc2d272e23b2537b32606b7a3bf35bf671ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * tst_QCommandLinkButton: Add back wait to the beginning of setAutoRepeat()Kari Oikarinen2018-05-161-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setAutoRepeat() is failing on macOS and Windows when run together with defaultAndAutoDefault(). It succeeds when run on its own. Adding the wait allows it to succeed when run with the other tests as well. Amends 0cb940b1d3b9a1ba50f2d1973fca411706da266d, which removed the wait. The comment is the same as before. I couldn't see a better way to replace the wait (QApplication::topLevelWidgets() already returns only the testWidget and testWidget->isActiveWindow() returns true). Another theory I had was something waiting for the KeyRelease so I changed QApplication::sendEvent() uses to QTest::keyClick(). It did not help but that still seems preferable. Change-Id: If87d1e6e018751f3068ea4c913ae6731aba41ff0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Apply Qt::ControlModifier to all spin box interactionsNathan Collins2018-05-243-28/+1247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A step modifier already existed when scrolling with the Qt::ControlModifier held. This patch applies this functionality to other methods of stepping a spin box. Holding the modifier increases the step rate when: - scrolling; - pressing the up/down keys; - pressing the spin box up/down buttons. [ChangeLog][QtWidgets][QAbstractSpinBox] The Qt::ControlModifier increases the number of steps a QAbstractSpinBox takes for the following interactions: scrolling, up/down keyboard keys and the spin box buttons. Previously, Qt::ControlModifier only affected scrolling. Task-number: QTBUG-67380 Change-Id: Icc8754d5c007da0771bfaef113603a2f334dd494 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-141-6/+4
|\| | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module_headers.prf tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qwidget/BLACKLIST Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
| * Stabilize tst_QMdiArea::subWindowListKari Oikarinen2018-05-091-6/+4
| | | | | | | | | | | | | | | | Flakily failed on openSUSE. Task-number: QTBUG-68170 Change-Id: Ic75e081238ccf4bad54de39e6bdaa892796b599e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-022-8/+20
|\| | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * tst_QTabWidget: Add unconditional qWait() backKari Oikarinen2018-05-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | paintEventCount() is currently flaky on macOS. It gets extra paint events after qWaitForWindowExposed() returns, which causes the following assertions to fail. Add the wait that was removed in 0cb940b1d3b9a1ba50f2d1973fca411706da266d back to fix those failures. Task-number: QTBUG-68032 Change-Id: I68e0b6008de40922ec740291dfdd1842e0f62f89 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * tst_QLineEdit: Use correct keys to move to Start/End of LineDaniel Teske2018-04-301-7/+17
| | | | | | | | | | | | | | | | | | Home/End don't actually work on macOS. The "select all and delete" key was not actually testing anything at all. Change-Id: I44d3e9dd27da418afd699bf8720d5369325d20df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | tst_QMenuBar: Remove obsolete warning checkGabriel de Dietrich2018-05-011-1/+0
| | | | | | | | | | | | | | | | | | | | This warning was removed when we refactored QCocoaMenuItem::sync(). This change amends 8412009de62ff0c9540290b6fb0b8d1f470b2cb8. Task-number: QTBUG-68013 Change-Id: I0d65109dff5f82db530b6bdced96c05692af6b4b Reviewed-by: Liang Qi <liang.qi@qt.io>