summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* QColor: port string-parsing from out parameters to optional<>Marc Mutz2022-03-083-44/+37
| | | | | | | | | Makes for easier reading of code, and allows qt_get_hex_rgb(), which is called from different TUs, to be marked as PURE. Change-Id: Ie7d4e5a164ca1daf521e18ff47f17885bc1443c1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QColor: remove setColorFromString()Marc Mutz2022-03-082-31/+9
| | | | | | | | | | | | | | | | This private method doubled as the implementation of both fromString() and isValidColorName(). By reformulating isValidColorName() as fromString().isValid(), we can then turn setColorFromString() into fromString(), by returning the data, instead of setting it on *this through use of exported functions. Since we need to touch the if's anyway, to remove braces, use C++17 if-with-initializer to turn the second if into an else-of, saving one return {}. Change-Id: If3f8182a40c0c6d6ad514431b5870e69d0e95769 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Long live QColor::fromString()!Marc Mutz2022-03-083-31/+109
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pro2cmake: Introduce qmake2cmake convenience scriptsJoerg Bornemann2022-03-083-53/+111
| | | | | | | | | | | Add qmake2cmake[.bat] wrapper scripts that can be used to convert user projects to CMake. For now, user projects are internally handled as Qt examples with one difference: the generation of example-specific installation code is suppressed. Fixes: QTBUG-98655 Change-Id: I1a57f6d12efe0bdf383592ab33682a611692db80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Handle QT_(MAJOR_|MINOR_|PATCH_)VERSION conditionsJoerg Bornemann2022-03-083-0/+38
| | | | | | Task-number: QTBUG-98852 Change-Id: I4c86fff7bbcc6c42cd04094f2409c3d04779597c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Remove INSTALL_LOCATION from qt_add_qml_module callsJoerg Bornemann2022-03-081-1/+1
| | | | | | | This function does not handle installation. Change-Id: I02fdc244f49b5935aa1ac51bff8a25970ad3a335 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Generate find_package call for Qt5/Qt6 for examplesJoerg Bornemann2022-03-082-5/+19
| | | | | | | | This makes the QT_VERSION_(MAJOR|MINOR|PATH) variables available. Task-number: QTBUG-98852 Change-Id: I7e40f2a7ac09975ce21e45cda384af928e1fa629 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Handle optional Qt modulesJoerg Bornemann2022-03-084-7/+54
| | | | | | | | | ...and write a separate find_package(Qt6 OPTIONAL_COMPONENTS Foo Bar) call for those. Task-number: QTBUG-96799 Change-Id: I3386487774c386edde6767dca92ce433bfed906e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Add a blackbox test for converting from qmake to CMakeJoerg Bornemann2022-03-082-0/+76
| | | | | | | | | If you can set the environment variable DEBUG_PRO2CMAKE_TEST_CONVERSION to 1, the output of pro2cmake is written to the temp directory. This helps analysing test failures. Change-Id: Ida42c5b76a67172d00ce0d2488adc7fb376c6b11 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Enable AUTOUIC only if the project has FORMSJoerg Bornemann2022-03-081-1/+5
| | | | | Change-Id: I1bf232fa3c389eb86707d3af04de6cf9eb09451a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Write only one find_package call for Qt packagesJoerg Bornemann2022-03-082-3/+21
| | | | | | Task-number: QTBUG-96799 Change-Id: I1eb8ac05f360b74e5ae1217b5535a33227b5084b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Add LibraryMapping.componentsJoerg Bornemann2022-03-081-248/+188
| | | | | | | | | | | | LibraryMapping.components is a list that holds the sub-components of a CMake package. Before, we held this information in LibraryMapping.extra as find_package argument. A subsequent patch will make use of LibraryMapping.components and doesn't have to do find_package argument parsing. Change-Id: Ie0d317245fb6ec1511e06b2e14c364292fced63a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Make generated examples use qt_add_qml_module()Joerg Bornemann2022-03-081-197/+342
| | | | | | | | | | | | | | | | We prefer it when the CMakeLists.txt project files for examples use qt_add_qml_module() when adding resource files, rather than qt6_add_resource(). A bit of refactoring was needed to re-use the code that extracts resource information from the .pro file. The new function write_qml_module is now responsible for writing qt_add_qml_module calls. Task-number: QTBUG-96799 Change-Id: I74dc2d681dcf4fc848e1147b3232ce9a9e0946c9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* 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>
* QPublicSuffixDatabase: don't go thru QString for debug outputMarc Mutz2022-03-071-1/+1
| | | | | | | | | | | | | The data is guaranteed to be in US-ASCII (result of toHex()), so there's no need to jump through ASCII → UTF-16 → UTF-8 hoops. Found by Clang and QT_ASCII_CAST_WARN. Amends 16b614f2e1ae4ed145f57b256fb27c04ee07e506. Change-Id: Ib6789af9fb90952ecbe805e182b0639e1d0704b1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* eglfs: QNX uses own QPA plugin and not eglfsPasi Petäjäjärvi2022-03-073-15/+1
| | | | | | | | | | | | | | | | Remove compilation workarounds to get rid of warnings as those QPA plugins are not supported by QNX. warning: cast from 'void*' to 'EGLNativeDisplayType' {aka 'int'} loses precision [-fpermissive] warning: invalid conversion from 'EGLNativeDisplayType' {aka 'int'} to 'void*' [-fpermissive] Pick-to: 6.2 6.3 Task-number: QTBUG-101382 Change-Id: I515708a8869498eb91df4fcba85a7b751d13a25c Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* qtestmouse.h: compile with QT_TYPESAFE_FLAGSMarc Mutz2022-03-072-4/+48
| | | | | | | | | | | | 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>
* Win: Fix use of deprecated isTopLevel()Mårten Nordheim2022-03-071-1/+1
| | | | | | | By using the suggested isWindow() Change-Id: Ic9eb8f3e422a966f1ecbc0ba3d852bdf95928778 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Re-add missing 'we mean it' headerKai Köhne2022-03-072-0/+21
| | | | | | | | | This got lost in commit b852584556bec3750bad7fac984b6fc5af4c870f . Also augment util/x86simdgen/header so that the header is automatically included when qsimd_x86_p.h is re-generated. Change-Id: I3e59b983f78b8c1aced3757e1aa5dceb6d653d97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Miscellanea fixes for QT_TYPESAFE_FLAGS in our headersGiuseppe D'Angelo2022-03-078-33/+33
| | | | | | | | | | | | | | | | | | | | | In preparation for adding it to headersclean. Some remarks: * QStandardItemModel builds just fine (QFlags has comparison operators against literal zero); the warning we however get is about 0 converted to a null pointer constant. There's nothing we can do about that one (even <compare> gives such a warning). * Several code was depending on flags->int conversions. Add toInt(), but also cast again to the expected type to avoid warnings in case toInt() returns unsigned int. * Ported to explicit casts to bool rather than test(Any)Flag to minimize confusion for people unfamiliar with the test*Flag methods. Change-Id: I5be280ac33a0b38e2680096f0e79129fd55ba241 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add QFileInfo::isAlias() to reflect whether the file is a macOS aliasTor Arne Vestbø2022-03-064-2/+88
| | | | | | Change-Id: I772066d0d8e69893f7c4aee1cd2305d46d5834c4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Distinguish macOS aliases from normal symbolic linksTor Arne Vestbø2022-03-061-2/+7
| | | | | | | | | | | | | | | | | The deprecated Carbon function FSIsAliasFile() returned isAlias only for actual aliases, whereas the replacement CFURLCopyResourcePropertyForKey with kCFURLIsAliasFileKey returns true for both aliases and symbolic links. Since we didn't explicitly check for AliasType in any of our internal code, or or any of the public API, the distinction did not cause any issues, but if we want to expose QFileInfo::isAlias() we need to fix this. Pick-to: 6.2 6.3 5.15 Change-Id: I29f795d55fe40898de319aa1cb0a4a1b5646bbd6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Workaround QCC not handling error suppression macro correctlyPasi Petäjäjärvi2022-03-051-0/+6
| | | | | | | | | | | | | | | Fixes also similar warnings from other Qt modules: warning: offsetof within non-standard-layout type is conditionally-supported [-Winvalid-offsetof] Pick-to: 6.2 6.3 Fixes: QTBUG-101411 Fixes: QTBUG-101381 Fixes: QTBUG-101415 Task-number: QTBUG-101384 Task-number: QTBUG-101382 Change-Id: I23158c6ef90c7b4aeeaeeced32214a31acf8f6b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document use of android:allowNativeHeapPointerTagging in the manifestAssam Boudjelthia2022-03-052-0/+11
| | | | | | | | | | | Document the tag for more clarity on why it's needed, and for what platforms. Pick-to: 6.2 6.3 Task-number: QTBUG-97009 Task-number: QTBUG-91150 Change-Id: Ie4522fb582583be07270d3cdbf83992897b51669 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* wasm: fix network reply error finished() signalingLorn Potter2022-03-051-0/+1
| | | | | | | | | | The network reply needs to send the finished() signal after any error. Change-Id: Iafc42d26f91241293042b72201eef2e88613e468 Fixes: QTBUG-101286 Pick-to: 6.3 6.2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix native keyboard on iOSLorn Potter2022-03-053-5/+11
| | | | | | | | | Apple added iPhonePlatform to navigator properties and so use that Fixes: QTBUG-101441 Change-Id: I5a0f27fc18dfa224b6373c5d809cf884d51c880a Pick-to: 6.3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QWeakPointer: befriend other QWeakPointersThiago Macieira2022-03-042-4/+54
| | | | | | | | | | 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>
* QAbstractSocket: remove note about WinRTMårten Nordheim2022-03-051-3/+0
| | | | | | | | It's no longer supported Pick-to: 6.3 6.2 Change-Id: I751ed0904f17e11c65bd60b55e11db9066d01ab2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add numeric conversion methods to QLatin1StringSona Kurazyan2022-03-053-0/+89
| | | | | | | | | | | [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>
* QIOSFileDialog/QIOSDocumentPickerController - handle dismissed view controllerTimur Pocheptsov2022-03-052-1/+18
| | | | | | | | | | | | | | | | | | When we use a native view controller for selecting documents, we have two methods to implement from UIDocumentPickerDelegate (a file was selected or the selection was cancelled). Unfortunately, swiping a view away was not handled, so neither 'accept' nor 'reject' was called. Depending on the classes using QIOSFileDialog, this may leave them in some incorrect state, not knowing that they are 'closed' anyway. As suggested by Tor Arne, the solution is to implement UIAdaptivePresentationControllerDelegate's method, namely -presentationControllerDidDismiss:, which never gets called if the controller was dismissed programatically (the case of accept/reject). Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-93505 Change-Id: I28404aa280465ef8eb0f5c26c8c2e4e4a6c66641 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QErrorMessage: fix deprecated warning about standardIconMårten Nordheim2022-03-051-1/+1
| | | | | Change-Id: Idf50c1b74fddfccded2003528181f81a7a0ca8ac Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QMessageBox: fix deprecated warning about using old ctorMårten Nordheim2022-03-051-1/+1
| | | | | Change-Id: Ib53962e3527e2703af5ff36ce2fd4bd5ea987d85 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPrintDialog/win: Fix use of deprecated QMessageBox::warningMårten Nordheim2022-03-051-3/+3
| | | | | | | | by using the new one Pick-to: 6.3 6.2 Change-Id: I8779107079c4e3d4b1d48c05b6fbfef1b6e98b99 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlTableModel: suppress deprecation warningMårten Nordheim2022-03-051-1/+1
| | | | | | | | It's just a proxy-setter so we cannot really avoid the call Pick-to: 6.3 6.2 Change-Id: I4230075a906c100ddb9722160859e7a2c8e26ebc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix QWindow::mapTo|FromGlobal() for the embedded caseSergio Martins2022-03-041-2/+2
| | | | | | | | | | | | | The code didn't make much sense: - QHighDpi::fromNativeLocalPosition should not take global positions - QPlatformWindow::mapFromGlobal() should not take local positions Tested with a basic MFC window that has a QMainWindow as child (parented with QWinWidget from QtWinMigrate). Menus would be off when on a secondary screen with dpi factor > 1 Change-Id: Ib5cbf5d29ed97c786f7f7ba4e868b70cb5435239 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Android: terminate argv passed to main() with nullptrAssam Boudjelthia2022-03-051-4/+6
| | | | | | | | | | | | the char array of argv passed to the app's main() function need to be null terminated [*] and argv to be **char. [*] http://eel.is/c++draft/basic.start.main#2 Fixes: QTBUG-101028 Pick-to: 6.2 6.3 5.15 Change-Id: I6e3a685f092a92a94f60d166357b75d2538af74c Reviewed-by: Ville Voutilainen <ville.voutilainen@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>
* Correct handling of {next,previous}Transition before FIRST_DST_YEAREdward Welbourne2022-03-041-13/+61
| | | | | | | | | | | | | | | | | | | | | | | | A recent change introduced a cut-off in believing MS's claims that a zone has always had a yearly cycle of DST, to stop believing it before 1900, as no actual zone adopted DST that early. However, this was only applied to the data() method to get the data for a specified time; failure to do the same for {next,previous}Transition lead to inconsistent results and tripped up an assertion. The change to data() also failed to consider the situation of a southern hemisphere zone, for which the rule will claim the early part of the year was in DST; and init() should also mark an initial DST-recurrence rule as starting no earlier than 1900. Add corresponding FIRST_DST_YEAR checks to {next,previous}Transition() to be consistent with the one in data(), refine data()'s checking and amend init(). This amends commit 9a83706046406f233ea6f93a2f90fd5b05916ee9 Pick-to: 6.3 Fixes: QTBUG-100873 Change-Id: Ic9822b87caa01561bc0b7d0355963e4c80ef047c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix inverted condition on year starting in DSTEdward Welbourne2022-03-041-3/+6
| | | | | | | | | | | | | | The first transition in a year with DST is *to* DST precisely if the year *doesn't* start in DST, not if it does. Also fix the startsInDst() check it's using there, which neglected the possibility that the year's DST transition might be faked. This amends commit d98b43005eed051a77beacb252c7a9eb7f5c4493 Pick-to: 6.3 Change-Id: I17422fa9972f826b5bf7e325f5e579f41300fd97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve handling of newYearOffset in qtimezoneprivate_win.cppEdward Welbourne2022-03-041-9/+20
| | | | | | | | | | | | | | | | | | | In nextTransition() it wasn't being carried over from one rule to the next, as intended. It needs to be defined at function level, set for the first rule and updated for each new year tried. Also assert that it does faithfully reflect the standard time in rules without transitions. In the process of fixing that, since it's computed from the yearEndOffset() of a prior year, test whether that year is less than the rule start rather than whether the present year is less than or equal to it. As the prior year is immediately before the present year, this makes no difference, but it clarifies the reasoning. Apply this clarification also in data() and previousTransition() for consistency. Pick-to: 6.3 Change-Id: I29c41e67784eaae13b83f6ae1ad16509e636c187 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Consistently treat times before first rule as in its standard timeEdward Welbourne2022-03-041-38/+38
| | | | | | | | | | | | | | | | In QWinTimeZonePrivate::previousTransition(), an initial no-transition first rule was interpreted as implying a transition to its standard time at "the start of time". Do the same for times before the start of the first rule even if it is a DST recurrence; and, in data(), treat times before the first rule as being in its standard time. In the process, restructure data() to do that early return first, instead of in an else clause, so as to dedent the other branch of its code and make clearer how it fits into its outer loop. Pick-to: 6.3 Change-Id: I21482d904c33542bf04f6510b974c01817d7aa5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix handling of out-of-range years in QTZP_winEdward Welbourne2022-03-041-9/+8
| | | | | | | | | | | | | | A transition outside the range of qint64 would be mapped to invalidMSecs(), the same as the fake-detection sets a fake transition to. This would have lead to a year at the boundary of qint64's range being mistaken for a fake-DST year. So replace the fakesDst() method, that compared transition times to invalidMSecs(), with an actual boolean member that gets set when detecting fake DST, so that the detection is correctly done. Pick-to: 6.3 Change-Id: Iadc80973bc033915733c4a4f4ccfdd3863025fb4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct fake-DST detection and handling in QTZP_winEdward Welbourne2022-03-041-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | The end-of-year checks previously presumed they would accompany a zero daylight-savings change there; however, this misunderstands what a fake transition is doing. A fake at the end of the year means that the transition during the year is out of the time the fake claims it goes into, so the offset nominally in effect after the fake should match the offset the year started in, the same as for a year-start fake. However, implementing that exposed the fact that Bangladesh's brief flirtation with DST in 2009 ended at the end of the year, and MS's data has no other instance (aside from entirely bogusly claiming that Bhutan did the same in 2009) of an end-of-year transition, in particular no fake transitions. So the end-of-year case for faking does not arise and I've eliminated it from the code here. This greatly simplifies the code to detect fake DST rules. At the same time, in the ruleToData() wrapper, use the transition implied by isDst only if it isn't the fake one; the other is the only real transition in the year anyway, however described. Also, extract the detection of start-of-year transition times to a function and make it more exact. Pick-to: 6.3 Change-Id: Ide160d28e7cca37c224f40164ebe7f9a17f028e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clip dataForLocalTime()'s bracketing window's start to minMSecs() + 1Edward Welbourne2022-03-041-5/+9
| | | | | | | | | | | | | The minMSecs() itself is one more than the type's min(), which is used as invalidMSecs(). As (at least) the Windows back-end uses minMSecs() as the time of a start-of-time transition (that we'd like to find as our current transition), use one more than it as lower-bound for where to search from for a previous transition, so that we do find that first ever transition. Pick-to: 6.3 Change-Id: Iae861e740e02bd38ffb2af77aff625d3b48182d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use QDateTimePrivate's methods in preference to std::numeric_limitsEdward Welbourne2022-03-043-16/+18
| | | | | | | | | | | | | | | | The methods give them more appropriate names. This revealed one place where the min() that's actually invalidMSecs() was being used for a time that should have been in the supported range, so amend that to use minMSecs(). Replaced a use of invalidMSecs() + 1 with minMSecs(), to which it is equal, as that was the meaning it was used for. At the same time, make those methods constexpr (because they are) and [[nodiscard]], since their values should be used, while dropping their fatuous inline (the bodies are inline in the declarations). Pick-to: 6.3 Change-Id: Idcd51c55850573372b44e6fcf08d5d2665b8a60e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>