summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tst_QMetaObject: add a reproducer for overly eager QVector/QList replacementMarc Mutz2025-06-061-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | | The kludge that was added to argumentTypesFromString() for Qt 6 to support merging QVector into QList—specifically, the replacement of QVector< with QList<—was unfortunately not removed before the Qt 6.0 release. As a kludge, it has unintended consequences, as Thiago pointed out in a comment on a related patch. This change adds a reproducer that demonstrates cases where the kludge causes correct code to fail incorrectly. We need this test to ensure that we do not silently change behavior when deprecating and eventually removing the kludge. Adapt the MyQList normalization test, which was carefully written to avoid hitting the kludge, to use template arguments. This will allow it to trigger the buggy code path and avoid confusing the reader with the mention of a non-template MyQList, given that MyQList is now a template. Reported-by: Thiago Macieira <[email protected]> Pick-to: 6.10 6.9 6.8 6.5 Task-number: QTBUG-135572 Change-Id: I91d769d494489fe63dbbb67f849b78fc7aa39ec6 Reviewed-by: Ahmad Samir <[email protected]>
* tst_QHttp2Connection: fix typo of tested variableMårten Nordheim2025-06-061-1/+1
| | | | | | | | | Accidentally used clientStream instead of clientStream2. Test still passes though. Pick-to: 6.10 6.9 Change-Id: I118f1e429faa0367f0b4d02c74a221027ecb2b4d Reviewed-by: Edward Welbourne <[email protected]>
* Add support for font features and variable axes to QTextCharFormatEskil Abrahamsen Blomfeldt2025-06-062-0/+153
| | | | | | | | | | These can be set on the font directly, but had not been added to QTextCharFormat, so there would be no way to override them by formatting in a rich text document. Fixes: QTBUG-134060 Change-Id: I4494e24cb9b99d84fb376ba895e2461fc3cd054b Reviewed-by: Eirik Aavitsland <[email protected]>
* wayland: Add unit test for sibling client grabbing popups being createdDavid Edmundson2025-06-061-0/+63
| | | | | | Task-number: QTBUG-119110 Change-Id: Ie31da8073d0107f6515ce2e0152cb2bbc97c8582 Reviewed-by: David Redondo <[email protected]>
* Wayland tests: use initTestCase() instead of init() to set envThiago Macieira2025-06-053-6/+6
| | | | | | | | | | Once is fine. We don't need to set the environment before each test function. Pick-to: 6.10 Change-Id: Id27938950c196d6d3397fffd2fbf1a66fe7504f9 Reviewed-by: Liang Qi <[email protected]> Reviewed-by: David Redondo <[email protected]>
* tst_QMetaObject: refactor indexOfMethod() testMarc Mutz2025-06-051-6/+12
| | | | | | | | | | Removes duplication in preparation of adding more tests. Pick-to: 6.10 6.9 6.8 6.5 Task-number: QTBUG-135572 Change-Id: I9ebfc40e24256d2d92af3f593f905d97b273e187 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QProperty: fix comparison with comparable typeIvan Solovev2025-06-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | After e115c60b6da0db7013229e678720f36632c2e614, the comparison with a type which is different from QProperty::value_type, but is comparable to it, could result in ambiguous operator==() overloads. Fix it by adding a new overload for operator==(QProperty<T>, U), where operator==(T, U) exists. Explicitly delete operator==(QProperty<T>, QProperty<U>) for such types T and U, because the implicit conversion might be unwanted here. The user should manually call .value() at least on one property, if they want the comparison. Note that GCC does not allow to do it, treating `= delete` as declaration and complaining about a default template argument in friend template declaration. So, do it only for Clang and MSVC. Amends e115c60b6da0db7013229e678720f36632c2e614. Task-number: QTBUG-134921 Pick-to: 6.10 Change-Id: Id3ed48738cc462b5b0820fa3b25d80d4d4414548 Reviewed-by: Fabian Kosmale <[email protected]>
* Bump version to 6.11.0Jani Heikkinen2025-06-054-4/+4
| | | | | Change-Id: I14ec3a08bf704535b9b10e33ec8ee0f9415f2d7c Reviewed-by: Qt Submodule Update Bot <[email protected]>
* tst_QMetaObject: add more QList/QVector testsMarc Mutz2025-06-041-0/+93
| | | | | | | | | | | | | | | | | | | Check that a slot that was declared using QVector ends up stored as, and can be called with, QList (and QVector). Also check that the various indexOf*() methods do the QVector</QList< normalization, even though they're documented to require normalized input. A subsequent patch will deprecate that behavior, so make sure we don't break it as we change it. Amends 1fa31be7ce3a6899f1c1597311d7593648ecd1d8. Pick-to: 6.10 6.9 6.8 6.5 Task-number: QTBUG-135572 Change-Id: Id28bf3c4163099f07213bfbf7d296b4fd76b71a5 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* wayland: In test lock thread when setting env variablesDavid Edmundson2025-06-049-21/+21
| | | | | | | | | | putenv/setenv are not thread safe. The Qt wrappers lock a mutex but this only works if all users use it. Fixes: QTBUG-136450 Pick-to: 6.10 Change-Id: I9a46b5be607c84436864afcf7eb063275e065738 Reviewed-by: Liang Qi <[email protected]>
* Android: Bump androix dependency to 1.16.0Lars Schmertmann2025-06-031-1/+1
| | | | | | | | | | The Android target API level was bumped to 35 in 997a1fae98d35cd0d4d16f37ab68afe2729ff551 so we can bumb the version of the androidx dependency too. Pick-to: 6.10 6.9 6.8 Change-Id: I30d561cc0b74645c939e7d3dd595926b6013caf9 Reviewed-by: Assam Boudjelthia <[email protected]>
* Explain what "junk" means in tst_QDataStream::status_QBitArray_data()Marc Mutz2025-06-031-1/+1
| | | | | | | | | | | | | It means the data contains bits outside the [0, size()[ range. Found while debugging why these data rows fail in the 5.15 cherry-pick of 78f8dfc5427457783ceef7d85885cddbec035ebe. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 5.15 Change-Id: Ic21d15da25944d4897357dd27e2986d448b5ee60 Reviewed-by: Ivan Solovev <[email protected]>
* QFileSystemEngine::tempPath: bypass QDir and go straight to QFSEngineThiago Macieira2025-06-031-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporary paths coming from the environment must be real filesystem things, never a Qt file engine, so we don't need to create QDir with its QDirPrivate, in order to call QFileSystemEngine. The replacing of canonicalPath() with QFSE::absoluteName() is fine because canonicalizing *after* cleanPath() is the wrong thing. For example, if you had: $ ln -s $HOME/tmp /tmp/symlink $ TMPDIR=/tmp/symlink/.. then cleanPath($TMPDIR) = /tmp absolute($TMPDIR) = /tmp # QFSE::absoluteName calls cleanPath canonical($TMPDIR) = $HOME canonical(cleanPath($TMPDIR)) = /tmp The lack of canonicalization now only affects when the final path is a symlink. Doing so bought us little security if it is a symlink and it could change, because the result is not cached and could change from call to call. That changing is probably worse than any attack, because you could end up with QDir::tempPath() != QDir::tempPath() [ChangeLog][QtCore][QDir] tempPath() may now return a non-canonical path. This means going up from it (cdUp()) may result in different paths from string manipulation (adding "/.."). Pick-to: 6.10 6.9 Change-Id: Iddf6f46edf6f3b6c3222fffd1e1e5479f0be92a9 Reviewed-by: Ahmad Samir <[email protected]>
* wayland: Ack configure events when suspendedDavid Edmundson2025-06-021-4/+7
| | | | | | | | | | | | | All configure events should be acked, and that acknowledgement is double buffered with the surface commit. If a window is not exposed, for example being in a suspended state, us sending an expose event is semantically wrong. It also ends up not resulting in a commit as at some point it no-ops, we have to commit manually. Change-Id: I020b06f04030c1209f2fc768adc8bd66d57975b1 Reviewed-by: David Redondo <[email protected]>
* DirectWrite: Avoid infinite recursion with broken font dataEskil Abrahamsen Blomfeldt2025-06-023-1/+13
| | | | | | | | | | | | | | | | | | If a font has an em square size of 0 it is not going to be useful. However, if one was encountered we returned a default value to avoid division by zero. The default implementation called ascent(), which would depend on the em square size again and we would get an infinite recursion for these fonts. To avoid this, we simply return a default value of 16 in the case of a broken font. (The Apple spec gives the range 64 .. 16384 for the em square and the Microsoft spec says 16 .. 16384, so we use the smallest of the two.) Fixes: QTBUG-137277 Pick-to: 6.5 6.8 6.9 Change-Id: I63779e44c10c7021486787d1e1e818f4c6e47835 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* qdataurl: fix parsing parameter values with percent-encoded commaAhmad Samir2025-06-011-0/+4
| | | | | Change-Id: I2faa8ce7c9932eb82a853421290c39a37ad91bcf Reviewed-by: Thiago Macieira <[email protected]>
* Fix flaky tst_QFocusEvent::checkReason_ActiveWindow on openSUSEFrédéric Lefebvre2025-06-011-2/+0
| | | | | | | | | | | | | | | | tst_QFocusEvent::CheckReason_ActiveWindow is flaky on openSUSE where the childFocusWidgetOne is unable to receive focus after d has been hidden. This is due to some asynchronicity when setActive is being called while d is already active. Remove the call to activateWindow on d as it is already active by calling show. Pick-to: 6.9 6.8 6.5 Change-Id: Id01c6704122df42982d65d28ddb94d184d00d9aa Reviewed-by: Axel Spoerl <[email protected]>
* Fix flaky tst_QMdiArea::currentSubWindow()Frédéric Lefebvre2025-06-011-0/+1
| | | | | | | | | | | | | | tst_QMdiArea::currentSubWindow() is flaky and fails when the dummyTopLevel window is not marked as active before verification. Verify that the dummyTopLevel is active, before checking what is the active topLevel window. Fix the flakiness of tst_QMdiArea::currentSubWindow() on Ubuntu 24. Pick-to: 6.9 6.8 6.5 Change-Id: If5b85713d0bfec40e2722c471f7c3ba5ac73171c Reviewed-by: Axel Spoerl <[email protected]>
* Make QOpenGLContext::globalShareContext() lazy creation thread-safeTor Arne Vestbø2025-05-311-0/+18
| | | | | | | | | | | We move the context to the main thread (or the thread of qGuiApp), as that's where it will be deleted. Amends 4a7ccb65f0065e878c5762db05eca9c5cd6731e5. Caught-by: Eskil Abrahamsen Blomfeldt <[email protected]> Change-Id: I8e5dc512dce02d22980730a46474b2262684a713 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add run opengl tests featureMichal Klocek2025-05-307-1/+23
| | | | | | | | | | | | | On Woa cross compile we want to compile with opengl feature, however tests windows arm nodes do not have opengl installed add a feature to skip the tests preventing the crash otherwise. Note this is just temporary workaround and should be reverted as soon as opengl libs land on windows arm vm nodes. Task-number: COIN-1211 Change-Id: Iaae205b9cc10bd17e82152a44b2e976e4321d00d Reviewed-by: Alexandru Croitor <[email protected]>
* Fix flaky tst_QScroller::overshoot on multiple Windows versionsFrédéric Lefebvre2025-05-301-2/+2
| | | | | | | | | | | | | | | | tst_QScroller::overshoot is flaky on multiple versions of Windows 11. The failure occurs in the part testing overshoot always off and slow, where the result of the deltaPos and the startPos are equal to 0 instead of being smaller. Slightly increase the value of touchEnd so that deltaPos is smaller. As a drive-by, constify a local variable. Fix the flakiness on Windows 11 24h2 mingw. Fixes: QTBUG-137201 Change-Id: I6dacc7b5ac140f427fa6fbb8fddb5447ae14a233 Reviewed-by: Axel Spoerl <[email protected]>
* Q(ObjectBindable)Property: Properly support comparisonsFabian Kosmale2025-05-302-0/+37
| | | | | | | | | | | | | | | Before, it was possible to do some comparisons due to the implicit conversion to T. However, that does not work in all contexts. Fix this by explicitly declaring the comparison operators. We need to a) use the helper macro directly, as the operartors are only available if the underlying type has them and b) mark the operator as noexcept(false), as capturing a property in a binding might allocate. Fixes: QTBUG-134921 Change-Id: I2855964ba481b9e7778a4a7076528593549910fe Reviewed-by: Ivan Solovev <[email protected]>
* wayland: Reset surface on QWindow type changeDavid Edmundson2025-05-301-0/+38
| | | | | | | | | | | | | | | Changing the role between toplevel and popups is illegal on wayland even if the window is not visible. We need to reset to the wl_surface. This meant we cannot call setWindowFlags in the constructor. QWindow::flags / QWindow::windowType changes after QPlatformWindow::setFlags has finished, so we need to use our own flags rather in XdgShell rather than pulling them from the QWindow. Task-number: QTBUG-136110 Change-Id: I8b54b7ea8a768a539178395e53cc63a64fd80232 Reviewed-by: David Edmundson <[email protected]>
* QByteArray: make toDouble() reject space-only stringsThiago Macieira2025-05-292-1/+14
| | | | | | | | | | | | | | | | | | | | This does not affect leading and trailing spaces, which remain allowed. This is only about a string containing only spaces, which used to be rejected prior to Qt 5.9 and are rejected with QString (unit tests added to confirm). Drive-by indent one QString test row, which I've also reordered so null comes before empty. [ChangeLog][QtCore][QByteArray & QByteArrayView] Fixed an old regression that caused toDouble() and toFloat() to return ok = true for a string containing only whitespaces. Pick-to: 6.9 6.8 Fixes: QTBUG-137038 Change-Id: Ia6f7714c5e289317de60fffd0f8aa6d2198a91ef Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Ivan Solovev <[email protected]>
* a11y: Report QWidget localeMichael Weghorn2025-05-292-9/+54
| | | | | | | | | | | | | | | | | | | Implement support for QAccessible::Attribute::Locale (newly introduced in a previous commit) for QWidget by introducing QAccessibleWidgetV2 which subclasses QAccessibleWidget and implements the QAccessibleAttributesInterface to report the QWidget::locale property for QAccessible::Attribute::Locale. (Leave QAccessibleWidget unchanged for ABI compatibility.) Switch QAccessibleWidget subclasses to subclass the newly introduced QAccessibleWidgetV2. Add a corresponding unit test. Task-number: QTBUG-137144 Change-Id: I61385b17ee1272801ad769da5a807ca4e068cfb2 Reviewed-by: Volker Hilsheimer <[email protected]>
* Add autotest for ensuring restoring cursor shapes doesn't regressJoshua Goins2025-05-281-0/+69
| | | | | | | | | We now try to keep track of the cursor state for each window, but was missing an autotest (modeled after QTBUG-133541.) Pick-to: 6.8 6.9 Change-Id: I9d081f5a3cc8bdaa860d48beb5f105afa424f102 Reviewed-by: David Edmundson <[email protected]>
* Modernize string usage in corelib/time/ testsEdward Welbourne2025-05-2811-456/+474
| | | | | | | | | | This incidentally lets me turn on QT_NO_CAST_{FROM,TO}_ASCII for them. In the process, convert some test-cases to addRow() and use plain QBA in place of newRow((QString arithmetic).toLocal8Bit().constData()), Change-Id: I0117338dd927fc4eee74688ac86975508fa43b51 Reviewed-by: Ivan Solovev <[email protected]>
* Add TEST_ALL_COMPARISON to tst_qstringviewMatthias Rauter2025-05-272-3/+6
| | | | | | | | | While porting some of these tests to QUtf8StringView, Thiago suggested to add the comparison tests from qcomparisontesthelper_p.h. Pick-to: 6.9 6.8 Change-Id: Id8f2c1c5690f7219ac000eebb637f48acbc5662d Reviewed-by: Thiago Macieira <[email protected]>
* Deploy QCOMPARE_op() more widely in corelib/time/ testsEdward Welbourne2025-05-263-49/+58
| | | | | | | | | Exceptions: * In tests of comparison operators themselves, still verify. * Hash values aren't interesting to display. Change-Id: I046be84f0f2637eddf57409895f20f164bda9a6b Reviewed-by: Thiago Macieira <[email protected]>
* wasm: Skip tst_QDir::mkdirOnSymlinkPiotr Wiercinski2025-05-261-1/+1
| | | | | | | | Skip this test temporarily to enable upgrading Emscripten to 4.0.7. Change-Id: Ieb01a3d3d231828a127c5d7c1866cab547e22fb6 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]>
* QGIM: Rename to QRangeModelVolker Hilsheimer2025-05-263-77/+77
| | | | | | | | | | | | | | | | | | | | | | As per the discussion on the mailing list [1], we want to avoid the word "Generic" in class names. And QGIM is by design not using 'items', so similar to e.g. QAbstractListModel or QSqlQueryModel, we don't need to have "item" in the class name either. It is a "Model", which is a well defined concept in Qt, that operates on any C++ range, which is a well defined concept in C++. QRangeModel is the best name. Future evolutions on this API, e.g. adding a C++ template class that provides an idiomatic C++ range API around the data while also updating the Qt model, are not expected to be problematic by using this name. [1] https://lists.qt-project.org/pipermail/development/2025-May/046322.html Change-Id: Idaa70f8b2a30754cb28da13a0e6b0e22334afa11 Reviewed-by: Artem Dyomin <[email protected]> Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Samuel Gaist <[email protected]>
* wasm: Fix stacking order problem for transient parent windowsEven Oscar Andersen2025-05-262-16/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows with a transient parent does not reflect the relationship in the stacking order. Essentially AboveTransientParent is missing as a configuration choice. What makes this slightly convoluted is that the window stack does not depend on the window (for testability). We solve this problem by making the stack and treenode templates, and provide test class as arguments when testing. QWasmWindow and QWasmScreen are not templated as before. There is also a new order type StayAboveTransientParent. Which means that we can no longer use order type to get to the group location (Since StayAboveTransientParent can map to either of the three types). The window stack tests have been updated to handle the StayAboveTransientParent type. Finally, we do not do anything with a normal parent child relationship as this should already work correctly. Fixes: QTBUG-131699 Change-Id: Ie08e18f9e0a2339175c4a09da0a831f031df71e1 Reviewed-by: Lorn Potter <[email protected]>
* QAbstractEventDispatcher: prevent too late unregistering of timersThiago Macieira2025-05-251-0/+21
| | | | | | | | | | | | | | | | | | | | | Timers can't unregister when the dispatcher object is no longer of a dispatcher type. It's too late even at ~QAbstractEventDispatcher, because unregisterTimer() is a pure virtual. To prevent their attempting to unregister, we set the thread's dispatcher to nullptr if it is this object. This has been a latent bug, so it's worth fixing. This started happening for me with an un-pushed change that changed the order of how QCoreApplication and QGuiApplication destroy the main thread event dispatcher (namely, in their destructors, not waiting for ~QObject to deleteChildren()). Drive-by relax the store in QThread::setEventDispatcher(). Fixes: QTBUG-137130 Pick-to: 6.9 6.8 Change-Id: I8845736c38a931af62e3fffdfd3554874df89e8e Reviewed-by: Volker Hilsheimer <[email protected]>
* Restructure android testsAlexey Edelev2025-05-245-1/+5
| | | | | Change-Id: I14bc0db28dcc928771b14a6854ba1c53d76461a7 Reviewed-by: Alexandru Croitor <[email protected]>
* qdataurl: make parsing the content-type more robustAhmad Samir2025-05-243-1/+27
| | | | | | | | | | | | | Don't assume `charset` is the first parameter. The parameters (attribute=value pairs) are delemited by a `;`. The order of the parameters isn't specified, (except for `;base64` which is the last one). Add more tests. Add a test for image/png (.png file copied from src/widgets/styles/images/arrow-down-16.png). Change-Id: Ie3e45c607c093695d0c180e9a9783b2b02d7ef70 Reviewed-by: Thiago Macieira <[email protected]>
* qdataurl: treat comma as mandatory in the data URL syntaxAhmad Samir2025-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | In the syntax specified in https://www.rfc-editor.org/rfc/rfc2397.html: data:[<mediatype>][;base64],<data> The comma isn't inside square brackets, so not optional. Change the unittests accordingly, "data:text/plain" isn't empty data, it's rather malformed. [ChangeLog][QtCore] Changed parsing 'data:' URLs to report failure if the comma is missing, this makes it more compliant with RFC 2397. [ChangeLog][QtNetwork][QNetworkManager] Changed parsing 'data:' URLs to report failure if the comma is missing, this makes it more compliant RFC 2397. Change-Id: I91c45f42257de7840ab45c0f8eb31b8df3d483bc Reviewed-by: Thiago Macieira <[email protected]>
* qdataurl: don't set the mime type too earlyAhmad Samir2025-05-241-2/+1
| | | | | | | | | If there is no actual data to decode, setting the mime type is redundant. Also only set the mime type to the default if none is specified in the URL. Change-Id: I19f7ae98c7f1f4483069f580bea028a84a719656 Reviewed-by: Thiago Macieira <[email protected]>
* Fix various compiler warningsAhmad Samir2025-05-244-4/+3
| | | | | | | | | | | tst_QDebug: variable is only used conditionally tst_QTimeZone: fix string literal format QRhiWidgetPrivate: unused local variable `q` Change-Id: I8f9d7f86df2ff781f8ab64bee44dbebbe67eb6f3 Reviewed-by: Thiago Macieira <[email protected]>
* tests/manual/*: add missing includesAhmad Samir2025-05-242-0/+2
| | | | | Change-Id: Id3abd673d22bd6365bec4688c41c0b57d7aabc0b Reviewed-by: Thiago Macieira <[email protected]>
* Lazily create global share context when Qt::AA_ShareOpenGLContexts is setTor Arne Vestbø2025-05-231-2/+10
| | | | | | | | | | | | | | The requirement to set Qt::AA_ShareOpenGLContexts before creating QGuiApp was forcing users to also set the default surface format before QGuiApp, which prevents us from initializing a default surface format based on the platform integration. By creating the global share context lazily when requested via the Qt::AA_ShareOpenGLContext application attribute we open up this possibility. Change-Id: I958639c997e96321013b1080c31e2533a36c13ff Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QFileSystemModel: Handle drive root paths properly on WindowsOliver Wolff2025-05-221-0/+35
| | | | | | | | | | | | | | | Fetching a node that was a drive root path (C:/) ended in a wrong result on Windows. Instead of the drive root the QFileSystemModel returned the current working directory. This was due to the fact that the code in QFileSystemModelPrivate::node stripped the /s from the "path elements". As "C:" (in contrast to "C:/") is seen as a relative path on Windows that lead to wrong results. Pick-to: 6.9 6.8 6.5 Fixes: QTBUG-133746 Change-Id: I642a67853f31ad9b6710e2b5f696f22b1f60ead3 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Miguel Costa <[email protected]>
* tst_QScopedPointer: add a test for reset/delete orderingMarc Mutz2025-05-221-0/+82
| | | | | | | | | | | | | | | | | We have implementation divergence with libc++'s ~unique_ptr() behavior, so make sure QScopedPointer behaves the same way as unique_ptr is spec'ed, even though to check it, one has to rely on UB, at least according to LLVM devs (I don't think the test as written invokes UB). Code's a bit duplicated. I tried making the struct a template, but it's just too much of a fuss (needs a variable template, which we can't use in Qt 5), so I decided to use cut'n'paste. Task-number: QTBUG-137069 Pick-to: 6.9 6.8 6.5 5.15 Change-Id: I8b55718eaf3c6ad9a4d89d4fc9d64f0c41bb21fa Reviewed-by: Ahmad Samir <[email protected]>
* Rename QDecompressHelper benchmarkAudun Sutterud2025-05-211-2/+2
| | | | | | | | | The convention is to start the benchmark names with the "tst_bench_" prefix. This makes it easier to detect the benchmark in tools, such as the Core Benchmarks Runner. Change-Id: I2dcebb6cef0aba4133c4135462e8d76387b776bf Reviewed-by: Mårten Nordheim <[email protected]>
* QString/QByteArray: add tests for replace() with negative lengthsAhmad Samir2025-05-202-0/+14
| | | | | Change-Id: I6bb67a65fdb0d61e1e1e36dd271c98df7849a305 Reviewed-by: Thiago Macieira <[email protected]>
* tst_QString: don't cast index/length to uint in replace() testsAhmad Samir2025-05-201-53/+136
| | | | | | | | | | | Most of QString's API take by signed values, so let the tests match reality. Also, as pointed out in the code review, use qsizetype instead of int. Pick-to: 6.9 6.8 6.5 Change-Id: I03cba8e35d080454506a35a956ad106fd9bb3246 Reviewed-by: Thiago Macieira <[email protected]>
* QWidget: don't re-polish when style did not changeChristian Ehrlicher2025-05-201-0/+32
| | | | | | | | | | | | Don't call style->unpolish()/polish() when the old and new style did not change which might happen when setting a style sheet as this might create an infinite loop and the style (re)sets some window attribute. Bailing out early is not an option here as newStyle might be a nullptr so q->style() will fall back to the application default style. Pick-to: 6.9 Fixes: QTBUG-133332 Change-Id: Ifa9ee4fdfa64b2768337e2d90b7bbaac5f3fcd70 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* QXmlStreamWriter: add option to stop writing after an errorMagdalena Stojek2025-05-201-0/+195
| | | | | | | | | | | | | | | | | | | By default, QXmlStreamWriter continues writing even after encountering an InvalidCharacter, EncodingError or CustomError, which contradicts expected behavior. This change introduces property stopWritingOnError with two new functions: setStopWritingOnError() and stopWritingOnError(), allowing users to control whether output halts immediately after the first such error. [ChangeLog][QtCore][QXmlStreamWriter] Added setStopWritingOnError() and stopWritingOnError() functions. Fixes: QTBUG-135861 Change-Id: Ia3ba894fc5bd8c5ff3a548e2585af9d435dec9b2 Reviewed-by: Safiyyah Moosa <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Android: Avoid deprecation warnings (Space-assignment syntax)Lars Schmertmann2025-05-201-3/+3
| | | | | | | | | Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Pick-to: 6.9 Change-Id: I2029af79b25351337c32db96053548ce5f4f47ae Reviewed-by: Assam Boudjelthia <[email protected]>
* tst_QDataUrl: add a test with spaces around the charset parameterMarc Mutz2025-05-201-0/+2
| | | | | | | | Requested by Ivan Solovev in review. Pick-to: 6.9 6.8 6.5 5.15 Change-Id: I2f3dee8aad16af6748faa7660e2508e8ecd1709f Reviewed-by: Ivan Solovev <[email protected]>
* tst_QByteArray: create separate tests for replace() overloadsAhmad Samir2025-05-201-42/+54
| | | | | Change-Id: I576230a3e130ddf8e0124a8a1174a99a64dc691e Reviewed-by: Thiago Macieira <[email protected]>