summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QMetaType: use modern comparisonsTatiana Borisova4 hours3-11/+16
| | | | | | | | | | | | | Internal QPropertyBindingPrivatePtr, QArgumentType classes also have been updated; Replace class operators operator==(), operator!=() of QRegularExpression to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Task-number: QTBUG-120304 Change-Id: I010617cbcb8bd6afb7c21ee4345398648821f72c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QEasingCurve: use comparison helper macrosIvan Solovev10 hours2-9/+18
| | | | | | | | | | | | Like with the QLine(F) case, we have to use QT_CORE_REMOVED_SINCE to remove the old member operators, but also need to guard the new friend functions with !(QT_CORE_REMOVED_SINCE), because QEasingCurve is also one of the core types, and on Windows the metatype interface for it is instantiated in removed_api.cpp. Task-number: QTBUG-120308 Change-Id: I1bd66f7230afd3eba868d05fd496ab13a0331178 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* QMarginsF: add qFuzzyCompare and qFuzzyIsNull overloadsIvan Solovev11 hours1-0/+45
| | | | | | | | | [ChangeLog][QtCore][QMarginsF] Added qFuzzyCompare and qFuzzyIsNull overloads for QMarginsF Task-number: QTBUG-120308 Change-Id: I7c1ceaa9ba544458738b71bf326395eef59e7a54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMargins(F): use comparison helper macrosIvan Solovev11 hours1-0/+8
| | | | | | | | | | | | Also explicitly add QMarginsF vs QMargins comparison. Previously such comparison was implicitly converting QMargins to QMarginsF, and doing the fuzzy comparison. We have to keep the old behavior to avoid breaking user code, so use fuzzy comparison in the new operators as well. Task-number: QTBUG-120308 Change-Id: Ic82f64078cd991859b851f24aa7017ef0b91a4e1 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* Fix QMarginsF::operator==() for zero marginsIvan Solovev11 hours2-0/+48
| | | | | | | | | | | | | | | The (in)equality operators for QMarginsF are documented to use fuzzy comparison. However, the implementation unconditionally used qFuzzyCompare which is incorrect for the case of 0 margins. Update the implementation to use a combination of qFuzzyIsNull and qFuzzyCompare, like it's done for QPointF. [ChangeLog][QtCore][QMarginsF] Fixed a bug when equality comparison returned incorrect results if one of the margins was zero. Task-number: QTBUG-120308 Change-Id: I6e785fe8b523f6aa5f5317fb75877fdbf4e086c2 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* QRectF: add qFuzzyCompare and qFuzzyIsNull overloadsIvan Solovev11 hours1-0/+25
| | | | | | | | | [ChangeLog][QtCore][QRectF] Added qFuzzyCompare and qFuzzyIsNull overloads for QRectF Task-number: QTBUG-120308 Change-Id: Ie2eee0a28b902bdfeb91be45a164be659aef1a20 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRect(F): use comparison helper macrosIvan Solovev11 hours2-0/+69
| | | | | | | | | | | | | | Also explicitly add QRectF vs QRect comparison. Previously such comparison was implicitly converting QRect to QRectF, and doing the fuzzy comparison. The new operators are directly calling operator==(QPointF, QPoint), which also does the fuzzy comparison, so the old behavior is preserved. As a drive-by: move the operators into the private section. Task-number: QTBUG-120308 Change-Id: I9b96ed4266e6a6c02a52c8cfff6ec1b2d036a7ca Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* QLineF: add qFuzzyCompare and qFuzzyIsNull overloadsIvan Solovev11 hours1-0/+27
| | | | | | | | | [ChangeLog][QtCore][QLineF] Added qFuzzyCompare and qFuzzyIsNull overloads for QLineF Task-number: QTBUG-120308 Change-Id: I3d032f47851d886adce95ac72109fde169892688 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QLineF::isNull behavior when handling zero pointsIvan Solovev11 hours1-2/+28
| | | | | | | | | | | | | | | | | QLineF::isNull was using qFuzzyCompare on the x and y components of its points, which was not working correctly if some of the components was equal to zero. The correct approach is to use qFuzzyIsNull togeter with qFuzzyCompare. This approach is already implemented in qFuzzyCompare() overload for QPointF, so just use it. Add unit-tests for QLine(F)::isNull. [ChangeLog][QtCore][QLineF] Fixed a bug when QLineF::isNull() returned incorrect result if the start or end point contained a zero component. Change-Id: I3cfe6406b1299de32fe82b1fcbfb0416f0eaac15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLine(F): use comparison helper macrosIvan Solovev11 hours2-0/+74
| | | | | | | | | | | | | | | | | | | | | | | Also explicitly add QLineF vs QLine comparison. Previously such comparison was implicitly converting QLine to QLineF, and doing the fuzzy comparison. The new operators are directly calling operator==(QPointF, QPoint), which also does the fuzzy comparison, so the old behavior is preserved. Remove the old relational operators using QT_CORE_REMOVED_SINCE, but also wrap the new operators in !defined(QT_CORE_REMOVED_SINCE). That is required, because on Windows the instantiation of QMetaTypeInterface<QLine(F)> happens in removed_api.cpp (as both qline.h and qmetatype.h are already included there). If we just add removed member operators into removed_api.cpp, the metatype interface will not be able to create an equals() function, because of the ambiguity in equality operators (member vs friend). That's why we have to exclude the new friend operators from removed_api.cpp. Done-with: Fabian Kosmale <fabian.kosmale@qt.io> Task-number: QTBUG-120308 Change-Id: Ibbf5ec077f69c75da0d36a8be5596acd0fcd44d0 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* Add qFuzzyCompare() and qFuzzyIsNull() overloads for QPointFIvan Solovev11 hours1-0/+21
| | | | | | | | | | | Use the new qFuzzyCompare() overload in op==(QPointF, QPointF). [ChangeLog][QtCore][QPointF] Added qFuzzyCompare() and qFuzzyIsNull() overloads for QPointF. Task-number: QTBUG-120308 Change-Id: I522164acb65432bf55c58b55575f25535d27e27a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPoint(F): use comparison helper macrosIvan Solovev11 hours4-17/+39
| | | | | | | | | | | | | | | Explicitly add QPointF vs QPoint comparison. Previously such comparison was implicitly converting QPoint to QPointF, and doing the fuzzy comparison. We have to keep the old behavior to avoid breaking user code, so explicitly use fuzzy comparison in the new operators. As a drive-by: move the friend functions into the private section, so that they are actually hidden friends. Task-number: QTBUG-120308 Change-Id: I471a890b8332455e8b2dc1b99e5fba4ada168a30 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* Improve test compilation setup with QtLite configurationJari Helaakoski15 hours1-1/+3
| | | | | | | | Functional fix will come later via separate tasks. Task-number: QTBUG-122999 Change-Id: Ib805740c87ff21cea5a186add71cc594ab4d4df1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QStaticLatin1StringMatcher: add indexIn(QStringView)Ahmad Samir2 days1-0/+124
| | | | | | | | ... mirroring the same change in QLatin1StringMatcher. Task-number: QTBUG-117054 Change-Id: I8d1f4ed01ee75a51e3d99a165dbb35ae7dae5886 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QFuture::const_iterator: use modernize comparisonsTatiana Borisova2 days2-10/+19
| | | | | | | | | | Replace class operators operator==(), operator!=() of QFuture::const_iterator: to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Task-number: QTBUG-120304 Change-Id: Ifa264b83f4d5623db99820847ab9a800cca99be2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QLatin1StringMatcher: add indexIn(QStringView) overloadAhmad Samir2 days1-17/+58
| | | | | | | | | | | | Drive-by changes, remove a redundant typedef. [ChangeLog][QtCore][QLatin1StringMatcher] Added indexIn(QStringView) overload. Task-number: QTBUG-117054 Change-Id: I5a8426cb0f9d9111f086015902ffe2185a267c86 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
* Add copyright and licensing to .bat files missing themLucie Gérard3 days2-2/+6
| | | | | | Task-number: QTBUG-124453 Change-Id: I8bd48ab5d5b18197ef5bf9a46edf49da86374bee Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QThread/Unix: make QThreadPrivate::finish() be called much laterThiago Macieira3 days1-15/+59
| | | | | | | | | | | | | | | | | | | | We need it to run after all the thread-local destructors have run, to ensure that some user code hasn't run after QThreadPrivate::finish() has finished. We achieve that by making it get called from a thread-local destructor itself, in the form of a qScopeGuard. This ought to have been done since C++11 thread_local with non-trivial destructors became available. However, it only started showing up after commit 4a93285b166ceceaea2e10c8fc6a254d2f7093b9 began using thread_local inside Qt itself. The visible symptom was that QThreadPrivate::finish() had already destroyed the thread's event dispatcher, but some user code ran later and expected it to still exist (or, worse, recreated it, via QEventLoop → QThreadData::ensureEventDispatcher). Fixes: QTBUG-117996 Pick-to: 6.7 Change-Id: I8f3ce163ccc5408cac39fffd178d682e5bfa6955 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Exclude sync() usage from VxWorks platformTomasz Kozłowski3 days1-0/+2
| | | | | | | | | | This function is not available in VxWorks libraries and it is not mandatory for proper qstorageinfo test execution. Pick-to: 6.7 Task-number: QTBUG-115777 Change-Id: Ic503c776002087d461c32f890795c27be4b1ca34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QResourceEngine: use both ways of registering dynamic resourcesThiago Macieira4 days1-2/+15
| | | | | | | | | So we test both the mmap()ed and non-mmap()ed versions. Will be important in the next commit. Change-Id: I6979d02a7395405cbf23fffd17c98f0e207477e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QVersionNumber: use new comparison helper macrosTatiana Borisova4 days2-154/+78
| | | | | | | | | | Replace public friend operators operator==(), operator!=(), operator<(), etc of QVersionNumber to friend methods comparesEqual() / compareThreeWay(). Task-number: QTBUG-120304 Change-Id: Ib94a1a28ca9843ca5d5a8d07f41c63de9fe584bb Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Break out timezone data from cldr2qtimezone.pyEdward Welbourne4 days1-1/+1
| | | | | | | | | | | This separates the large slabs of data (and their documentation) from the code that mixes them with CLDR-derived data and generates the data we actually use. In the process, put the shorter table before the longer one, to make it less likely that folk shall fail to notice it's even there at all. Change-Id: I8457741911657dac0dad53c2e65b977821bb4e71 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Extend QTest::failOnWarning() to a no-parameter fail-on-any-warningEdward Welbourne4 days1-1/+1
| | | | | | | | | | | | | | | | | | | | Many users (albeit mostly in qtdeclarative) of failOnWarning() are passing a catch-all regexp, which is only supported when regular expression support is enabled. Make their lives easier and those checks independent of the feature by adding a third overload, taking no parameter, that fails on any (unanticipated) warning. Implementation is trivial - just put a null QVariant in failOnWarningList; it won't match either check on the entry that might exempt a test from failing on a warning, so any warning at all will trigger failure. [ChangeLog][QtTest] QTest::failOnWarning() now has a no-parameter overload to support the common case of fail-on-any-warning, without needing to construct a match-everything regular expression. Change-Id: Ic693f1c8619fd6e495543b85737d566134cf9d20 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_QMetaProperty: expand testing around enums and flagsMårten Nordheim4 days1-0/+120
| | | | | | | | | | Test more scenarios, like separate namespaces, free enums, etc. And test that the enumerator() function returns a valid QMetaEnum when expected. Change-Id: Ie4fa816ffb66d6b6e1b4c7c50674c31eddbd642e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix test compilation issues with QtLite configurationJari Helaakoski4 days12-26/+87
| | | | | | | | | | Now developer build tests compile, but some are not working. Functional fix will come later via separate tasks. Task-number: QTBUG-122999 Change-Id: I70487b46c1b32ba4279cb02a4978e4f55ac0d310 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: Enable qstandardpaths testEven Oscar Andersen4 days1-1/+7
| | | | | | | Also log if the entries does not exist in the filesystem Change-Id: Id7d4dec1610af13869e645cf96b5bf6a1e26b956 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QRegularExpression: use modernize comparisonsTatiana Borisova4 days2-24/+18
| | | | | | | | | | | | | Replace class operators operator==(), operator!=() of QRegularExpression to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of current comparison methods and replace them with a friend. Task-number: QTBUG-120304 Change-Id: Ib6fc83d29ad9bc710c2fdf32a3d60131fbf298b6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add copyright and licensing to tools and utils files missing itLucie Gérard8 days1-0/+2
| | | | | | Task-number: QTBUG-124453 Change-Id: I7645bcd7a7559425659bc522530a25977d7b5c82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* ptests: Fix qlogging to use relative folderAri Parkkila8 days2-4/+1
| | | | | | | | | | Run qlogging_helper at relative working directory because CMAKE_CURRENT_BINARY_DIR is not valid when test is run after installed from package to target. Task-number: QTBUG-118680 Change-Id: Ifd46d05562006ad4adf17517fae30ca5c63bc157 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QResourceEngine: move the resource path to the end in the row labelThiago Macieira8 days1-24/+24
| | | | | | | | | Otherwise, it's impossible to select those rows in the command-line, because they start with a colon. Change-Id: I6979d02a7395405cbf23fffd17c98f455a4cbdaa Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QResource: obey the MapPrivateOption option to provide RW memoryThiago Macieira8 days2-4/+25
| | | | | | | | | | | | | | | | | | | | | The documentation says: The mapping will have the same open mode as the file (read and/or write), except when using MapPrivateOption, in which case it is always possible to write to the mapped memory. So obey it. This may cause high memory use by copying data we already have. This may be important because applications may want to memory-map resources which they intentionally didn't compress because those resources are large. Later commits will implement some workarounds. Fixes: QTBUG-124608 Pick-to: 6.7 6.6 6.5 Change-Id: I6979d02a7395405cbf23fffd17c8f03baf0ec00d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: skip tst_android::orientationChange() for Android 9Assam Boudjelthia8 days1-0/+3
| | | | | | | | | Android 9 emulator seems quite buggy with sending the orientation changes callbacks. Task-number: QTBUG-124890 Change-Id: Ifb52d2eea4221d1759a04ca1d7e74e60620a3804 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QLocale: use new comparison helper macrosTatiana Borisova9 days2-4/+35
| | | | | | | | | | Replace public friend operators operator==(), operator!=() of QLocale to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Task-number: QTBUG-120304 Change-Id: I759ef08269abe3b40e0dce3fd408a86cc3f34857 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QMimeType: use modernize comparisonsTatiana Borisova10 days2-4/+28
| | | | | | | | | | | | | Replace class operators operator==(), operator!=() of QMimeType to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of current comparison methods and replace them with a friend. Task-number: QTBUG-120304 Change-Id: I9776e98c8a3b14d599733c91af61fbc12b1f0e57 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QMetaMethod: use new comparison helper macrosTatiana Borisova11 days2-11/+18
| | | | | | | | | | Replace public friend operators operator==(), operator!=() of QMetaMethod to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Task-number: QTBUG-120304 Change-Id: Idb3f880a1db4850d73a58ed37f8cbd3454dd5ea2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QThread: Reuse isMainThread()Jarek Kobus11 days1-4/+4
| | | | | | | Internally, reuse threadId and theMainThreadId. Change-Id: Iea6e7d8fcbcaf7e2f4dbf8ab33890d0f7954edc0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaSequence and QMetaAssociation: use new comparison helper macrosTatiana Borisova11 days2-1/+15
| | | | | | | | | | | Replace public friend operators operator==(), operator!=() of QMetaSequence and QMetaAssociation classes to friend methods comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macroses. Task-number: QTBUG-120304 Change-Id: I88e9b228220d36092437bfb71ae2f053d2e99fdf Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Enable resetting a sort model by descending orderAli Kianian11 days1-4/+7
| | | | | | | | | | | | | | | | | By this change, sort(any_negative_number) will stay unchanged, and it unsorts the model so that the order will be the same as the source model. But when the second argument of the sort is set to DescendingOrder deliberately, the result will be the same as the source model, but in reverse order. [ChangeLog][QTCore][QSortFilterProxyModel] QSortFilterProxyModel.sort sorts the proxy by the source model index descending if the sort column is less than zero and the order is descending. Fixes: QTBUG-124863 Change-Id: I73f9d3b500a929efa969cf24ef3d8fe758167645 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: Add qurl autotestEven Oscar Andersen11 days1-5/+21
| | | | | | | | The testThreading test was deadlocking due to waiting for threads to start. Rewritten the wait to use a QEventLoop Change-Id: If1a864c054c1de1239694b201a4cf0e8186fc1d0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QRegularExpressionMatch: port API from QString to QAnyStringView keysMatthias Rauter12 days1-0/+2
| | | | | | | | | | | | | | The QRegularExpression capture-by-name keys are currently QStringViews, but are only ever used to compare them against a const char16_t*, so this API is a perfect candidate for replacing all of these overload sets with a single QAnyStringView function. [ChangeLog][QtCore][QRegularExpression] Keys can now be passed as QAnyStringView (was QStringView). Fixes: QTBUG-103097 Change-Id: I1a80e85f301cc08370d70b3b5eb0ae10c6a51f33 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QBitArray: use new comparison helper macrosTatiana Borisova2024-04-262-83/+98
| | | | | | | | | | Replace public friend operators operator==(), operator!=() of QBitArray to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. Task-number: QTBUG-120304 Change-Id: I6b47111c144016b3aa05f01c8035c32d164291ad Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QSaveFile: don't reset fileEngine after commit()David Faure2024-04-261-0/+24
| | | | | | | | | | | [ChangeLog][QtCore][QSaveFile] Member functions such as fileTime() and size() now continue to work after commit(). Fixes: QTBUG-66605 Fixes: QTBUG-77039 Change-Id: I0b17eae9493911d1a0828b589d762bd8eb344bce Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThread: Introduce isCurrentThreadFabian Kosmale2024-04-261-0/+7
| | | | | | | | | | This allows a more efficient way of checking whether a thread is the currently executing one (without using private API). Change-Id: I007edae6b258d7e42e901fa720d4f3cf9fe25a49 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* QTest: rip out qxp::function_ref from compare_helper()Thiago Macieira2024-04-261-2/+5
| | | | | | | | | | | | | | | | [ChangeLog][QtTest] The QCOMPARE_xx macros can now only find QTest::toString() expansions that are either found via Argument Dependent Lookup on the type in question or are an instatiation of the QTest::toString<T>() template. This matches the behavior of the QCOMPARE() macro. This changes the way how the toString() overloads are selected, so we need to explicilty constraint the main QTest::toString() template in order to pick the free functions when they exist. Change-Id: Ie28eadac333c4bcd8c08fffd17c54e768c5cffd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QThread: check various ways users may use start(Priority)Marc Mutz2024-04-261-0/+51
| | | | | | | | | | Some of these would break if we changed the start(Priority) to say start(QThread::Priority) instead. Pick-to: 6.7 6.5 6.2 Task-number: QTBUG-124723 Change-Id: Id3ebe73718c8acbc54a2c88158f4062fd0dd5be1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: fix cross-compilation build: ${CMAKE_SYSTEM_PROCESSOR} is emptyThiago Macieira2024-04-241-1/+1
| | | | | | | | | | | | | | | | CMake Error at tests/auto/corelib/global/qcomparehelpers/CMakeLists.txt: 20 (if): if given arguments: "CMAKE_VERSION" "VERSION_GREATER_EQUAL" "3.20" "AND" "NOT" "MACOS" "AND" "NOT" "VXWORKS" "AND" "NOT" "(" "LINUX" "AND" "MATCHES" "aarch64" ")" Unknown arguments specified Pick-to: 6.7 Change-Id: I6979d02a7395405cbf23fffd17c900d8e25e4c0c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QMimeData: fix setData on URI list without ending CRLFThiago Macieira2024-04-221-0/+8
| | | | | | | | | | | | | Commit 8d127c57376e48dd49afe62cfb8e714d26759a69 refactored this code from QByteArray::split to manually iterate over the list (and QStringTokenizer doesn't work for QByteArray), so we missed the last element in the iteration. Pick-to: 6.7 Fixes: QTBUG-124580 Change-Id: I455fe22ef4ad4b2f9b01fffd17c867f6ed350af7 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Improve fidelity of approximation to CLDR zone representationsEdward Welbourne2024-04-221-6/+6
| | | | | | | | | | | | | | | | | | | | I neglected to update the CLDR dateconverter code when I expanded the range of forms we support for display of a timezone. Even that expanded range doesn't cover all the cases CLDR does, but we can at least approximate each of CLDR's options by the closest we do support. Make matching changes to how the Darwin backend for the system locale maps its ICU-derived formats to ours. This in practice changes all locales previously using t (abbreviation) as zone format to use tttt (IANA ID) instead. Test data updated to match. [ChangeLog][QtCore][QLocale] Date-time formats now more faithfully follow the CLDR data in handling timezones. In most cases this means the IANA ID is used in place of the abbreviation. Change-Id: I0276843085839ba9a7855a78922cffe285174643 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: qabstractfileengine test fails on wasm/windowsEven Oscar Andersen2024-04-211-2/+2
| | | | | | | | | | | The test assumes either windows or unix line endings, however wasm can run on either system, causing problem with git config core.autocrlf=true Fix the test so that on wasm we correct filesize if necessary Change-Id: Ieb86c5388aa931d8ca06822e1c09a2c55801de67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QString: ensure multi-arg arg() parses replacement like single-arg arg()Thiago Macieira2024-04-211-3/+9
| | | | | | | | | | | | | | | | | | | There was a discrepancy that the multi-arg arg() overload would accept any number of digits in the placeholder, resolving up to value 999 (e.g., %000001 was interpreted as placeholder #1), but the single-arg arg() overload only supported exactly one or two digits. The single-arg behavior was documented, so use it. [ChangeLog][Important Behavior Changes] The QString::arg() overload taking multiple QString-like arguments is now fixed to interpret placeholders like the other arg() overloads: it will find at most two digits after the '%' character. That is, the sequence "%123" is now interpreted as placeholder #12 followed by character '3' (verbatim). Pick-to: 6.7 Fixes: QTBUG-118581 Change-Id: I455fe22ef4ad4b2f9b01fffd17c767a948d41138 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>