summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Do not assume implicit string-ish → QColor conversionMarc Mutz2022-03-112-2/+2
| | | | | | | | We want to mark the corresponding QColor ctor(s) explicit. Use Qt::GlobalColor or the new QColor::fromString() instead. Change-Id: I68bf75a094e6821b97682de5a0ffd975834d22d0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rewrite tst_qdataurl as a data-driven testMarc Mutz2022-03-111-30/+34
| | | | | | | | | | ... to make adding new test cases simpler. Pick-to: 6.3 6.2 5.15 Change-Id: I54d08cebc7ae4bea9f0397ba3eec1ef6308a5161 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_qflatmap: fix -Wunused-local-typedef (Clang)Marc Mutz2022-03-111-1/+1
| | | | | | | | | | | False Positive, of course, since it's used in dependent callee transparent_impl(). Amends 58e8ae5605abefd0f579586a890dc13fb381b2a3. Pick-to: 6.3 Change-Id: I7520fb7cf6bce28a5fd9381783ba349119309132 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QStyle: Fix cases when logicalValue is outside rangeRobert Löhning2022-03-101-0/+3
| | | | | | Change-Id: I410c40425d6677612dbe3a40cbaa1debba998064 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QSystemSemaphore:CI Insignificant Platforms Monitor Bot2022-03-101-0/+4
| | | | | | | | | | - initialValue on qnx Pick-to: 6.2 Pick-to: 6.3 Task-number: QTBUG-101618 Change-Id: Iea5a45690aa2e1225297c3b652d88864cf5f3ddb Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* QProperty: fix threading issuesFabian Kosmale2022-03-101-0/+86
| | | | | | | | | | | | | | | | | | | | QObject's cache the binding status pointer to avoid TLS lookups. However, when an object is moved to a different thread, we need to update the cached pointer (as the original thread might stop and thus no longer exist, and to correctly allow setting up bindings in the object's thread). Fix this by also storing the binding status in QThreadPrivate and updating the object's binding status when moved. This does only work when the thread is already running, though. If it is not running, we instead treat the QThreadPrivate's status pointer as a pointer to a vector of pending objects. Once the QThread has been started, we check if there are pending objects, and update them at this point. Pick-to: 6.2 6.3 Fixes: QTBUG-101177 Change-Id: I0490bbbdc1a17cb5f85044ad6eb2e1a8c759d4b7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Widgets: use QPlatformTheme::ButtonPressKeys for pressing buttonsNoah Davis2022-03-098-2/+107
| | | | | | | | | QComboBox is included because it works like a button when it is not editable. QGroupBox is included because it has a checkbox and QCheckBox is a subclass of QAbstractButton. Change-Id: Iad89259314e77f78c915dce83ec601df94c88941 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QStyle: Fix overflows and crash when converting slider positionsRobert Löhning2022-03-091-0/+105
| | | | | | | | | Qt Creator crashes when max is INT_MAX and min is -1, see bugreport. Change-Id: I441e76c0ff87052083ed3d77e6085b186402e5d8 Fixes: QTBUG-101581 Pick-to: 6.2 6.3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add an overload of QStringView::count() for QLatin1StringSona Kurazyan2022-03-091-3/+2
| | | | | | | | | | | | Required for the API symmetry between QStringView and QLatin1String. [ChangeLog][QtCore][QStringView] Added an overload of QStringView::count() for QLatin1String. Change-Id: Ic49a4b31e8f6f0969eff0f792654d23a60e06c49 Task-numer: QTBUG-98431 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add QLatin1String::count(needle)Sona Kurazyan2022-03-092-0/+44
| | | | | | | | [ChangeLog][QtCore][QLatin1String] Added QLatin1String::count(needle). Task-number: QTBUG-98433 Change-Id: I31c9fdf14fd81500722ff9f5998eadf0e6cedc5c Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* tst_qflags: test w/and w/o QT_TYPESAFE_FLAGSMarc Mutz2022-03-082-14/+31
| | | | | | | | | | | | Also contains some fixes which fix the Windows build, amending e1b8257deeff67025d75b4b3c27b571b418eefee. Pick-to: 6.3 Fixes: QTBUG-101294 Fixes: QTBUG-101304 Change-Id: I779f50fc705ed32f0314daf28b39b477a7fe925d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qstringapisymmetry: check expected overloads are selectedMarc Mutz2022-03-081-12/+59
| | | | | | | | | | | Check that the expected overloads are selected in QString/QAnyStringView overload sets. Pick-to: 6.3 Change-Id: I38148c20a72eb60cf86844a39fe0ed419d2fa562 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Long live QColor::fromString()!Marc Mutz2022-03-081-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | It is customary for Qt types that can be constructed from string-ish to provide a fromString() named constructor. QColor didn't, relying instead on a set of overloaded implicit and explicit constructors. Add the named constructor, with the intent to deprecate the string-ish QColor constructors after a grace period. To prevent new users from using known-to-become-deprecated API, mark the old functions as \obsolete. Also rename isValidColor() to isValidColorName(). The only reason why these are lumped together in single commit is so that their docs can refer to each other instead of having to temporarily refer to obsolete API. [ChangeLog][QtGui][QColor] Added fromString() and isValidColorName(), both taking QAnyStringView. Task-number: QTBUG-101389 Change-Id: I2857c728257ad2f14c7c968b45547bdf07c44b63 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move cursor out of the way before running testVolker Hilsheimer2022-03-081-1/+5
| | | | | | | | | Without this change, the test fails when run twice in a row. Also, skip the test if we can't move the cursor. Pick-to: 6.3 Change-Id: Ic45c073007d114fbd7825cedef6761c1e410b4af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Un-blacklist test that's always skipped on macOSVolker Hilsheimer2022-03-081-2/+0
| | | | | | Pick-to: 6.3 Change-Id: I045e1923b471f6bb1d482f32924f190a94b21d2a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Blacklist: test cases blacklisted in tst_QTouchEvent:CI Insignificant Platforms Monitor Bot2022-03-071-0/+2
| | | | | | | | | | - multiPointRawEventTranslationOnTouchPad on windows-11 Pick-to: 6.2 Pick-to: 6.3 Task-number: QTBUG-101519 Change-Id: Idbba677893f559ee239739d8c78aa820d974e120 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* qtestmouse.h: compile with QT_TYPESAFE_FLAGSMarc Mutz2022-03-071-0/+44
| | | | | | | | | | | | Also include the comprehensive tests for bool cast compilation which I originally wrote to confirm that the QTEST_ASSERT() change should be™ correct. Pick-to: 6.3 Task-number: QTBUG-101406 Change-Id: I9a2871bfd4be9999b7a720bec775bba7aeffbe24 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add QFileInfo::isAlias() to reflect whether the file is a macOS aliasTor Arne Vestbø2022-03-062-0/+62
| | | | | | Change-Id: I772066d0d8e69893f7c4aee1cd2305d46d5834c4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWeakPointer: befriend other QWeakPointersThiago Macieira2022-03-041-3/+52
| | | | | | | | | | Commit c677b3b8afcdc1d7b57353826cc01f378cd25e99 added move constructors, which introduced the issue. Pick-to: 6.2 6.3 Fixes: QTBUG-100795 Change-Id: I74249c52dc02478ba93cfffd16d2c879b923e352 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add numeric conversion methods to QLatin1StringSona Kurazyan2022-03-051-0/+2
| | | | | | | | | | | [ChangeLog][QtCore][QLatin1String] Added numeric conversion methods. Task-number: QTBUG-98433 Change-Id: I414577ae715debe3d5ba9c6a160859aca790e017 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add tests for an assertion seen on WindowsEdward Welbourne2022-03-041-1/+12
| | | | | | | | | | | QDateTimeEdit's default constructor instantiates the start of 1752-09-14 as its default earliest time; however Friedeman has seen this triggering an assertion. The QDTE tests should be picking that up anyway, but let's overtly test it in QDate's startOfDay testing, too. Change-Id: Ifae87f2695ac3a7993c173a7c21809c87d5daa71 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Android: skip crashing tst_QPlainTextEdit::ensureCursorVisibleOnInitialShowIvan Solovev2022-03-041-0/+3
| | | | | | | | | | The test crashed for some reason, so other testcases are also not executed. Skip the test for now to enable more tests in the CI Task-number: QTBUG-89402 Pick-to: 6.3 6.2 Change-Id: I5ad38645d1b8f86c64da7208c0ae4f66d126c7d9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: unblacklist tst_QPlainTextEdit testsIvan Solovev2022-03-042-16/+3
| | | | | | | | | | | | | Most of the blacklisted tests were already fixed earlier. The tst_QPlainTextEdit::adjustScrollbars() test needed a small fix to show the window non-fullscreen, so that the scrollbar could appear. Task-number: QTBUG-87423 Task-number: QTBUG-89402 Pick-to: 6.3 Change-Id: I849f411a5798053742323fc4db3fe30f2b690a8b Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* tst_qstringapisymmetry: check QString/QAnyStringView overloads ↵Marc Mutz2022-03-041-0/+22
| | | | | | | | | | | | | | | | | | | | w/Q_WEAK_OVERLOAD flipped This overload set may come in handy to cushion some of the concerns regarding replacing QString functions with QAnyStringView ones. Overloading with a Q_WEAK_OVERLOAD QAnyStringView function requires users to jump through hoops in order to avoid the QString overload, but with the Q_WEAK_OVERLOAD roles reversed, the QAnyStringView overload becomes the preferred version, relegating the QString overload to a fall-back to facilitate sharing where it makes sense (e.g. for QObject::setObjectName()). Pick-to: 6.3 Change-Id: Ic65ead505beee627976a306e2d430e800540a600 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix tst_qstringapisymmetry::count* to test all argument combinationsSona Kurazyan2022-03-041-12/+27
| | | | | | | | | | | | | | Use two template parameters for the haystack and needle types, to test all possible combinations of all argument types. Note that the tests for QByteArray::count() are removed: it doesn't make sense to have them in tst_qstringapisymmetry, and we already have the symmetry tests for QByteArray in tst_qbytearrayapisymmetry. Change-Id: I33901fd135eb7433f0d45300a7248aef4d40324a Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix an error in tst_QStringApiSymmetry::count_impl()Sona Kurazyan2022-03-041-1/+1
| | | | | | | | | | | | Don't use the haystack as needle when testing count() for QLatin1String. This wasn't caught earlier, since QLatin1String has no count() yet, and the codepath was never tested. Pick-to: 6.3 6.2 Change-Id: I2764070894ddce047eceaea52456e5a521252dab Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Android: unblacklist tst_toolsupport::offsetsIvan Solovev2022-03-041-3/+0
| | | | | | | | | | | | The test is no longer failing on Android in dev and 6.3, but still failing in 6.2. I think it's fixed by 63a35898f4990963fe91acd565df49111a281fa4 which is integrated into dev and 6.3 Task-number: QTBUG-87396 Pick-to: 6.3 Change-Id: I82e0aac1547f8e43353f0948cd3f91b4b8f9720e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add literal operators for QLatin1String and QLatin1CharSona Kurazyan2022-03-041-0/+45
| | | | | | | | | | | | The operators are declared in the Qt::Literals::StringLiterals namespace, to avoid collisions in the global namespace. [ChangeLog][QtCore][QLatin1String] Added literal operator""_L1 that converts string literals and chars to QLatin1String and QLatin1Char. Fixes: QTBUG-98434 Change-Id: Ia945a6acf4b8d4fbbb5f803264e4d79d7b17a8da Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Associative containers: add a way to obtain a key/value rangeGiuseppe D'Angelo2022-03-041-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our associative containers' iterator's value_type isn't a destructurable type (yielding key/value). This means that something like for (auto [k, v] : map) doesn't even compile -- one can only "directly" iterate on the values. For quite some time we've had QKeyValueIterator to allow key/value iteration, but then one had to resort to a "traditional" for loop: for (auto i = map.keyValueBegin(), e = keyValueEnd(); i!=e; ++i) This can be easily packaged in an adaptor class, which is what this commmit does, thereby offering a C++17-compatible way to obtain key/value iteration over associative containers. Something possibly peculiar is the fact that the range so obtained is a range of pairs of references -- not a range of references to pairs. But that's easily explained by the fact that we have no pairs to build references to; hence, for (auto &[k, v] : map.asKeyValueRange()) doesn't compile (lvalue reference doesn't bind to prvalue pair). Instead, both of these compile: for (auto [k, v] : map.asKeyValueRange()) for (auto &&[k, v] : map.asKeyValueRange()) and in *both* cases one gets references to the keys/values in the map. If the map is non-const, the reference to the value is mutable. Last but not least, implement pinning for rvalue containers. [ChangeLog][QtCore][QMap] Added asKeyValueRange(). [ChangeLog][QtCore][QMultiMap] Added asKeyValueRange(). [ChangeLog][QtCore][QHash] Added asKeyValueRange(). [ChangeLog][QtCore][QMultiHash] Added asKeyValueRange(). Task-number: QTBUG-4615 Change-Id: Ic8506bff38b2f753494b21ab76f52e05c06ffc8b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Network: Use system publicsuffix database copy when availableIevgenii Meshcheriakov2022-03-033-1/+21
| | | | | | | | | | | | | [ChangeLog][Network][QNetworkCookieJar] It is possible to use system's copy of publicsuffix database when it is available. This behavior is enabled by default on Linux and can be controlled using new command line switches -system-publicsuffix, -qt-publicsuffix, -no-publicsuffix, and -publicsuffix=all. Fixes: QTBUG-95889 Change-Id: I911e1a13c1422cdc35851953309fff064e7c5f26 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFlatMap: add remove_ifMarc Mutz2022-03-031-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing API of QFlatMap did not allow efficient removal of elements: - std::remove_if does not apply, because it works by moving elements back in the range onto those that need to be removed, which doesn't work in flat_map's case, because, like for all associative containers, the key in value_type is const. - The node-based erase-loop (over it = cond ? c.erase(it) : std::next(it)) works, but, unlike in traditional associative containers, is quadratic, because flat_map::erase is a linear operation. According to Stepanov's principle of Efficient Computational Basis (Elements of Programming, Section 1.4), we're therefore missing API. Add it. I couldn't make up my mind about the calling convention for the predicate and, despite having authored a merged paper about erase_if, can never remember what the predicate is supposed to take, so be fancy and accept all: (*it), (it.key(), it.value()), (it.key()). This means that unary predicates can either not be generic or must be properly constrained to distinguish between pair<const K, V> and K, but that's not necessarily a bad thing. There's no reason to supply a Qt-ified removeIf on top of the standard name, because this is private API and doubling the names would do nothing except double the testing overhead. Fixes: QTBUG-100983 Change-Id: I12545058958fc5d620baa770f92193c8de8b2d26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_qflags: don't suppress deprecation warningsMarc Mutz2022-03-031-1/+0
| | | | | | | | | | ... if there aren't any. Pick-to: 6.3 Change-Id: I8531e0c1c3ca41d1b1a9d55c9d11782bd63b6f76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add compile-time checks for QLatin1StringSona Kurazyan2022-03-021-0/+60
| | | | | | | | Change-Id: If1b10a857275fb53c5d0b230bf6d11ce3e1ff2ca Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QLatin1String: add missing APIs for compatibility with Qt string viewsSona Kurazyan2022-03-021-23/+23
| | | | | | | | | | | | | | | As a drive-by, fixed misleading wording used in docs. [ChangeLog][QtCore][Potentially Source-Incompatible Changes][QLatin1String] Added QLatin1String(std::nullptr_t) constructor, which makes QLatin1String(0) call ambiguous. To fix the ambiguity, nullptr must be passed instead of 0. Task-number: QTBUG-98433 Change-Id: I2b888aa23469343d78aa640dc39a6028b77165dd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* tests: XFAIL a few in tst_QStaticText on WaylandLiang Qi2022-03-021-0/+23
| | | | | | | Task-number: QTBUG-100982 Pick-to: 6.3 6.2 Change-Id: I18cdb79d9261bac40cc619f9d327d0ef7ed722c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tests: XFAIL tst_QOpenGL::bufferMapRange() on WaylandLiang Qi2022-03-021-0/+2
| | | | | | | Task-number: QTBUG-100918 Pick-to: 6.3 6.2 Change-Id: I1b892a80bcb44e0e4f658ed7073c54900d8a358c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tests: XFAIL tst_QImageReader::setScaledClipRect() SVG/SVGZLiang Qi2022-03-021-0/+2
| | | | | | | | | on Wayland Task-number: QTBUG-100917 Pick-to: 6.3 6.2 Change-Id: I66c42bb0ceca83fd0531159c606d22c58b18b371 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix painting clipping glitches with fractional scalingEirik Aavitsland2022-03-022-8/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QPainter, clipping can only be done on whole pixels. The various ways of specifying a clipping rectangle to the QPainter API have been inconsistent in how fractional rectangles (either specified directly, or as a result of fractional scaling) are mapped (rounded) to integer coordinates. Also, the mappings have not made sure to keep the edge-to-edge property of clip rects under scaling. This is particularly important when scaling QRegions with multiple rects, as QRegion is designed on the assumption that an area can be described as a set of edge-to-edge rects. The fix rounds a clip rect identically with a fill rect. (Indeed, a followup plan would be to merge QRasterPaintEngine's toNormalizedFillRect() with the rectangle rounding function in this commit). Notably, a QRectF clip is now interpreted the same as a QPainterPath clip describing the same area. This modifies d9cc1499954829faf9486fb72056e29f1bad58e3 Task-number: QTBUG-100329 Fixes: QTBUG-95957 Task-number: QTBUG-100343 Pick-to: 6.3 Change-Id: Iaae6464b9b17f8bf3adc69007f6ef8d623bf2c80 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Activate tst_qxmlstream for AndroidAndreas Buhr2022-03-023-11/+42
| | | | | | | | | | | | | | | | | tst_qxmlstream was disabled because it crashed. It does not any more. But it extracted an input zip archive in-place, which is not possible on Android. To resolve this, input files are copied to a temporary directory first. Also, input directories were given to rcc. rcc has a problem with recursive directories. To circumvent this, the file list is created in CMake and then given to rcc. Task-number: QTBUG-87671 Pick-to: 6.2 6.3 Change-Id: I88bb823b9e5c085404e263d4a648d65c9cd6024c Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* CI: Blacklist systemFixedFont for QNXPasi Petäjäjärvi2022-03-021-1/+3
| | | | | | | | | | QNX tests are run under QEMU so have the same problem as b2qt Pick-to: 6.2 6.3 Task-number: QTBUG-100948 Change-Id: I2abc8a4bca9e8ba414197721301d493296e7ce0b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Android: temporary skip tst_QDialog::dialogInGraphicsViewIvan Solovev2022-03-021-0/+4
| | | | | | | | | | | This test crashed and prevents other testcases from execution. The test requires a proper fix, but that's not trivial, so skipping to enable more tests in the CI for now. Task-number: QTBUG-101321 Pick-to: 6.3 6.2 Change-Id: I1bd4b1182cc868a36391a718457eae647675fc17 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Android: skip tst_QDialog::snapToDefaultButtonIvan Solovev2022-03-022-3/+3
| | | | | | | | | | | This test uses the cursor. However we have no cursor support on Android. Skip the test instead of blacklisting it, because that is the correct behavior. Fixes: QTBUG-87389 Pick-to: 6.3 6.2 Change-Id: I1a2d2dd406b3d7da1bc70b51c2072a83d9a29ca5 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* QSettings: support reading UTF-8 keys in INI filesIvan Solovev2022-03-024-0/+62
| | | | | | | | | | | | | | [ChangeLog][QtCore][QSettings] The INI file reader now supports keys encoded with UTF-8, as well as the %-encoded format. Writing the keys back to the INI file is still done using %-encoded format. This change does not touch the way the *values* are handled - they are both read and written in UTF-8. Drive-by: remove misleading comments from the reading algorithm. Task-number: QTBUG-99401 Change-Id: I6a83cbf24d919a499540403688615f93cb195e93 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMetaObjectBuilder: Always set Data::metatypesFabian Kosmale2022-03-021-0/+12
| | | | | | | | | | | The array of metatypes should always contain at least one entry (for the metatype of the current metaobject itself). This prevents crashes in the case of a metaobject without meta-methods and properties (as observed in Qt for Python). Pick-to: 6.2 6.3 Change-Id: I7a6fb316eea48c4852b6f1c26e0a930aeba4c799 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tst_qflags: compile with QT_TYPESAFE_FLAGSMarc Mutz2022-02-281-3/+10
| | | | | | | | | | | | | In constExpr(), where code incorrectly assumed conversions to int or uint were implicit, make them explicit. In classEnum(), don't test bitwise operators between QFlags and int/uint when QT_TYPESAFE_FLAGS is in effect. Pick-to: 6.3 Fixes: QTBUG-101294 Change-Id: If119bf56dd12778f7231a9e76293c76e75354809 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFlags: fix missing bitwise xor operators in QT_TYPESAFE_FLAGS buildsMarc Mutz2022-02-281-0/+23
| | | | | | | | | Add tests that cover them. Pick-to: 6.3 Fixes: QTBUG-101300 Change-Id: I5a8af4a91d796cc4d287b813bd5cc13da3d7e766 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Activate tst_qmenu for AndroidAndreas Buhr2022-02-283-3/+12
| | | | | | | | | | | tst_qmenu was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-87424 Pick-to: 6.2 6.3 Change-Id: I1a3a1d2861b5a8f20d83fd8ba38fdcb3c88faee9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Activate tst_qfiledialog for AndroidAndreas Buhr2022-02-283-1/+27
| | | | | | | | | | | tst_qfiledialog was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-101194 Pick-to: 6.2 6.3 Change-Id: Icfda2cd01677f3a076b74429fcf66a1de79d2aa9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix check for IPV6 support without certain featuresPasi Petäjäjärvi2022-02-282-3/+12
| | | | | | | | | Without features getifaddrs and ipv6ifname we cannot get correct IPV6 information for interfaces. Pick-to: 6.2 6.3 Change-Id: I7f8c4e68d345160d218fde8db640440f3324014e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Android: fix tst_QFrame::testPaintingIvan Solovev2022-02-282-4/+10
| | | | | | | | | | | | | | | | | When we create a QPixmap using QWidget::grab(), a default system image format is used for that. On Android this format is ARGB32_Premultiplied, while on the desktop systems it is RGB32. The images that are saved in the resources and used as references, also have the RGB32 format. As a result, on Android we need to convert the pixmap to a proper format before comparing it to the reference. Fixes: QTBUG-69064 Pick-to: 6.3 6.2 Change-Id: I2d881e508d34e0b1a2a1a7bffcbc71ae2907d31d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>