summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-2345-48/+48
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Define inverted QRects consistentlyAllan Sandfeld Jensen2020-09-211-35/+79
| | | | | | | | | | | | | | | | Changes the definition of invalid QRects to be more consistent. This simplifies the logic, and makes it possible for us to fix normalized() so dimensions don't change. The actual API is not changed except for inverted rects. Only one use-case for the old normalized() function existed, and has been reimplemented as QRect::span(). Fixes: QTBUG-22934 Change-Id: I29dad2952dc6c8e84a6d931898dc7e43d66780f3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove a leftover of qlinkedlist testSona Kurazyan2020-09-181-1148/+0
| | | | | | Change-Id: I5f64ef8fc6134e0670606771a48d6f392c0fa223 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Normalize roundingAllan Sandfeld Jensen2020-09-161-1/+1
| | | | | | | | Change the rounding of negative half values to match standard C++ round, this will also allow future optimizations. Change-Id: I8f8c71bed1f05891e82ea787c6bc284297de9c5c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Blacklist tst_QTimeLine::interpolation on Windows in generalMitch Curtis2020-09-151-1/+1
| | | | | | Task-number: QTBUG-61037 Change-Id: Ie44c7355e2aefbbd16cef95f1a093302bd789e45 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add qHash implementation for QPointMitch Curtis2020-09-151-0/+3
| | | | | | | | | [ChangeLog][QtCore][QPoint] Added qHash() implementation. Change-Id: I65332e7aafab53af40a6e11457b9b457196d584c Fixes: QTBUG-86457 Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-121-1/+1
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-114-5/+5
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix possible corner cases in qarraydataops.hAndrei Golubev2020-09-101-4/+217
| | | | | | | | | | | | | | | Updated moveNonPod function to behave correctly under exceptions being thrown. This is the version that was implemented at some point but then got changed prior to merge. Added tests for moveInGrowthDirection (which uses moveNonPod in general case) to verify that range movements are correctly done Updated QCommonArrayOps access modifier from private to protected to allow testing of internal stuff by subclassing Task-number: QTBUG-84320 Change-Id: Idb994a72ee601762e32248670cdc7819aaca0088 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make Q*ArrayOps erase aligned with std::vector::eraseAndrei Golubev2020-09-101-11/+7
| | | | | | | | | | | Scoped GrowsBackwards-optimized erase to only be applied when erase starts at the beginning of the element range. In other cases, old "left-shifting" erase is used to align with std::vector::erase invalidation policy Task-number: QTBUG-84320 Change-Id: I2e7f3b96b056bc371119eb2d36cc7c74af52c394 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess/Unix: introduce setChildProcessModifier()Thiago Macieira2020-09-081-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Source-Incompatible Changes] QProcess::setupChildProcess() was removed. To execute code in a child process, use QProcess::setChildProcessModifier() [ChangeLog][QtCore][QProcess] Added setChildProcessModifier() function with which one can provide code to be run in the Unix child process between fork() and execve(). With this function, it is no longer necessary to derive from QProcess in order to execute actions in the child process. Another reason is that we can tell whether the std::function carries a valid target much more easily than we can tell whether QProcess was overridden. The setupChildProcess() virtual function does not need to be marked final, since no overrider could ever return an inaccessible private class. This also makes sure the error presented to the user is about the return type, not about attempting to override a final. Clang: error: virtual function 'f' has a different return type ('void') than the function it overrides (which has return type 'QProcess::Use_setChildProcessModifier_Instead') GCC: error: conflicting return type specified for 'virtual void MyProcess::setupChildProcess()' note: overridden function is 'virtual QProcess::Use_setChildProcessModifier_Instead QProcess::setupChildProcess()' ICC: error: return type is neither identical to nor covariant with return type "QProcess::Use_setChildProcessModifier_Instead" of overridden virtual function "QProcess::setupChildProcess" MSVC is not relevant since it doesn't compile to Unix. Change-Id: Ia8b65350cd5d49debca9fffd15f801161363aea7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QWeakPointer: purge deprecated APIEdward Welbourne2020-08-311-196/+0
| | | | | | | | Since 5.0: assignment/construction from QObject pointer Since 5.14: data() to recover the packaged pointer Change-Id: I5d6ab561ce39bc0d9d3e5035eb2ca38139cd76b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Purge qalgorithm.h of deprecated APIEdward Welbourne2020-08-281-808/+1
| | | | | | | | | | | | | A large slice of it has been deprecated since 5.2. Reflowed a doc paragraph pointed out, in the deprecation commit, as having been left ragged by its edits. Note: qSwap() is documented as \deprecated but not marked, where it's defined, as deprecated. Change-Id: Iaff10ac0c4c38e5b85f10eca4eedeab861f09959 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support GrowsBackwards prepend in QListAndrei Golubev2020-08-271-8/+23
| | | | | | | | | | | | | Restored previously deleted logic of setting GrowsBackwards flag for prepend-like cases. This should be sufficient to fully enable prepend optimization Fixed QList::emplace to not use implementation detail logic. Updated tests to cover changed behavior and its correctness Task-number: QTBUG-84320 Change-Id: I4aadab0647fe436140b7bb5cf71309f6887e36ab Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add prepend optimization to QCommonArrayOpsAndrei Golubev2020-08-272-20/+261
| | | | | | | | | Introduced prepend optimization logic to QCommonArrayOps. Trying to rely on original QList behavior Task-number: QTBUG-84320 Change-Id: I46e6797b4edad804a3e3edb58307c9e96990fe01 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Support GrowsBackwards flag in QArrayDataPointerAndrei Golubev2020-08-272-21/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduced allocation function in QArrayDataPointer with interface similar to QArrayData::allocate that supports growing strategies. This func is used instead of the original in cases when prepend-aware storage is needed. Tried to follow Qt5 QList policy in terms of space reservation Updated QPodArrayOps::reallocate to be aware of growing shenanigans. It doesn't look like a perfect solution but it is rather close and similar to what Qt6 QList is doing when not growing (e.g. reserve/squeeze) Added initial QCommonArrayOps with helper function that tells when reallocation is preferable over just using the insert-like operation. This comes up later on when GrowsBackwards policy is properly supported in operations Essentially, 2/3 main data management blocks for prepend optimization are introduced here. The last one being a generalized data move that is done instead of reallocation when existing free space is not enough Task-number: QTBUG-84320 Change-Id: I9a2bac62ad600613a6d7c5348325e0e54aadb73d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup QTypeInfoLars Knoll2020-08-264-22/+25
| | | | | | | | | | | | | | | Remove QTypeInfo::isStatic, as that's not used anymore in Qt 6. Also remove sizeOf, it's unused, and we have QMetaType for that if required. Remove all typeinfo declaractions for trivial types, as the default template covers them correctly nowadays. Finally set up a better default for isPointer, and do some smaller cleanups all over the place. Change-Id: I6758ed37dfc701feaaf0ff105cc95e32da9f9c33 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLineF: Don't try calculating a unit vector when length is nullRobert Loehning2020-08-251-0/+11
| | | | | | | | | | It's undefined and causes a division by zero. Fixes: oss-fuzz-24561 Pick-to: 5.12 5.15 Change-Id: Idebaba4b286e3ab0ecb74825d203244958ce6aec Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-244-6/+5
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QStringRef and remains to Qt5CompatKarsten Heimrich2020-08-202-12/+2
| | | | | | | | | Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMultiMap: fix remove(Key, T) when key/value belong to the mapGiuseppe D'Angelo2020-08-191-0/+171
| | | | | | | | | | | | | | Just like any other container, it's legitimate for the user to pass key/values belonging to the same container. Q(Multi)Map::remove(Key) are already safe (either they call erase() directly on std::(multi)map, where it does the right thing, or they skip elements while detaching). However, QMultiMap::remove(Key, T) wasn't safe in this regard (the implementation is hand rolled), so take copies before start erasing. Change-Id: I87767d608b83216a6ff264fb6c8f145fdb5934f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QArrayDataPointer::freeSpace*() functionsAndrei Golubev2020-08-181-0/+39
| | | | | | | | | | | | | Added functions that tell how much free space is available at the beginning and at the end of the storage Updated preconditions of operations to use freeSpace* functions Also, changed casts uint(this->size) to size_t(this->size) Task-number: QTBUG-84320 Change-Id: Iad94c1060a00f62068da9d1327e332a00d4f4109 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Separate exception safety primitives from operationsAndrei Golubev2020-08-183-2/+613
| | | | | | | | | | | | | | | | | | | Refactored certain bits of qarraydataops.h: picked exception-related building blocks and put them into one place, (somewhat) documented the usage, added tests Personally, the existing code seemed rather complicated to analyze (and do mental experiments for corner cases), especially when staring at the whole thing for a while or "returning back" from some other work and I still have my doubts that everything works correctly. Testing the building blocks that are used should: a) increase trust into existing code (provided the usage is correct) b) give more use cases of how to use the building blocks, which in turn would allow to compare and contrast tests vs implementation Task-number: QTBUG-84320 Change-Id: I313a1d1817577507fe07a5b9b7d2c90b0969b490 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refine precoditions and logic of array operationsAndrei Golubev2020-08-181-4/+9
| | | | | | | | | | | | | | | | Updated insert() methods: * Refined Q_ASSERT() checks * Fixed implementation issues (some of which resulted in actual crashes) * Allowed to insert at the end. This is safe as far as I can tell and actually would allow to simplify considerable chunks of code (mainly, copyAppend versions to just return insert at the end) Updated tests accordingly Change-Id: I0ba33ae5034ce8d5ff95b753894e95d71ba00257 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extend array operations tests with extra casesAndrei Golubev2020-08-182-15/+481
| | | | | | | | | | | | | | | | | | Extended existing tests with QArrayData's allocation options Added extra tests on array operations covering append, insert, emplace, erase and truncate. "Raw" QArrayDataPointer is used instead of test-specific SimpleVector to check the behavior without some custom logic in-between The change targets future updates to array operations in the light of prepend optimization: as the array operations would become more complex, these tests should give a much better coverage (specifically due to likely non-trivial implementation details and optimizations) Task-number: QTBUG-84320 Change-Id: I6581e2cb48f81b82ee5052d1dcea3da2819df47a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-145-17/+17
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Another round of using noexcept instead of pre-C++11 definesAllan Sandfeld Jensen2020-08-131-19/+19
| | | | | | | A few new files were added with old-school defines. Change-Id: Ieb2c71e094e55102f3f39fb9551823f36863f5f4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QMap: fix insert() rvalue overloadsGiuseppe D'Angelo2020-08-061-0/+97
| | | | | | | | Receiving an rvalue still requires to check whether the parameter is detached, otherwise we can't steal its backing std::map. Change-Id: Ie88dbf39fd777112ad7bb20a46d5c2d65be8eb3d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long Live QMap as a refcounted std::map!Giuseppe D'Angelo2020-08-062-70/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and QMultiMap as std::multimap. Just use the implementation from the STL; we can't really claim that our code is much better than STL's, or does things any differently (de facto they're both red-black trees). Decouple QMultiMap from QMap, by making it NOT inherit from QMap any longer. This completes the deprecation started in 5.15: QMap now does not store duplicated keys any more. Something to establish is where to put the QExplictlySharedDataPointer replcement that is in there as an ad-hoc solution. There's a number of patches in-flight by Marc that try to introduce the same (or very similar) functionality. Miscellanea changes to the Q(Multi)Map code itself: * consistently use size_type instead of int; * pass iterators by value; * drop QT_STRICT_ITERATORS; * iterators implictly convert to const_iterators, and APIs take const_iterators; * iterators are just bidirectional and not random access; * added noexcept where it makes sense; * "inline" dropped (churn); * qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE); * operator== on Q(Multi)Map requires operator== on the key type (we're checking for equality, not equivalence!). Very few breakages occur in qtbase. [ChangeLog][Potentially Source-Incompatible Changes] QMap does not support multiple equivalent keys any more. Any related functionality has been removed from QMap, following the deprecation that happened in Qt 5.15. Use QMultiMap for this use case. [ChangeLog][Potentially Source-Incompatible Changes] QMap and QMultiMap iterators random-access API have been removed. Note that the iterators have always been just bidirectional; moving an iterator by N positions can still be achieved using std::next or std::advance, at the same cost as before (O(N)). [ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does not inherit from QMap any more. Amongst other things, this means that iterators on a QMultiMap now belong to the QMultiMap class (and not to the QMap class); new Java iterators have been added. Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QList: Add a append(QList &&) overloadMårten Nordheim2020-08-011-0/+195
| | | | | | | | We already had append(const QList &) and now there's an overload taking an rvalue reference. Change-Id: Id2fbc6c57badebebeee7b80d15bb333270fa4e19 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSharedPointer: do allow calling deleters on null pointersThiago Macieira2020-07-311-2/+31
| | | | | | | | | | | | | I don't know why std::shared_ptr allows this, but why not. [ChangeLog][Important Behavior Changes] QSharedPointer objects will now call custom deleters even when the pointer being tracked was null. This behavior is the same as std::shared_ptr. Fixes: QTBUG-85285 Pick-to: 5.15 Change-Id: I24006db8360041f598c5fffd161c260df0313b55 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QCryptographicHash: Add BLAKE2b and BLAKE2s hashing algorithmsLinus Jahn2020-07-311-0/+106
| | | | | | | | | | | | | | | | | | | | BLAKE2 does not specify requirements about specific hash sizes and since QCryptographicHash does not support dynamic hash sizes, only the most common hash sizes could be covered by this. The supported hash sizes were chosen to match the ones supported by the Linux kernel. The new hashing algorithms for QCryptographicHash are: * BLAKE2b (160 bit, 256 bit, 384 bit, 512 bit) * BLAKE2s (128 bit, 160 bit, 224 bit, 256 bit) [ChangeLog][QtCore][QCryptographicHash] Added BLAKE2b and BLAKE2s hashing algorithms. Fixes: QTBUG-78198 Change-Id: Id9e0180a974093982fdf1cdd6180988a2e5e9f4f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning when comparing qsizetype to size_tTor Arne Vestbø2020-07-291-1/+1
| | | | | Change-Id: I4ea7ccb4daf05c735c831964f94c120d179521dd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix warnings about unused expression results in testsTor Arne Vestbø2020-07-292-8/+8
| | | | | Change-Id: I401ec8a3742a5bb51a1b8b291c53395c3880117c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix warnings about unused members in testsTor Arne Vestbø2020-07-292-4/+4
| | | | | Change-Id: I741cf08c26f8a2e297926cc01968ff09e70462a2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Disable deprecation warnings in some testsTor Arne Vestbø2020-07-292-0/+3
| | | | | | | | The tests are testing deprecated functionality, which we still want to test. Change-Id: Iad6ed35800896170c17fe019c7a6ecda22398ac3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLine: purge deprecated APIEdward Welbourne2020-07-271-64/+1
| | | | | | | | Since 5.14: intersect(), angle(). Also removed definition of M_2PI from test, since its last use was in the tests being removed. Change-Id: Ie3a12247e3760e8bfdd3a659cd06245c86b198c2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix warnings about unused variables and functions in testsTor Arne Vestbø2020-07-262-19/+1
| | | | | Change-Id: Ia758a91384083c13fb4d743f500fef7a6629dfd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable warning about self-move and self-assign-overloadTor Arne Vestbø2020-07-262-0/+12
| | | | | Change-Id: I1d20d3f424eced5cc5787934663b9d243f75d46e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QLine: use qmath.h's constants instead of local versionsEdward Welbourne2020-07-211-15/+9
| | | | | Change-Id: I41313f7e7caf3c364ae900a0b100c661aafb290d Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QCommandLineOption: purge deprecated APIEdward Welbourne2020-07-201-6/+0
| | | | | | | | Since 5.8: setHidden(), isHidden() Part of the QCommandLineParser test also used setHidden(). Change-Id: I05a1c63ff3beb1167ed75632c1b71d7fff17f09e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QTimeLine's curveShape in favor of its easingCurveEdward Welbourne2020-07-161-11/+11
| | | | | | | | | | | | | | QEasingCurve has a richer variety of curves and curveShape was already implemented by changing the easingCurve property. [ChangeLog][QtCore][QTimeLine] Deprecated QTimeLine's curveShape property in favor of the easingCurve property. Pick-to: 5.15 Change-Id: I7261c0f24d7e02bc94624f0b74d699df62de1a52 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Tests: Use QVERIFY instead of QCOMPARE for empty listsFriedemann Kleint2020-07-101-1/+1
| | | | | | Pick-to: 5.15 Change-Id: I4da02fa11583eca3844bf42efcdf818b8bbd6a94 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CMake: Regenerate subdir test projectsAlexandru Croitor2020-07-092-2/+2
| | | | | | | | And generate a few more test projects that were missing. Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-0932-32/+32
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate testsAlexandru Croitor2020-07-091-2/+2
| | | | | | | | This is in preparation for regenerating them with the new qt_foo prefixed APIs. Change-Id: Iff34932d642b1c0186ee39f952adf3ad367fd602 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-072-7/+7
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in corelib testsJarek Kobus2020-07-0710-230/+198
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add support for first(n), last(n) and sliced() to QListLars Knoll2020-07-061-0/+30
| | | | | | | | | This keeps the API symmetric with what we have in our string classes. Change-Id: I94c5b39b718ca2472f9ca645e7a42e4314636f67 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of QArrayData::sharedNull()Lars Knoll2020-07-062-76/+13
| | | | | | | | Remove the last places where those got used and avoid allocations when we resize to 0. Change-Id: Ib553f4e7ce7cc24c31da15a55a86d18bdf1cc5c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>