summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused functionality from QTypeInfoLars Knoll2020-06-182-3/+0
| | | | | Change-Id: I10fe4cde7a18047599e656cc3bb67b0dfe18a986 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Begin writing tst_QInputDevice autotestShawn Rutledge2020-06-185-0/+103
| | | | | | | | | ...starting with a new feature: registering different devices at different seats and verifying their capabilities and that we can get them back again. Change-Id: I8e58a49080633753d02a76e5fdc4932f5c674e0a Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Update QTabletEvent device_information manual testShawn Rutledge2020-06-172-30/+20
| | | | | | | | | | | | | | | - stop using deprecated accessors in QTabletEvent and QMouseEvent - position() and globalPosition() provide high resolution so we don't need to display hi-res global pos separately - keep a pointer to the last-seen QPointingDevice instance rather than copying fields out of it; it will only be deleted if the platform plugin does that (usually only at exit or when it's unplugged) - show seat ID - show platform-specific device ID Change-Id: Ic34e1d1256d6956867992db831c2e66bdda7001e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-1617-145/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* rhi manual tests: Prevent warnings with MSVCLaszlo Agocs2020-06-159-15/+15
| | | | | | | | | | | | The QPair changes trigger warnings about size_t vs. quint32. We made offsets and sizes 32-bit in the QRhi API to emphasize that some of the graphics APIs are using 32-bit sizes still. It's a bit unfortunate that pairs now generate warnings when the size does not match. Just cast as needed. Change-Id: I88504eed8be6f4bdb2205b3671e2c2a9db9fcb1e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Relax tst_qvulkan::vulkanVersionRequest to make it compatible with 1.1Laszlo Agocs2020-06-151-2/+9
| | | | | | | | | | | | | | The Vulkan spec changed the behavior for VkApplicationInfo::apiVersion in 1.1, conveniently breaking compatibility with all existing 1.0 logic. We can no longer assume that the 1.0 behavior, which was failing instance creation with VK_ERROR_INCOMPATIBLE_DRIVER for an unsupported version, is always in place. So do not rely on this in the test, and add a reminder in QVulkanInstance docs as well. Fixes: QTBUG-85040 Change-Id: I8f5c7a7830877b72d106c444aebfaea191083ee0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fuzzing: Don't try to load huge valid imagesRobert Loehning2020-06-151-1/+10
| | | | | | | | | They are justified in using huge memory. Pick-to: 5.15 Change-Id: Id16d2ea67cfac0e031d05258173391e222b41097 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Http: Fix POST-to-GET redirects still uploading or transmitting CLMårten Nordheim2020-06-121-1/+73
| | | | | | | | | | | | | | CL = Content-Length The uploadByteDevice was kept after a redirect which caused the internals to assume that we had to upload the data. Even if this was not the case we still transmitted the Content-Length header from the first request which was now stored in two places. Fixes: QTBUG-84162 Pick-to: 5.15 Change-Id: Ic86b1ef0766ffcc50beeed96c1c915b721d40209 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove deprecated methodsLars Knoll2020-06-122-44/+0
| | | | | | | | Those aren't part of Qt 6 anymore. Change-Id: I9ea7de07d89156e8d0fb6ae9deeb24e0de5fa429 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* long_name_onDemandCerts_static - stop testing/using the deprecated APITimur Pocheptsov2020-06-121-25/+0
| | | | | | Pick-to: 5.15 Change-Id: Ia937fc393b2dbc2602a93f2b3a71328a805ec1a6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* long_name_onDemandCerts_member - stop testing/using the deprecated APITimur Pocheptsov2020-06-121-22/+0
| | | | | | Pick-to: 5.15 Change-Id: I3d7ea78627afcd0225e717d243da49fd70b58461 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_qsslcertificate - suppress a deprecation warningTimur Pocheptsov2020-06-121-0/+4
| | | | | | | | | | | In Qt 5 we have to work with the esisting API (QSslCertificate::verify), taking only the peer's chain and the name. We already have a private API to have a CA's list as an additional parameter, the proper fix in Qt6 will also introduce a public complement for this. Pick-to: 5.15 Change-Id: Ib1f75c3056b135c6e6d42f977b5a7034fca658ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rename new slice() method sliced()Marc Mutz2020-06-111-20/+20
| | | | | | | | | | | | | | The recently-added slice() method has the problem that it's a noun as well as a verb in the imperative. Like std::vector::empty, which is both an adjective and a verb in the imperative, this may cause confusion as to what the function does. Using the passive voice form of slice(), sliced(), removes the confusion. While it can be read as an adjective, too, that doesn't change the meaning compared to the verb form. Change-Id: If0aa01acb6cf5dd5eafa8226e3ea7f7a0c9da4f1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of the obsolete isEditable flag for propertiesLars Knoll2020-06-112-12/+0
| | | | | | Change-Id: I54411bd8e223671523c9c8fad5c80bfa6b5b7097 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Cleanups in QMetaPropertyFabian Kosmale2020-06-111-38/+38
| | | | | | | | | This changes the layout of the meta object data, so also bump the meta object revision. Original-patch-by: Lars Knoll <lars.knoll@qt.io> Change-Id: I176fb16c207e8ebe59e358e69554be813406232f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Qt6: remove support for property flags being functionsLars Knoll2020-06-112-17/+0
| | | | | | | | | | | | | | | Property flags should be compile time booleans, not something to be determined at runtime. We've been using this to dynamically disable some properties in QWidget based classes dependent on the state of a different property, but this should better get implemented on top of our widgets. Change-Id: I6296e8761303ecdf24d9e842142e8596304c015d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove most overloads taking a QStringRef from the QString APILars Knoll2020-06-111-8/+0
| | | | | | | | | | Add QStringView overloads where they were missing. This keeps things almost 100% source compatible. Task-number: QTBUG-84319 Change-Id: Ica8ee773b2ce655e9597097786117959e34b236e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix breakage of QPushButton on macOS when a style sheet was setVolker Hilsheimer2020-06-111-0/+41
| | | | | | | | | | | | | | | | | | | | | Amends comment 6e1d70ae12baae4610356ec7b69635ad75a97b4e, which introduced SE_PushButtonBevel so that QPushButton could ignore clicks outside of the button's bevel. In the macOS style, make sure that the framerect we pass to NSButton::alignmentRectForFrame is the rect we receive from QPushButton in the style options. The frame property of the shared NSButton* object might not be initialized. In the style sheet style, handle SE_PushButtonBevel the same ways as Contents and FocusRect, as it is not a separately styleable property. Change-Id: I12eb1b046c864a02b34d276e6352e2e16d44231e Fixes: QTBUG-84852 Fixes: QTBUG-84879 Task-number: QTBUG-81452 Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Also check QStringView(std::nullptr_t) for constexpr'nessMarc Mutz2020-06-111-0/+8
| | | | | | Pick-to: 5.15 Change-Id: I85967caa014fa93d2cd3f26b63e4a85414f6a803 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port QLocale::quoteString from QStringRef to QStringViewLars Knoll2020-06-111-1/+0
| | | | | | | Task-number: QTBUG-84319 Change-Id: I29726ebfda7a5f51a0a6ee29e905b0b904256c8d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QSslSocket - stop using qrand (to suppress a warning)Timur Pocheptsov2020-06-101-7/+6
| | | | | | | | | | | Whoever wrote this test, was a PROPER hacker: trying to force a TLS implementation not to properly compress some data, they generated a sequence of bytes in a very fancy manner, something like 255 0 0 0 255 0 0 0 123 0 0 0 255 0 0 0 - yeah, it's really a random sequence of bytes, surely, it's impossible to compress! Meh. Pick-to: 5.15 Change-Id: Ia10ae18a40b5b8f006c45147b06fe5be6efcb129 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Restore default role names in QStandardItemModel::roleNames()Shawn Rutledge2020-06-101-0/+8
| | | | | | | | | | | | | | Amends 32b586864e3a4398da38c045f4ac0823c3dc3c57, which added an override of QStandardItemModel::roleNames(). It's good for it to have its own QHash so that roles can be added, and because QStandardItemModel::setItemRoleNames() remains un-deprecated; but before that change, they were the roles that QAbstractItemModel had initialized from QAbstractItemModelPrivate::defaultRoleNames(). In particular, we need "display" to map to Qt::DisplayRole by default; several tests in qtdeclarative depend on that. Change-Id: I58b2d6aa6b6c78b1d618335ddc4ecb834af57274 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Long live std::pair!Giuseppe D'Angelo2020-06-1011-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QPair an alias for std::pair, and qMakePair just a forwarder towards std::make_pair. Why? Fundamentally to ditch a bunch of NIH code; gain for free structured bindings, std::tuple and std::reference_wrapper compatibility, and so on. Breakages: * Some that code manually forward declares QPair. We don't care about it (<QContainerFwd> is the proper way). * Some code that overloads on std::pair and QPair. Luckily it's mostly centralized: debug, metatypes, testing macros. Just remove the QPair overload. * Usages of qMakePair forcing the template type parameters. There are a handful of these in qtbase, but only one was actually broken. * std::pair is NOT (and will never likely be) trivially copiable. This is agreed to be a mistake done by practically all implementations in C++11, can can't be fixed without breaking ABI. Some code using QPair assuming it's trivially copiable may break; exactly one occurrence was in qtbase. * QMetaType logic extracts the type names in two different ways, one by looking at the source code string (e.g. extracted by moc) and one via some ad-hoc reflection in C++. We need to make "QPair" (as spelled in the source code) be the same as "std::pair" (gathered via reflection, which will see through the alias) when compared. The way it's already done e.g. for QList is by actually replacing the moc-extracted name with the name of the actual type used in C++; do the same here. On libc++, std::pair is actually in an inline namespace -- i.e. std::__1::pair; the reflection will extract and store "std::__1::pair" so we need an ad-hoc fix to QMetaType. [ChangeLog][QtCore][QPair] QPair is now an alias to std::pair, and does not exist as a class in Qt any more. This may break code such as functions overloaded for both QPair and std::pair. Usually, the overload taking a QPair can be safely discarded, leaving only the one taking a std::pair. QPair API has not changed, and qMakePair is still available for compatibility (although new code is encouraged to use std::pair and std::make_pair directly instead). Change-Id: I7725c751bf23946cde577b1406e86a336c0a3dcf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_QSslSocket - do not test the deprecated APITimur Pocheptsov2020-06-101-108/+2
| | | | | | | | | | We deprecated several setters on QSslSocket, no need to test them then (and I'm removing them in Qt 6 anyway, so changing the test is the phase 1). Pick-to: 5.15 Change-Id: I5807abfb280cbacd4fcc19468793f9d1f3b2ff20 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove the openglextensions moduleEirik Aavitsland2020-06-104-67/+0
| | | | | | | | | | | | | [ChangeLog][General] The QtOpenglExtensions module has been discontinued. It provided only convenience functionality for certain direct OpenGL usage. With the new RHI graphics API abstraction, that is no longer a primary use case. Applications that still need to access that API have a number of alternative options, including QOpenGLExtraFunctions. Fixes: QTBUG-84085 Change-Id: I272af61c69ebcec207b576d67d08b59623d485ec Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Ensure left/right/mid behave in a compatible wayLars Knoll2020-06-091-24/+100
| | | | | | | | | | | | | | | | | | | | QString and QStringRef did bounds checking for left/right/mid, whereas QStringView was asserting on out of bounds. Relax the behavior for QStringView and do bounds checking on pos/n as well. This removes a source of potentially hidden errors when porting from QStringRef (or QString) to QStringView. Unfortunately, one difference remains, where QByteArray::left/right() behaves differently (and somewhat more sane) than QString and QStringRef. We're keeping the difference here, as it has been around for many years. Mark left/right/mid as obsolete and to be replaced with the new first/last/slice methods. Change-Id: I18c203799ba78c928a4610a6038089f27696c22e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add QPromise implementationAndrei Golubev2020-06-095-1/+596
| | | | | | | | | | | | | | | | | | | | | | QPromise and QFuture created from it share the same internal state (namely, QFutureInterface object). QPromise provides high-level management of the shared resource, ensuring thread-safe behavior on construction and destruction (also taking into account QFuture::waitForFinished() semantics). QFuture acts as a primary controller of QPromise via action initiating methods such as suspend() or cancel(). QPromise is equipped with methods to check the status, but the actual handling of QFuture action "requests" is user-defined. [ChangeLog][QtCore][QPromise] Added QPromise class to accompany QFuture. It allows one to communicate computation results and progress to the QFuture via a shared state. Task-number: QTBUG-81586 Change-Id: Ibab9681d35fe63754bf394ad0e7923e2683e2457 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* metatype: Do not try analyze T in Q*Pointer<T> if T is incompleteFabian Kosmale2020-06-094-0/+67
| | | | | Change-Id: I41737ce470f6d2b071ad5e85f8cad1da3869241c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fix failing plugin tests on MinGWAlexandru Croitor2020-06-093-0/+19
| | | | | | | | | | | MinGW plugins should not have the lib prefix in the shared library names. Do this manually for a couple of libraries, and also for the generic qt_add_cmake_library function. Amends 9b0e23ef8a915a8c58808fa356f771ecdb6f020c Change-Id: I1cfaf8fc046f86edd3e755adfa599aa0aa854ee3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Phase 2 of removing QDesktopWidgetVolker Hilsheimer2020-06-0823-272/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove QDestopWidget public header, simplify the implementation that maintains a Qt::Desktop type QWidget for each QScreen, and turn QWidget's initial target screen into a QScreen pointer. QApplication::desktop() now takes an optional QScreen pointer, and returns a QWidget pointer, so that applications and widgets can get access to the root widget for a specific screen without having to resort to private APIs. QDesktopWidgetPrivate implementations to look up a screen for an index, widget, or point are now all inline functions that thinly wrap QGuiApplication::screens/screenAt calls. We should consider adding those as convenience APIs to QScreen instead. Note that QWidget::screen is assumed to return a valid pointer; there is code that handles the case that it returns nullptr (but also code that trusts that it never is nullptr), so this needs to be defined, verified with tests, and asserted. We can then simplify the code further. Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-086-211/+211
| | | | | | | Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove deprecated text-related enumsEskil Abrahamsen Blomfeldt2020-06-082-13/+6
| | | | | | | | Fixes: QTBUG-82367 Change-Id: Iff2645759657f8e350754e90e791dbd583017671 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Win: Choose a suitable font in tst_QTextLayout::textWidthVsWIdthEskil Abrahamsen Blomfeldt2020-06-081-0/+3
| | | | | | | | | | | | | | | | | The default font on Windows 10 (Segoe UI) will return the wrong minimum right bearing at some sizes, which will cause us to skip the textWidthVsWIdth() test at some scale factors, since we cannot trust the layout to be perfect in this case. Based on experiment, Arial is more accurate, so in order to avoid skipping the test, we default to this on Windows instead. (Note: The problem has not been observed with the default fonts on Linux or macOS, so we only do this for Windows specifically.) Task-number: QTBUG-84415 Pick-to: 5.15 Change-Id: I8cdb5d0d9922915a6ed1574d62a561dda0e1dc5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement first/last/from and slice() for string-like classesLars Knoll2020-06-081-47/+196
| | | | | | | | | | | | These methods are scheduled as a replacement for left/right/mid() in Qt 6 with a consistent, narrow contract that does not allow out of bounds indices, and therefore does permit faster implementations. Change-Id: Iabf22e8d4f3fef3c5e69a17f103e6cddebe420b1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move some flaky text tests into LancelotEskil Abrahamsen Blomfeldt2020-06-087-245/+287
| | | | | | | | | | | | | | | | | | | | | There are some slight differences between normal drawText() and QGlyphRuns/QStaticText for decoration widths in certain fonts. We decided to accept this and tried working around it in the test by using ForceIntegerMetrics (since the difference is < 0.5 pixel). This enum has been deprecated, so we move the tests into Lancelot instead, since the idea here is to test for regressions, not to compare the two painter commands. Note that there is something off about decorations with drawGlyphRuns() and drawStaticText() which is exposed (not caused) by this, perhaps related to using a matrix for positioning, since that was untested before. This also takes the liberty of moving the emoji test string from text.qps, since this was not in the statictext.qps yet. Change-Id: Ib2d697095cbd11829cdd50b3c0268c85e9607c78 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove winrtOliver Wolff2020-06-06242-1442/+505
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QVariant: remove UB and fix semantics in a testGiuseppe D'Angelo2020-06-061-4/+4
| | | | | | | | | | | The code was reading from uninitialized memory when creating a variant. Fixing that reveals that the test semantics are broken: when dealing with datatypes without a registered operator==, QVariant resorts to memcmp, so the two objects would've actually compared equal. Amend that. Change-Id: I36bad7ee6a45154d5d534b7dd8b618cc0a900126 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString/View: add tokenize() member functionsMarc Mutz2020-06-063-1/+190
| | | | | | | | | [ChangeLog][QtCore][QString, QStringView, QLatin1String] Added tokenize(). Change-Id: I5fbeab0ac1809ff2974e565129b61a6bdfb398bc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QThreadPool::cancel()Allan Sandfeld Jensen2020-06-051-77/+0
| | | | | | | Deprecated in 5.9 Change-Id: Ib6e2a5da1e7ee2664fb6fa496bdc880fab870901 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix compilation of lance toolEskil Abrahamsen Blomfeldt2020-06-051-1/+1
| | | | | | | | | The QLayout::setMargin(x) call has been deprecated since Qt 5.13. It was an alias for setContentsMargins(x, x, x, x) so we just replace it with that. Change-Id: I1c89eebfe776e0e3c8d0bdc19244bd452db4ef3c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Rework testing of qstr*cmp() functionsEdward Welbourne2020-06-051-79/+81
| | | | | | | | | | | | | | | Previously only qstr*icmp() were tested and the test data was sent via QString and {en,de}coding. Use a local data-type to package pointers to actual string literals for passing to these functions that take them. Fold the various tests involving null pointers and empty strings into the general testing, removing from "singularity" tests, and combine the remainders of those tests into a single test of singular cases for QByteArray::ompare. Move all these tests to alongside the existing tests for QByteArray::compare. Use nullptr rather than 0 as the null string. Change-Id: Ie6d01e839c330c2f960af4bcc95e5633539337d6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "Disable tests with qemu-arm & developer-build configurations in the CI"Liang Qi2020-06-054-4/+9
| | | | | | | | | | | We don't want to have untested qtbase. This reverts commit 3598ffcc26dbae14d88c32fabfc8be465eed8f61. This change also skips two network tests on b2qt. Change-Id: I5c6f5e19487775f0a1c0feafa5e085208cbf7e9a Reviewed-by: Liang Qi <liang.qi@qt.io>
* Reuse the non blocking implementation for blocking oneJarek Kobus2020-06-052-69/+55
| | | | | | | | | | | | | | | | | Replace the implementation of blockingMappedReduced(): after calling non-blocking version of mappedReduced() we are getting the future object, so we may call in sequence result(), which will block and return the result when the all tasks are done. The same is done with blockigMapped(), which calls blockingMappedReduced() with a custom reduce function. Looks like with this pattern we can reuse the non-blocking version for implementing blocking version of mapped / filtered methods. Task-number: QTBUG-83918 Change-Id: I7f240cfbd04834d551ff79d717b72194a26996d7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Port qmake from QStringRef to QStringViewLars Knoll2020-06-052-5/+2
| | | | | | Change-Id: Ie07a976cd3c634e04c8b9b1e0a6cacd4c2d94939 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Fix tst_qclipboard test on macOSAlexandru Croitor2020-06-044-14/+8
| | | | | | | The helper processes were not in the correct location. Change-Id: I0a80a22a931625ea0c9370db38ff29c881b964cb Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix tst_quuid to pass on macOSAlexandru Croitor2020-06-042-1/+17
| | | | | | | | The helper executable needs to be a bundle, because that's what the test expects. Change-Id: I7c3f72f12b7a744478b4832685d032abfc679e5b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Regenerate tests/auto/other projectAlexandru Croitor2020-06-042-2/+51
| | | | | Change-Id: I0dbcef3c918b9502528bf2fe0907a7582dcde0ea Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: disable macnativeevents testsAlexandru Croitor2020-06-041-1/+1
| | | | | | | | | It's disabled in qmake too, due to being almost all blacklisted and flaky. Plus locally when i tested, i had to give accessibility permissions manually, otherwise it failed. Change-Id: I55ce7a81c46ac28f41c43f5c159fecc22d489966 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix tst_qregexp testAlexandru Croitor2020-06-041-1/+15
| | | | | | | It was missing the resource files. Change-Id: Iaa97922eaedc8ba55ef4e568a6abfcffd19509fa Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* tst_qobject: fix build when exceptions are disabledFabian Kosmale2020-06-041-0/+2
| | | | | Change-Id: Id98d39b4cc14608661a53df7e5c5bba5fb875022 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>