summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Un-blacklist quitOnLastWindowClosedMulti test on macOS in CIVolker Hilsheimer2021-09-202-13/+11
| | | | | | | | | | | After the recent refactoring in 28b14b966fe8535d7a81914b70759546b694e31b this test should run stable on all platforms. However, the way the test was written made it quite flaky. Simplify it to verify that closing one window doesn't prevent a second timer to fire (which it would if closing the first window already quit the application). Change-Id: I0306792cd7573ebd3418d1aabffe2b78700ec2d9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Eat expected warning messages in QGuiApplication testVolker Hilsheimer2021-09-201-0/+9
| | | | | | | | | Verifies that we get the messages we want, and makes it easier to see relevant debug output. Pick-to: 6.2 Change-Id: Ide92959b120f325badbf200236cdc85f72226e1e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Compile autotests for IntegrityTatiana Borisova2021-09-201-1/+2
| | | | | | | | | - process environment/DNS are OFF for INTEGRITY Task-number: QTBUG-96176 Pick-to: 6.2 Change-Id: I189a97f88c96a428586c31a66b8d250e04482900 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* High-dpi configuration change testingMorten Johan Sørvig2021-09-081-0/+111
| | | | | | | | | | | | Export configuration() and setConfiguration() from the offscreen platform plugin using QPlatformNativeInterface. tst_qighdpi can then resolve and make use of them since it always uses the offscreen platform plugin. Add screenDpiChange() auto test. Change-Id: I459b4df5d94ec4991234a346e3a94618cb3485e9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Test QWindow close() behaviorMorten Johan Sørvig2021-09-021-10/+77
| | | | | | | | | | Verify that closing a QWindow using either the close() API or a close event works as expected, and that the window can be re-created. Also test QWindows with child windows. Task-number: QTBUG-46701 Change-Id: I4c12452ff58e1233536c2d6932e72cf924d8ed74 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* testlib: Deprecate QWARN() in favor of qWarning()Tor Arne Vestbø2021-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The QtTest best practices documentations recommends using output mechanisms such as qDebug() and qWarning() for diagnostic messages, and this is also what most of our own tests do. The QWARN() macro and corresponding internal QTest::qWarn() function was added when QtTest was first implemented, but was likely meant as an internal implementation detail, like its cousin QTestLog::info(), which does not have any corresponding macro. This theory is backed by our own QtTest self-test (tst_silent) describing the output from QWARN() as "an internal testlib warning". The only difference between QWARN() and qWarning(), besides the much richer feature set of the latter, is that qWarning() will not pass on file and line number information in release mode, but QWARN() will. This is an acceptable loss of functionality, considering that the user can override this behavior by defining QT_MESSAGELOGCONTEXT. [ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning() Pick-to: 6.2 Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests: fix deprecated implicit capture of this via [=]Marc Mutz2021-06-301-1/+1
| | | | | | | | Fixes compiler warnings: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated] Change-Id: Ia7cf50f491e92f39162c69afb2a8320afedba056 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* tst_QWindow: fix -Wsuggested-overrideMarc Mutz2021-06-301-1/+1
| | | | | Change-Id: I9e6eb0a4e0a64146d3c733c8cf34530a2cca5c4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deliver WindowActivate/Deactivate events to QWindowVolker Hilsheimer2021-06-111-0/+43
| | | | | | | | | | We need those events to trigger palette color group changes in QQuickItem without having to connect every item to yet another QWindow signal. Task-number: QTBUG-93752 Pick-to: 6.2 Change-Id: I8534808cdaab828e5876f8fda31567aeb1b4272a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove Qt6 switches from QtGuiAllan Sandfeld Jensen2021-05-051-6/+0
| | | | | | | Removing now dead code Change-Id: I021539da6517fdb8443f8ae9431fc172b7910cfc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Test at some Android DPIs in additionMorten Johan Sørvig2021-05-041-4/+9
| | | | | | | | | | | | | Currently, we test at 1x, 2x, and mixed typical desktop DPI values. Add android DPI values, with scale factors in the 2.5 - 3.75 range. This test currently uses 96 as the base DPI (and so does the Android platform plugin), so we normalize the values to use that base DPI. Change-Id: I25b66f5e16d37c01758d5623b805e4141247a74a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove setting of Qt 5 high-dpi attributesMorten Johan Sørvig2021-05-041-10/+0
| | | | | | | This test is for Qt 6 now. Change-Id: I839c2733d505cb4119b1fe3ad85d3c8d94a6c964 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Extend QT_SCREEN_SCALE_FACTORS testMorten Johan Sørvig2021-05-031-14/+39
| | | | | | | | | Test the name=factor format and various incorrect spec strings. We expect that the screen DPI is used if the scale factor specification is incorrect. Change-Id: Ia990e70cf71e370dd2bb4b1047a101dfe9e59cb0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Revert "Add grabber context pointers"Shawn Rutledge2021-04-292-2/+2
| | | | | | | | | | | This reverts commit 40330b8f0a717098982d1f54f34a18a8262b1f55. It was a bad idea to use QFlatMap here, because it is a sorted map, but we need to keep the passive grabbers in the same order as the grabs happened. So need to go back to an earlier version of the patch that uses two parallel QLists. Pick-to: 6.1 Change-Id: I9e6013c2565986fe1eb9fd754f8259766f83bee5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Call updateHighDpiScaling() on screenAdded()Morten Johan Sørvig2021-04-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | QHighDpiScaling has two init/update functions: - initHighDpiScaling(): called once during QGuiApplication construction - updateHighDpiScaling(): called whenever (relevant) screen configuration changes Currently the calls to updateHighDpiScaling() are made from multiple places including platform code. Simplify by calling it from two locations: - QWindowSystemInterface::handleScreenAdded() - QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange() Replace comment about early calls to qt_defaultDpi with a test which calls qt_defaultDpiX/Y with no screens attached. (Looking at the qt_defaultDpiX() implementation, it is unlikely that there will be a problem as long as updateHighDpiScaling() is called before QGuiApplication::primaryScreen() starts returning a non-null value.) Change-Id: I447db42894617495843a5cb531a1322b000fed62 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add grabber context pointersShawn Rutledge2021-04-282-2/+2
| | | | | | | | | | | | | | In Qt Quick we now need to keep track of which QQDeliveryAgent is responsible when a point is grabbed, either passively or exclusively. When we re-deliver to that grabber, we need to do it via the same agent, so that the same scene transform is used, and the grabber will see the event in the correct coordinate system. It's easier to track this mapping here instead of in a separate map in Qt Quick. Pick-to: 6.1 Task-number: QTBUG-92944 Change-Id: I69f769c694d0da24885cdf4087e5032022bff629 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: unblock passing testsAssam Boudjelthia2021-04-271-6/+0
| | | | | | | | | | | | | | | | | | Those tests don't fail anymore and show in CI as BPASS, so we can safely, hopefully, unblock them Task-number: QTBUG-87429 Fixes: QTBUG-68974 Fixes: QTBUG-69166 Fixes: QTBUG-87403 Fixes: QTBUG-87411 Fixes: QTBUG-69083 Fixes: QTBUG-69084 Fixes: QTBUG-87426 Pick-to: 6.1 Change-Id: I831b955116c0f465319b9c5fc726dd98804d1c00 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port away from deprecated QVariant::typeVolker Hilsheimer2021-03-171-3/+3
| | | | | | | | Use QMetaType instead to silence compiler warnings. Pick-to: 6.1 Change-Id: Ic28b3406ddcd51935f42779e7708ea8a459d3a9e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add auto-test for QT_USE_PHYSICAL_DPIMorten Johan Sørvig2021-03-151-0/+27
| | | | | | | | Test that setting QT_USE_PHYSICAL_DPI uses physical DPI instead of logical DPI. Change-Id: I7f89cf1af5e013454cc3d8ec3559f2719514fea3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Auto-test some high-dpi env variablesMorten Johan Sørvig2021-03-151-0/+49
| | | | | | | Add auto-tests for QT_SCALE_FACTOR and QT_SCREEN_SCALE_FACTORS Change-Id: I57bffa266be910f2ba26cb1a870e09ae202fcae0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Skip tst_qwindow test when running on WaylandEskil Abrahamsen Blomfeldt2021-03-151-0/+2
| | | | | | | | | The tst_qwindow test failed with a warning that programmatically moving the mouse cursor is not possible with Wayland. Task-number: QTBUG-91418 Change-Id: I02ceb2af43fbc83a4e6ae09718315f5f79ff8285 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make tst_shortcut pass on WaylandEskil Abrahamsen Blomfeldt2021-03-111-0/+1
| | | | | | | | | | | | | | | There was a race condition in the test, since the window might be exposed before the event to activate the application has been received. And the short cut is not triggered before the application is active, which means it could just be discarded and the window would never be closed. This happened consistently when testing on Wayland. Task-number: QTBUG-91418 Change-Id: I40cb143985175f5f2b5405e9502a48475c93074a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Allow QWindowsPipe{Reader|Writer} to work with foreign event loops, take 2Alex Trotsenko2021-03-021-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a foreign event loop that does not enter an alertable wait state is running (which is also the case when a native dialog window is modal), pipe handlers would freeze temporarily due to their APC callbacks not being invoked. We address this problem by moving the I/O callbacks to the Windows thread pool, and only posting completion events to the main loop from there. That makes the actual I/O completely independent from any main loop, while the signal delivery works also with foreign loops (because Qt event delivery uses Windows messages, which foreign loops typically handle correctly). As a nice side effect, performance (and in particular scalability) is improved. Several other approaches have been tried: 1) Using QWinEventNotifier was about a quarter slower and scaled much worse. Additionally, it also required a rather egregious hack to handle the (pathological) case of a single thread talking to both ends of a QLocalSocket synchronously. 2) Queuing APCs from the thread pool to the main thread and also posting wake-up events to its event loop, and handling I/O on the main thread; this performed roughly like this solution, but scaled half as well, and the separate wake-up path was still deemed hacky. 3) Only posting wake-up events to the main thread from the thread pool, and still handling I/O on the main thread; this still performed comparably to 2), and the pathological case was not handled at all. 4) Using this approach for reads and that of 3) for writes was slightly faster with big amounts of data, but scaled slightly worse, and the diverging implementations were deemed not desirable. Fixes: QTBUG-64443 Change-Id: I66443c3021d6ba98639a214c3e768be97d2cf14b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* High-DPI: Set the minimum scale factor to 1Morten Johan Sørvig2021-03-021-0/+15
| | | | | | | | | | | | | | | Avoid painting errors with dpr < 1, also for the PassThrough mode. This limits the minimum high-dpi scale factor to 1, for the code path which determines the scale factor based on screen DPI. Pick-to: 6.1 Task-number: QTBUG-89948 Change-Id: I14b3f130f0ae141d5f05c87437f926a9f76d1dec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix a few compiler warnings in testsAllan Sandfeld Jensen2021-02-021-2/+2
| | | | | Change-Id: I22f6ac8ed02dd4ef4083ce3c781552623a0b08da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* High-DPI: Test application startup with no screensMorten Johan Sørvig2021-01-221-0/+16
| | | | | | | | | | | | | Initialize the offscreen platform plugin with no screens, create QGuiApplication object. Not much of the high-dpi related Qt API can be used in this configuration, but at least Qt should not crash on startup. Task-number: QTBUG-71034 Change-Id: I6620843c3bd8b692c5c2419b1ba290e16175ba5b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinatesShawn Rutledge2021-01-141-6/+13
| | | | | | | | | | | | | | | | | | | | | QGuiApplicationPrivate::processMouseEvent() sends a QWindowSystemInterfacePrivate::TouchEvent if the mouse event is not accepted and AA_SynthesizeTouchForUnhandledMouseEvents is enabled. A QPA TouchEvent always contains native touch points, which is why it calls QWindowSystemInterfacePrivate::fromNativeTouchPoints to translate the QMouseEvent's device-independent position back to the raw position that it would have had if it came from a real touchscreen. Therefore we must give that function touchpoints that are actually in native coordinates. It may be that some of this transformation could be avoided entirely, but here we prove that the existing way works correctly, by adding coordinate checking to the tst_QWindow::mouseToTouchTranslation() test. Pick-to: 6.0 Task-number: QTBUG-86165 Change-Id: I4c9ca2b11e9eb76d79712c187db3eb9865da581a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Skip tst_qhighdpi when offscreen is not builtMorten Johan Sørvig2021-01-142-4/+3
| | | | | | | | | | | | Android and Wasm do not build the offscreen platform plugin (see src/plugins/platforms/CMakeLists.txt). Skip building the tst_qhighdpi test as well in this case. Remove the BLACKLIST entry. Task-number: QTBUG-88505 Change-Id: I172198c8c24759b14f73ad07260c449fc6ab893f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-126-181/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove irrelevant test row, fix compiler warningVolker Hilsheimer2021-01-081-1/+0
| | | | | | | | | | | | | | With the introduction of QKeyCombination, the result of |'ing together a set of modifiers and a key goes always through the same QKeySequence constructor, no matter the order. The implicit conversion through int when the wrong order is used causes a compiler warning as that conversion is deprecated. So remove that test case. Pick-to: 6.0 Change-Id: I04e27bcd51723ee0efc77e52e45ca3eb8bac5fc7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0740-274/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* tests: unblacklist tst_QWindow::modalWithChildWindow() on openSUSELiang Qi2020-12-231-2/+0
| | | | | | | | This reverts 3d53cf976dc41d136c0508ec05fa757fcf27f71b. Task-number: QTBUG-66851 Change-Id: Ib2b76c539c57fe70ee60426635e6ba59291a1f90 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-2229-30/+43
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Tests: Fix building with qmake on WindowsFriedemann Kleint2020-12-172-2/+2
| | | | | | | | Apparently some library definitions went overboard, link them directly. Pick-to: 6.0 Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-104-22/+2
| | | | | | | | | And fix up some wrong qmake project files Pick-to: 6.0 Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix weight when reading old serialized QFontsEskil Abrahamsen Blomfeldt2020-11-201-1/+1
| | | | | | | | | | | | | | | | | | The QFont::fromString() needs to differ between strings produced before and after Qt 6.0 when interpreting the weight value, since in older strings this will be the legacy scale. Luckily the number of tokens in the string can be used for this purpose, since many tokens were added in Qt 6.0. This broke KDE, where font settings are stored in QSettings and serialized using QFont::toString() from Qt 5. Fixes: QTBUG-88589 Pick-to: 6.0.0 6.0 Change-Id: I199737fed61917f8b9d8f86176ead29a89eb8e0c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Revert "Allow QWindowsPipe{Reader,Writer} to work with foreign event loops"Kai Koehne2020-11-201-41/+0
| | | | | | | | | | | | | | This reverts commit ee122077b09430da54ca09750589b37326a22d85. Reason for revert: This causes QProcess::readAll() to sometimes return nothing after the process has ended. Fixes: QTBUG-88624 Change-Id: I34fa27ae7fb38cc7c3a1e8eb2fdae2a5775584c2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 23100ee61e33680d20f934dcbc96b57e8da29bf9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add tst_QHighDpi::mouseVelocity()Shawn Rutledge2020-11-201-0/+102
| | | | | | | | | | Ensure the values are reasonable regardless of screen DPI. Velocity is supposed to be in logical pixels / second. Task-number: QTBUG-88252 Task-number: QTBUG-88346 Change-Id: Ic209887f8ed0381c033a9ff04ae48b072c444df4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Android: Ensure windows always have a geometry on creationPiotr Mikolajczyk2020-11-171-9/+0
| | | | | | | | | | | | | | | A QWindow created without an explicit geometry needs to pick up a default geometry in the platform plugin. If the window has a maximized of fullscreen window state, it will fill the entire available geometry of the parent window (or the screen if there's not parent window). Fixes: QTBUG-69159 Fixes: QTBUG-69156 Fixes: QTBUG-69154 Pick-to: 5.15 Change-Id: If8565d92a97bb4b3fa44757e68969d54d0bc7ebe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Allow QWindowsPipe{Reader,Writer} to work with foreign event loopsAlex Trotsenko2020-11-171-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a foreign event loop that does not enter an alertable wait state is running (which is also the case when a native dialog window is modal), pipe handlers would freeze temporarily due to their APC callbacks not being invoked. We address this problem by moving the I/O callbacks to the Windows thread pool, and only posting completion events to the main loop from there. That makes the actual I/O completely independent from any main loop, while the signal delivery works also with foreign loops (because Qt event delivery uses Windows messages, which foreign loops typically handle correctly). As a nice side effect, performance (and in particular scalability) is improved. Several other approaches have been tried: 1) Using QWinEventNotifier was about a quarter slower and scaled much worse. Additionally, it also required a rather egregious hack to handle the (pathological) case of a single thread talking to both ends of a QLocalSocket synchronously. 2) Queuing APCs from the thread pool to the main thread and also posting wake-up events to its event loop, and handling I/O on the main thread; this performed roughly like this solution , but scaled half as well, and the separate wake-up path was still deemed hacky. 3) Only posting wake-up events to the main thread from the thread pool, and still handling I/O on the main thread; this still performed comparably to 2), and the pathological case was not handled at all. 4) Using this approach for reads and that of 3) for writes was slightly faster with big amounts of data, but scaled slightly worse, and the diverging implementations were deemed not desirable. Fixes: QTBUG-64443 Change-Id: I1cd87c07db39f3b46a2683ce236d7eb67b5be549 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Android: exclude failing tests of tst_qhighdpiAssam Boudjelthia2020-11-161-0/+3
| | | | | | | | | Tests in tst_qhighdpi are crashing on Android. Task-number: QTBUG-88505 Task-number: QTBUG-87025 Change-Id: Ie1350e06fb30d90f20c550f91555f4023eee56b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stop copying events in testsVolker Hilsheimer2020-11-122-39/+29
| | | | | | | | It's unnecessary, and copying QEvents is a bad practice since it's a polymorphic class. Change-Id: Ieb6de106084f838c5e6c8a0643c54fd3c7f4a7a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests: Blacklist tst_qwindow failing test on WindowsAlexandru Croitor2020-11-071-1/+1
| | | | | | | | | Amends b13bad3ab0de96a3c6fe6dce4b9f35649f2f37d9 Task-number: QTBUG-35109 Task-number: QTBUG-88250 Change-Id: I0b37369bb7cfc58e6968ca20969725e2f4143200 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce QEvent::isSinglePointEvent()Shawn Rutledge2020-11-072-0/+3
| | | | | | | | | | | | This makes high-level event dispatching easier: for example we often need to cast an event to access getters like button() and buttons(). We can so far assume that any QPointerEvent that is not a QTouchEvent is a QSinglePointEvent; but more explicit type-checking looks safer. Implemented in a similar way as c7f727996909338c3689396160f3060480521846. Change-Id: I980d759e2a7538b6b30fd3bdc3be0c351ec6c246 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tests: Blacklist failing tests on MinGWAlexandru Croitor2020-11-061-6/+4
| | | | | | | | | Also move redudant Android entries to already existing sections. Task-number: QTBUG-35109 Task-number: QTBUG-88250 Change-Id: I9d5eaa5a3f11b55566a7c74f84a972a0c272cfea Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Android: blacklist a list of failing tests for androidAssam Boudjelthia2020-11-043-0/+22
| | | | | | | | | | | | | | | | We want to re-enable Android tests in QTQAINFRA-3867. However, many tests are failing already preventing that from happening. QTBUG-87025 is currently keeping track (links) to all of those failing tests. The current proposal is to hide those failing tests, and enable Android test running in COIN for other tests. After, that try to fix them one by one, and at the same time we can make sure no more failing tests go unnoticed. Task-number: QTBUG-87025 Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QEventPoint::normalizedPosition() to replace normalizedPos()Shawn Rutledge2020-11-031-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 4e400369c08db251cd489fec1229398c224d02b4 we deprecated normalizedPos() because we suspect it's a legacy feature that few users will need. However Qt developers keep bringing up the continued usage in autotests over and over. (It's IMO not wrong to keep testing deprecated functions in autotests, but the warning keeps attracting attention.) Of course it will turn out that normalizedPos() has users; we just don't know how many. One way to look at it is: why should they copy a snippet of code to calculate it, when it costs us so little to continue to provide this accessor. It might also turn out that some users will complain that in Qt 5 it was passed through from the device driver (or at least from the window system API) to the application, and perhaps the replacement will not always work, for example if availableVirtualGeometry() ends up wrong, or there is some strange scenario that generates events that are out-of-bounds for the device that the event professes to come from, so that the "normalized" coordinates also go outside the [0..1] range. We reserve the right to put back the storage in QEventPointPrivate if the need arises; so that's why this function is not inline. We continue to hope that startNormalizedPos() and lastNormalizedPos() are used even less and won't be missed much, because it would be wasteful to store them all the time if only a few users need them. Change-Id: I23ed78843e3f9e16133c5b6f462884a3845f91b6 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update tst_qguivariant to use QMetaTypeDavid Skoland2020-10-281-2/+2
| | | | | Change-Id: I4c789ecfc9f4613bd4820a8a6530249c51344a83 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-231-2/+2
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename the QMetaType::MovableType flag to RelocatableTypeLars Knoll2020-10-231-1/+1
| | | | | | | Keep this in sync with the changes we have done in QTypeInfo. Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>