Commit Graph

8634 Commits

Author SHA1 Message Date
Christian Ehrlicher
d02e7b46a1 QTableWidgetItem: pass role to dataChanged() signal
QAbstractItemModel::dataChanged() gained an optional role parameter
with Qt5 which was not filled within QTableWidgetItem setData() function

Task-number: QTBUG-48295
Change-Id: I82289b6db78eeef09d586da267046032984952da
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-12 05:22:13 +00:00
Christian Ehrlicher
0993a9e830 tst_QHeaderView: replace custom waitFor() function
replace custom waitFor() function with QTest::qWaitFor() to avoid code
duplication.

Change-Id: I44ebcbfe4c6f6c6f787fb7dbaf958a245bc27fa1
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-05-10 14:03:27 +00:00
Christian Ehrlicher
f02256cce1 QHeaderView: reset cached size hint on reset()
QHeaderView::reset() did not reset the cached size hint which could lead
to wrong geometries when the model was reset.

Task-number: QTBUG-67927
Change-Id: I5100b28a741cc816133a229c422f9abf83f2187e
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-05-10 14:03:24 +00:00
Christian Ehrlicher
d2573f4dbd Enable checks for tst_QHeaderView::sectionSizeHint()
tst_QHeaderView::sectionSizeHint() did set some values but did not check
the return values.

Change-Id: Id606d7a06935a3d6783bc9a8c10bf05d953adec6
Reviewed-by: David Faure <david.faure@kdab.com>
2018-05-10 05:07:08 +00:00
Liang Qi
b5a956601f Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro

Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
2018-05-08 20:43:45 +02:00
Edward Welbourne
fec96d9a9f Remove mention of selftest.qrc from generator script's doc
This supplements b1945604a7, which
removed the qrc file in favor of test/test.pro coding for it.

Change-Id: I15507c89ca14fa6e6b8223de671ffff7092272d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-05-08 12:45:25 +00:00
Kari Oikarinen
c580644fe9 tests/auto/network: Avoid unconditional qWait()s
Replace with QSignalSpy or QTRY_COMPARE when possible.

Task-number: QTBUG-63992
Change-Id: I18dc8837301424855487a12ee62451a5aeb21bf0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-05-08 12:35:40 +00:00
Friedemann Kleint
807f819357 Manual dialogs test: Add about dialog showing style and scaling
Change-Id: I8750956056466d3cfd99903fb5e432ac81223403
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-08 06:57:15 +00:00
Mitch Curtis
4c92fce761 Fix order of mouse selftest in selftests.pri
Put it in alphabetical order like the rest of the list.

Change-Id: I3da3bb68d1847f53419bb79490b946c935ebb518
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-05-07 14:53:26 +00:00
Mitch Curtis
630b06f86c Add self-tests for QTest::keyPress() and QTest::keyRelease()
They didn't exist up until now, and future patches rely on them, so
add them.

Change-Id: I8afdb9417263b45d43355c688a813bdf99ea5fc8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-05-07 14:53:18 +00:00
Oliver Wolff
da97dcec3e tst_qresourceengine: Fix test for static MSVC builds
The test relies on the existence of qt-project.org in resources. It
contains mimetype data and is automatically added. For static builds on
MSVC it is only added if it is actually needed though.

Change-Id: Icd1d74466607196f9b635205f7cb4d9b300ec4b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-07 07:59:15 +00:00
Oliver Wolff
a27f888dec tst_qresourceengine: Fix test for configurations with builtin_testdata
If builtin_testdata is present additional data ends in inside of
resources so that tests can access this data when needed. The addiitonal
data has to be taken into account in the resource engine's test.

Change-Id: I10de6b9612ca49b314d77cfadd5b2360a5d90d53
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-07 07:59:37 +00:00
Oliver Wolff
4dada8068a tst_qiodevice: Skip broken winrt tests
Change-Id: I399cc1aed3ee4151cf6adfd8f8780d8975604d52
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-05-07 07:37:51 +00:00
Qt Forward Merge Bot
ba2b7b8e33 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ib58433da04bffb5dfab5486b80f17f39cc4145fa
2018-05-05 01:00:55 +02:00
Mårten Nordheim
ef242e0b34 OpenSSL 1.1.1: Fix tst_QSslCertificate::toText
The formatting of the output from QSslCertificate::toText has
changed slightly from before, so it no longer matches the test's
data.

From what I can tell we just do a manual sanity check and create
a new file with the new output and then augment the test.

Task-number: QTBUG-67463
Change-Id: I751e5a3f9a28015f97c895cea47384704fd68e38
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-05-04 12:57:47 +00:00
Jüri Valdmann
93e0ff037e QJsonDocument: Validate also zero-length objects
The added test case is the binary JSON equivalent of

    {"a":{"š":null}}

with two modifications. First, the length of the string "š" has been corrupted
to 0xFFFFFF00. Second and more import, the Base::size field of the inner object
has been reset to 0.

On its own the first modification would normally trigger a validation error.
However, due to the second modification the Value::usedStorage for the inner
object evaluates to 0, completely disabling all further validation of the
object's contents.

Attempting to convert this binary JSON into standard JSON will lead to the JSON
writer trying to construct a QString of length 0xFFFFFF00.

Fixed by validating also objects with usedStorage == 0.

Task-number: QTBUG-61969
Change-Id: I5e59383674dec9be89361759572c0d91d4e16e01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-04 12:04:05 +00:00
Jüri Valdmann
3fc5500b4f QJsonDocument: Reject objects containing themselves in binary JSON
The added test case is a binary JSON file describing an array which contains
itself. This file passes validation even though attempting to convert it to
plain JSON leads to an infinite loop. Fixed by rejecting it in validation.

Task-number: QTBUG-61969
Change-Id: Ib4472e9777d09840c30c384b24294e4744b02045
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-04 12:03:57 +00:00
Jüri Valdmann
d3935cbd71 QJsonDocument::fromRawData: Fix out-of-bounds access
This method takes a pointer+size pair, but begins reading through the pointer
without first checking the size parameter. Fixed by checking the size parameter.

A new test case is added with an empty binary json file. Although the test does
not fail under normal conditions, the problem can be detected using valgrind or
AddressSanitizer.

Task-number: QTBUG-61969
Change-Id: Ie91cc9a56dbc3c676472c614d4e633d7721b8481
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-04 11:53:03 +00:00
Frederik Gladhorn
1e9da7b3fd Accessibility: Fix leaking cached interfaces
When the application closes, we should clear the cache to not run into
memory sanitizers claiming that we leak.

Change-Id: Ibf9fcda107be6b7f3ed414d7651080aa1f61a3a5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-05-04 10:56:35 +00:00
Filipe Azevedo
ebd3a13b80 Add a QPalette color role for placeholder texts
This allow to customize easily placeholders in QLineEdit by example.

Change-Id: I2bb379164376e1d88b42d6c86c2e5b8df99fbc56
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-05-04 08:53:06 +00:00
Eskil Abrahamsen Blomfeldt
e28ae083d2 macOS: Fix stretch of condensed fonts with NoFontMerging
When showing a condensed font with AnyStretch, we should
not apply any stretch to the font (and if a stretch is
requested, we should calculate the actual stretch based
on how much the font is already stretched or condensed).

This usually works as expected, however, when using
QFont::NoFontMerging as the style strategy, we would
scale the glyph advances by the stretch of the font
since the calculated stretch of the font engine would
be overwritten by the actual stretch. In the case where
we use font merging, this would be done for the multi
engine, so we would not get the same issue, since the
text engine gets the stretch from the actual font engine
and this still has the original, calculated stretch
set.

Note on the test: We can't use testString() for this,
since it contains a space, and the test font does not
have a glyph for this, so we will end up merging a
different font for the space, giving us a slightly
different advance.

[ChangeLog][QtGui][macOS] Fixed display of condensed fonts
when NoFontMerging is in use.

Task-number: QTBUG-63800
Change-Id: I5b05e0dbfc8ae4b5d10c621ecb0975f53fda9483
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-04 04:46:48 +00:00
Liang Qi
60fefff22f Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
	examples/widgets/graphicsview/elasticnodes/node.cpp
	examples/widgets/graphicsview/elasticnodes/node.h
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_drawing.mm
	src/widgets/kernel/qmacgesturerecognizer_p.h

Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
2018-05-03 14:50:22 +02:00
Gatis Paeglis
2ef83cc12c tests: unblacklist tst_qwindow.cpp::modalWindowPosition()
For details see QTBUG-67757.

Change-Id: I82559cb667a8622f29f7e6a6f24bc2b1e59917d6
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-05-03 07:16:15 +00:00
Eirik Aavitsland
b1e0a71997 Add option to override comparison fuzziness level to lancelot tests
Sometimes useful to force e.g. an exact match.

Change-Id: Ic417a518d91b579c23dea925f747955f11d4143b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-05-03 06:37:16 +00:00
Eirik Aavitsland
c23e3f4822 Add commandline option to lancelot tests for forcing baseline update
Normally done through the webform, but this option is useful for
scripted running of such tests.
Also option to disable such updating alltogether, to allow runs
that will never modify the baseline suite.

Change-Id: I71cc7564453e63bda7ded2b90be01280c9dbb95a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-05-03 06:37:08 +00:00
Friedemann Kleint
6171d647b3 tst_QUdpSocket: Fix Clang warning about unused expression
tst_qudpsocket.cpp(965,9):  warning: expression result unused [-Wunused-value]
    if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData())

Task-number: QTBUG-63512
Change-Id: I51959432c6ff166c188842e34c3033ab1319c079
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-02 15:56:04 +00:00
Andy Shaw
3e001feb4d If the page size is not valid on the new printer, set a custom size
When the page size was not valid on the new printer, it would end up
having the wrong page size name on the new printer. What should happen
in this case is that it should set the originally set page size as a
custom page size on the printer instead.

Task-number: QTBUG-62221
Change-Id: Iaca34ae262f5d0685ca60e4ca4b38229a2283289
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2018-05-02 13:32:09 +00:00
Qt Forward Merge Bot
7de400052f Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
2018-05-02 13:15:15 +02:00
Friedemann Kleint
ae618e0694 Manual touch test: Add handling for multiple touch screens
- Add a display label showing the screen parameters.
- Add a menu option to launch secondary windows and restructure
  the code accordingly

Change-Id: I2bdb76da0b0a00e62db41e674aa93cef9598fe67
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-02 09:36:19 +00:00
Friedemann Kleint
7a1df39010 Tests: Fix clang warnings about unused variables and captures
tst_qline.cpp(170,12):  warning: unused variable 'baseB' [-Wunused-variable]           ^
tst_qline.cpp(169,12):  warning: unused variable 'baseA' [-Wunused-variable]
tst_qheaderview.cpp(3329,14):  warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
    waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });

qheaderview.cpp(3338,14):  warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
    waitFor([this, &header, defaultSectionSize]() { return header.sectionSize(0) == defaultSectionSize; });

Change-Id: I0245a7b66d15b896e864b488f7a58e8513fbdc6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-05-02 09:36:00 +00:00
Jan Arve Saether
c1ead32a84 Fix crash in QMacPanGestureRecognizer
The reason it crashed was this:
1. Button was pressed => _panTimer started with the graphics view as
   destination.
2. Button was released => the graphicsview is destroyed
3. 300 ms later: Qt tries to deliver TimerEvent from _panTimer to the
   graphics view. Unfortunately, the graphics view is deleted, but Qt
   doesn't know that... (*crash*)

We therefore chose to start the timer with a destination we are controlling the
lifetime of: the QMacPanGestureRecognizer. Inside the timerEvent of that we can
check if the actual target is already destroyed.

Task-number: QTBUG-60404
Change-Id: Iff8f5b7217de42c4c5cf551ca507f0cff1c99a78
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-05-02 09:16:22 +00:00
Kari Oikarinen
3761d99512 tst_QTabWidget: Add unconditional qWait() back
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 0cb940b1d3 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>
2018-05-02 09:04:14 +00:00
Gabriel de Dietrich
8b098e6544 tst_QMenuBar: Remove obsolete warning check
This warning was removed when we refactored QCocoaMenuItem::sync().

This change amends 8412009de6.

Task-number: QTBUG-68013
Change-Id: I0d65109dff5f82db530b6bdced96c05692af6b4b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-05-01 17:11:16 +00:00
Daniel Teske
259648f876 QItemSelectionModel: More fixes for is(Column/Row)Selected
Replace the code for isRowSelected and isColumnSelected with
a much simpler algorithm for deciding if a row/column is selected.

In a model with a cross-hatch of unselectable indexes, the return values
of is(Column/Row)Selected would depend on the order in which the
selections were done.

Task-number: QTBUG-18001
Change-Id: I6aa4b1df7c07fae469a686041927fa8c42bc9b16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-04-30 19:01:14 +00:00
Daniel Teske
d6b9cba812 tst_QLineEdit: Use correct keys to move to Start/End of Line
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>
2018-04-30 19:00:34 +00:00
Friedemann Kleint
578c96f0bb Polish the manual touch test
Introduce C++11, nullptr, for, port to Qt 5 connection syntax.

Change-Id: I2d233ccd68bad533af8d4674d91236b2c049e997
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-04-30 11:46:19 +00:00
Mårten Nordheim
51e14787d5 Stop rejecting cookies which have a domain that matches a TLD
... but only if the host it came from is an EXACT match. Also only apply
the cookie if the url is an EXACT match.

[ChangeLog][QtNetwork][QNetworkCookieJar] Cookies will no longer be
rejected when the domain matches a TLD. However (to avoid problems
with TLDs), such cookies are only accepted, or sent, when the host name
matches exactly.

Task-number: QTBUG-52040
Change-Id: Ic2ebd9211c48891beb669032591234b57713c31d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-30 11:18:43 +00:00
Kari Oikarinen
fe670fc0f0 tests: Include qglobal.h in EmulationDetector
Checking for Q_OS_LINUX, Q_PROCESSOR_ARM and use of QT_CONFIG() checks should
only happen after qglobal.h is included. Otherwise the header will be broken if
included before something that uses qglobal.h

Change-Id: I052e46784f7b174e74e8894e1b7c5b7528420f5d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-04-30 06:18:06 +00:00
Kari Oikarinen
b7d810a7cc tst_QFocusEvent: Add qWaitForWindowActive() to checkReason_focusWidget()
checkReason_ActiveWindow() started failing on Windows when run together with
other tests, but still passed on its own.

The offending tests was checkReason_focusWidget(), which showed a window but did
not wait for it to be active.

After adding this wait the whole test executable passes on Windows as well.

Amends fd87c8da82.

Change-Id: I384bc45176fcd7bf6f491a4f39b46464ba45693b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-27 07:16:11 +00:00
Thiago Macieira
ff029a9ca8 tst_QString: remove old HP aCC workaround
Change-Id: I3840d727dee443318644fffd15291b1d77dca2fc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-27 07:07:45 +00:00
Ulf Hermann
e0b5ff4ad5 QWidgetWindow: Immediately forward close events to QWindow
This way the platform window is destroyed in a timely manner, preventing
redundant close events from the window system.

Task-number: QTBUG-43344
Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-27 07:00:13 +00:00
Kari Oikarinen
e69b6d2dbc tst_Gestures: Use QTest::qWaitForWindowExposed()
Instead of a local wrapper for it.

Change-Id: I0708dfad44b3db0c7a13e75ba5b4193ab50ac315
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-27 06:20:48 +00:00
Morten Johan Sørvig
18d2619224 QGraphicsView: Improve high-DPI item caching
Scale cache size by target paint device devicePixelRatio.

Add manual test for the cache modes.

Change-Id: I9f3a2b4c4cf12571aefe54ebf534009a2448fb48
Done-with: MihailNaydenov <garfieldhq@yahoo.com>
Task-number: QTBUG-26795
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-04-26 23:39:46 +00:00
Liang Qi
b3ebe8713b Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-04-26 15:53:08 +00:00
Morten Johan Sørvig
7160df3a15 High-dpi drawTiledPixmap (raster paint engine)
Implement more consistent behavior for drawTiledPixmap(),
which should produce the same visual tiling pattern
independent of display devicePixelRatio

Consider the following pixmaps and draw calls:

  QPixmap px32; // 32x32
  QPixmap px64; // 64x64
  drawTiledPixmap(QRect(0, 0, 128, 128), px32);
  drawTiledPixmap(QRect(0, 0, 128, 128), px64);

On 1x displays this will produce 4x4 and 2x2 tiles,
respectively.

On 2x displays this would previously produce a different
tiling pattern, where the paint engine would tile in
the device pixel coordinate system. Change this to
tile in the device independent coordinate system,
producing the same visual tiling pattern as the 1x case.

It is possible to produce a 4x4 tiling pattern with
high-resolution output from the 64x64 pixmap by setting
the devicePixelRatio:

  QPixmap px64;
  px64.setDevicePixelRatio(2);
  drawTiledPixmap(QRect(0, 0, 128, 128), px64);

This change adds an inverse scale to the image filler
transform that accounts for the pixmap devicePixelRatio.

[ChangeLog][QtGui] QPainter::drawTiledPixmap() now
tiles in the device independent coordinate system.

Change-Id: I4918d274192967f222f181b374571c7c597dcd76
Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: 石博文 <sbw@sbw.so>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-04-26 10:39:25 +00:00
Liang Qi
866b47916d Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
2018-04-26 09:55:10 +02:00
Eirik Aavitsland
bd1fd197ca Fix drawTiledPixmap() and texture-brush painting with high-DPR images
Although QPainter::drawImage()/drawPixmap() would render images scaled
according to their devicePixelRatio(), that would not happen for
drawTiledPixmap() and when using a textured brush. Implemented here,
in combination with the pending "High-dpi drawTiledPixmap (raster
paint engine)" commit.

[ChangeLog][QtGui] Fix drawTiledPixmap() and texture-brush painting with high-DPR images

Task-number: QTBUG-67248
Change-Id: I037e3f897fa708038a0222d3b0c61c7842d87961
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-04-25 13:39:28 +00:00
Gatis Paeglis
d50d35d9db tests: cleanup tst_QComboBox::keyBoardNavigationWithMouse()
- Don't use QCursor when we can position a mouse relative to the
window coordinates via QTest::mouse*() functions. Even the way
QCursor was user here seemed to be hackish. This hack apparently
was there to make the test pass on macOS, I have verified that
the updated test continue working on this platform.

- Remove Q_OS_QNX ifdef, as this test does not depend on QCursor anymore.

- Remove QTest::qWait()-s. Unconditinal waiting should not be used.

- Add better comments.

- Other minor things.

And move tst_QComboBox to use QTEST_QPA_MOUSE_HANDLING code path.
Eventually we want to deprecate the legacy code path.

Change-Id: Ib72f324b5197d0fd66fc32b8c1c7509e58838e04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-25 13:07:23 +00:00
Kari Oikarinen
0cb940b1d3 tests/auto/widgets/widgets: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-25 11:55:34 +00:00
Kari Oikarinen
73031ebb99 tests/auto/widgets/{effects,styles}: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I1af537bae705d4627880c5ae50669b1ef72562f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-25 05:47:01 +00:00