summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* QCache: when overwriting, store the new cost instead of the deltaMårten Nordheim2021-01-141-1/+2
| | | | | | | | | | | The delta was clearly intended to be used on the total (and still is) but it also wound up getting stored in the cache, which wouldn't be a big problem unless the object was removed, in which case we could incidentally 'free up more space' than intended. Pick-to: 6.0 Change-Id: Ib2b0f072d30da6d16a93dce60e4c5f6080c109fc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Mark places where we missed conversion to unicode character typesEdward Welbourne2021-01-081-0/+1
| | | | | | | | | | | We should use char32_t for the toUcs4() methods of QString and QStringView and use char16_t for QString::utf16(), thereby matching QStringView. These naturally imply knock-on changes in various places. Unfortunately, we didn't make those changes in Qt 6, so they'll have to wait for Qt 7. Change-Id: I18451d4b31b76658092e19d3fcbc8bc0fe5ce307 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-116/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Improve QMap, QMultiMap descriptionKai Köhne2021-01-062-4/+2
| | | | | | | | | | | | | Make it clear that the fast lookup is by key, not by value. See also discussion in https://forum.qt.io/topic/121907/misleading-documentation-of-qhash-qmap/ Pick-to: 5.15 6.0 Change-Id: I396297e0e4674e0a1f889f4138ab52ff224c0ee2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix QMultiHash::equal_range crashesZhang Yu2021-01-061-0/+3
| | | | | | | | | | | | QMultiHash::equal_range crashes when called in a const member function. The Data `d` is a NULL pointer when calling equal_range() before inserting data into an empty QMultiHash. Then calling`d->find` crashes. Fixes: QTBUG-89687 Pick-to: 6.0 Change-Id: I10c3d196cbc72aed8c8c922ef16534bba51037b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Change QLineF::setLength() to work whenever length() is non-zeroEdward Welbourne2021-01-052-11/+11
| | | | | | | | | | | | | | | | Previously it only worked when isNull() was false, which is true for very short lines, even though length() may be non-zero. [ChangeLog][QtCore][QLineF] QLineF::setLength() will now set the length if the line's length() is non-zero. Previously, it was documented to only set the length if isNull() was false; this is a fuzzy check, so isNull() could be true for a line with non-zero length(). Fixes: QTBUG-89569 Pick-to: 6.0 5.15 Change-Id: I803e622ad09c85815dde25df8dd3ba6dfcba0714 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash on reallocateAndGrowMichal Klocek2020-12-211-1/+1
| | | | | | | | | | | | | | | | | | After 6be398 few tests fail/crash with qtcharts. Fix issue on reallocateAndGraw and avoid accessing flags on invalid header. Data::allocate can return invalid header and dataptr, which takes place if capacity is 0. In code before 6be398 clone method checks if header is not null before resetting flags. However after b76fbb4 resetting flags is no longer needed since it is done in allocateGrow. Task-number: QTBUG-89092 Pick-to: 6.0 Change-Id: I2fde781dad7a0694a5f17ab716f647c2e35f4ff0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QCache: fix updating entries breaking the internal chainMårten Nordheim2020-12-161-4/+5
| | | | | | | | | | | | | | After f08492c6fd9818c7d80b1725355453e179b4d85b was merged this bug would manifest as an entry appearing twice in the chain when a updating an existing entry (insert with an existing key). This could sometimes result in crashes later as the list filled up and the list was used in trim() to remove various entries. Fixes: QTBUG-89176 Pick-to: 6.0 Change-Id: Ide80160fb4317dc0aefe79eec5dce7ec6813e790 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList docs: lexicographical -> lexicalIvan Solovev2020-12-111-4/+4
| | | | | | | | | | | | | | | Lexicographical is not the right word for the comparison description. Other classes use the term "lexical", so QList is updated in that way too. The link to cppreference is left, because QList actually uses std::lexicographical_compare, so it's completely valid here. Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I37bd3a92c5a3f857266e9c483d14e64eb90ce2c7 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QList: update docsIvan Solovev2020-12-081-40/+48
| | | | | | | | | | | Update some wording to align with QString and QByteArray documentation Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I8162769c1a5fc94fc8920ad0d4d91e95fe74825f Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QString/QByteArray: add missing Q_CHECK_PTRThiago Macieira2020-12-042-0/+5
| | | | | | | | | | | | | | So these two classes throw when trying to allocate silly sizes or in OOM conditions. We probably want to move these Q_CHECK_POINTER into QTypedArrayData but I didn't want to do that in this commit. Task-number: QTBUG-88256 Task-number: QTBUG-88253 Change-Id: Ifc61bb80b9bf48a386abfffd1648176111770174 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use (new) erase()/erase_if() algorithmsMarc Mutz2020-12-051-2/+1
| | | | | Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Sequential containers: make removeIf/erase_if not detach unless neededGiuseppe D'Angelo2020-12-041-2/+10
| | | | | | | | Employ the same kind of optimization existing for removeAll/erase. Change-Id: I0781cc02d4430ceab60e6e50a5ffe6fde87be9ce Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: make an indirect inclusion directGiuseppe D'Angelo2020-12-041-0/+1
| | | | | Change-Id: Ief36ac375f5c26b4a5de6bc18ee3f2f777051024 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a qHashEquals() method and use it to compare keys in QHashLars Knoll2020-12-043-1/+22
| | | | | | | | | | | | | | | In some cases, the default equality operator for a class is not suitable for using in hashing (for example because it uses fuzzy comparisons). Add a qHashEquals() method that by default uses the equality operator, but allows to tailor the operations that should be used when using the class as a key in QHash. Task-number: QTBUG-88966 Change-Id: I346cf0e6e923277a8b42a79e50342a1c2511fd80 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 5d8b586e73e37070b0303bee24372550854637eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QHash: default the argument for the hash calculator helperGiuseppe D'Angelo2020-12-031-1/+1
| | | | | | | Just to be consistent with everything else. Change-Id: I48ceb4bbc1cbf65b03caee77b7405cb585793248 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDuplicateTracker: allow usage of qHashGiuseppe D'Angelo2020-12-031-1/+9
| | | | | | | | | | The codepath using unordered_set forced the usage of std::hash, which isn't provided by many Qt types. Instead, use the brand new helpers in QHash that dispatch to qHash with a fallback on std::hash. Change-Id: I9185fe9c52de05c470afe7466007591977e65bb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QSet::insert documentationAndreas Buhr2020-12-021-1/+1
| | | | | | | | | | | Documentation for QSet::insert was wrong, leading the warning qset.qdoc:510: (qdoc) warning: clang couldn't find function when parsing \fn iterator QSet::insert(const_iterator it, const T &value) This patch fixes it. Task-number: QTBUG-88533 Change-Id: I587cbae5674b9f38e37753a20c3c3f0d770980d6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Document QMultiHash::clear functionAndreas Buhr2020-12-021-0/+9
| | | | | | | | | | | When QMultiHash derived from QHash, it inherited the clear function and no separate documentation was necessary. Now, QMultiHash::clear needs its own documentation. This patch adds it. Task-number: 88533 Pick-to: 6.0 Change-Id: I93c59b66aa3d8ccf1888b6e24a4cc47004318e37 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Associative containers: add erase_ifGiuseppe D'Angelo2020-12-026-0/+214
| | | | | | | | | | | | | | | | | | | | Use a trick similar to the one we use for their ranged constructors: support predicates that either take a container's iterator, or that take a std::pair (for STL compatibility). [ChangeLog][QtCore][QMap] Added removeIf() and erase_if(). [ChangeLog][QtCore][QMultiMap] Added removeIf() and erase_if(). [ChangeLog][QtCore][QHash] Added removeIf() and erase_if(). [ChangeLog][QtCore][QMultiHash] Added removeIf() and erase_if(). Change-Id: Ie40aadf6217d7a4126a626c390d530812ebcf020 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDuplicateTracker: remove the appendTo && overloadMårten Nordheim2020-12-021-8/+1
| | | | | | | | | | | As a requirement for unordered_set (and QSet) both "iterator" and "const_iterator" are const, so we cannot reassign or move the key. That means this overload is no different to the const & overload, so we can just remove it. Pick-to: 6.0 Change-Id: Ia14dccf7f610967649bab38161ce6d963509316b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSet: add insert(T&&)Mårten Nordheim2020-12-021-1/+3
| | | | | | | | | | | | | | We already have all we need in QHash to support this, so the addition is simple enough. Add test checking how many copies and/or moves are needed for a single insert. As a drive-by: remove some unneeded static_cast Change-Id: Iaf768657644afa45f78f5c81ffcf89ba9607be96 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList docs: extend prepend() descriptionIvan Solovev2020-12-021-5/+6
| | | | | | | | | | | | Current description was confronting the general description of the class, which states that prepend() is fast. The updated description gives more information about the method's behavior in different conditions. Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I7b6dfb536d143d78c441214f83320c1bf1263e0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSet: add erase_ifGiuseppe D'Angelo2020-12-013-0/+38
| | | | | | | | | [ChangeLog][QtCore][QSet] Added erase_if() for consistent container erasure. Added removeIf() as a method. Change-Id: I4af57b654036aa08bee3f769ab2f60be37115094 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Sequential general purpose containers: add erase/erase_ifGiuseppe D'Angelo2020-12-015-22/+187
| | | | | | | | | | | | | | | | | | | | This is refactor/revisit for Qt 6 of the original commit [1] by Marc, limited to QList and QVLA. [1] see 11aa9a2276ba5367adbbd96d0ba13111d58145f8 [ChangeLog][QtCore][QList] Added erase() and erase_if(), for consistent container erasure. Added removeIf() as a method, complementing removeOne() / removeAll(). [ChangeLog][QtCore][QVarLengthArray] Added erase() and erase_if(), for consistent container erasure. Added removeIf() as a method, complementing removeOne() / removeAll(). Change-Id: I2499504e221431ead754dd64cc8a4d4e9f116183 Done-by: Marc Mutz Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMap: code tidiesGiuseppe D'Angelo2020-12-011-22/+22
| | | | | Change-Id: I3a88cb2d307a44022df6d6045d99acfc9b1a1a0e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Silence code checker warningsLars Knoll2020-12-011-2/+3
| | | | | | | Pick-to: 6.0 Change-Id: I8bd8d830ade3e194f423e00f180c50b176a8adc8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Optimize code in QTaggedPointerLars Knoll2020-11-301-6/+5
| | | | | | | | | | | | | | | Don't execute instructions that will never do anything. Directly add the tag to the pointer in the constructor to avoid additional masking operations, and avoid a masking op that is in practice a no-op in setTag(). Do the same optimization in QTagPreservingPointerToPointer. Change-Id: Ia364f89cbe6ccc876ec9bda0c239fc4f57c10501 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2721728c9056b442c0281f20792f19eb6a491aa0) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix various documentation warningsTopi Reinio2020-11-302-10/+8
| | | | | | | | | | | | | - QList iterators are now nested classes inside QList. - Drop reference to Qt OpenGL Widgets landing page, there is no such page. - Fix typos and linking issues. Fixes: QTBUG-86295 Pick-to: 6.0 Change-Id: I964843deb81aa55ff8ddb9a1c2b004cb72e68de9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QHash: support std::hash as hashing functionGiuseppe D'Angelo2020-11-302-12/+74
| | | | | | | | | | | | | | | | | | | | In addition (and as a fallback) from requiring qHash, add support for std::hash specializations. This catches two birds with one stone: 1) users of Qt can simply specialize std::hash for their datatypes, and use them in both QHash and stdlib unordered associative containers; 2) we get QHash support for any (stdlib) datatype that is hashable without having to overload qHash for them. [ChangeLog][QtCore][QHash] QHash, QMultiHash and QSet now support for key types anything that can be hashed via std::hash, instead of always requiring a qHash() overload. Change-Id: Ib5ecba86e4b376d318389500bd24883ac6534c5f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Seedless qHash catch-all: make it SFINAE-friendlyGiuseppe D'Angelo2020-11-301-2/+10
| | | | | | | | | | | | | | | | | To support qHash overloads without a seed we have a qHash(T, size_t) catch-all that calls qHash(T) and XORs the seed. The problem is that this catch-all is not SFINAE friendly. For a type Foo which does not have any qHash overload, we can't ask if qHash(Foo, size_t) is callable because it would instantiate the catch-all and fail to compile. Add a suitable trait and enable_if. Pick-to: 6.0 Change-Id: Idffd48a537eebaf77cee7030b8d91a302643ffde Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-3010-18/+18
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QCache: Fix crash observed in tst_QAccessibilityFabian Kosmale2020-11-271-1/+1
| | | | | | | | | | | | | | | Fixes a use-after-free which can reliably be observed under ASAN. In QConfFileSettingsPrivate::~QConfFileSettingsPrivate we call unusedCache->insert(conf_file->name, conf_file, ...) Note that the key is a member of the object. Thus by deleting the object before using the key, we dereference a dangling pointer. Amends f08492c6fd9818c7d80b1725355453e179b4d85b. Change-Id: I3a550fc73446b72dd46456232e85f6d206d64c01 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 5283ee71040dc2f3a762e9cc5e807fb17587e9b7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QVLA: modernize some codeGiuseppe D'Angelo2020-11-261-25/+16
| | | | | | | | | | Use if constexpr instead of plain if; use C++17 algorithms instead of hand-rolled loops. Change-Id: Ifa092f892199b9b21bad04b2d72d5e3117a1b377 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QVLA: always use new to create new objectsGiuseppe D'Angelo2020-11-261-14/+3
| | | | | | | | | | | Even for non-complex types, it makes no sense to use the assignment operator instead of placement new when constructing new objects. Pick-to: 6.0 5.15 Change-Id: I5f15fe4b3397cf52d1d35e6c4dcc513b94b3cf14 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove deprecated algorithms from documentationMarcel Krems2020-11-261-19/+4
| | | | | Change-Id: Ie1eff48696c62ed23fedda1a9e711aeb8264432f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QSet: add missing insert-with-hintMarc Mutz2020-11-252-0/+19
| | | | | | | | | | | | | Since QHash is missing the overload, too, just ignore the hint for now, but provide the STL-compatible signature so generic code can use QSet as a normal sequential container. [ChangeLog][QtCore][QSet] Added insert() overload taking an insertion hint, for STL compatibility. Change-Id: I9fe41877343ebff721b650fb7b9cd4e06b6608d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QMargins(F): add support for structured bindingGiuseppe D'Angelo2020-11-221-0/+60
| | | | | | | | | | | [ChangeLog][QtCore][QMargins] QMargins is usable in a structured binding. [ChangeLog][QtCore][QMarginsF] QMarginsF is usable in a structured binding. Change-Id: I0c501847b9377c47bd0e63da3735792075bd0079 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCache: fix accidental pessimizationMårten Nordheim2020-11-211-2/+1
| | | | | | | | | | | By unconditionally removing the existing entry we never hit the if (result.initialized) branch. Change it to only remove the existing entry if we don't plan on inserting. Task-number: QTBUG-88183 Pick-to: 6.0 6.0.0 Change-Id: If4e7ebac23aa63d4b9d4b0a22882dd7d90a58e8b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPoint(F): add support for structured bindingGiuseppe D'Angelo2020-11-201-0/+44
| | | | | | | | | | | | | | | QPoint(F) are "naturally" destructurable in their x/y counterparts (hello Mac/Carbon users, we don't live in 1999 any more, it's x and then y, and not vice versa...). [ChangeLog][QtCore][QPoint] QPoint is usable in a structured binding. [ChangeLog][QtCore][QPointF] QPointF is usable in a structured binding. Change-Id: I8718a4e80be4ce03f37f012034f1fba009304b32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QScopedPointer: streamline code with qExchangeGiuseppe D'Angelo2020-11-201-4/+2
| | | | | Change-Id: I88059d2c484fa2762ec0fc526d81db543043b58b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QScopedPointer helper deletes: add operator()Giuseppe D'Angelo2020-11-201-3/+13
| | | | | | | | | | To make them compatible with unique_ptr. Drive-by, * add missing noexcept * turn a `if (p) free(p)` into just `free(p)`. Change-Id: I234dad6f6b953202dbc537875b94f653a09910fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QScopedSharedPointerGiuseppe D'Angelo2020-11-202-149/+0
| | | | | | | It's private and unused since ~2012. Change-Id: Iea11af27f7eebf3eae2467b22b68cd4c26885edd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate QScopedPointer::take()Giuseppe D'Angelo2020-11-202-0/+5
| | | | | | | | | | | | | | | | | | | We've decided that QScopedPointer shouldn't be movable, because it would break the semantics of being "scoped" (the pointer/pointee won't survive the scope). Then, QScopedPointer shouldn't allow for take() either. If you need those semantics, reach for unique_ptr. [ChangeLog][QtCore][QScopedPointer] The take() function has been deprecated. This was an API mistake, as it allowed the pointer/pointee to escape from the scope, defeating the point of the QScopedPointer class. If you need such semantics, use std::unique_ptr (and call release()). Change-Id: I3236f085f763b04eb98e3242abc06f7c54fb3d8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of Q_COMPILER_CONSTEXPR checksAllan Sandfeld Jensen2020-11-171-2/+0
| | | | | | | Is required now. Change-Id: I62e95929d1649ea1390392230b619bd56d2a0349 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't initialize POD types with memset(0)Lars Knoll2020-11-171-2/+4
| | | | | | | | | This is dangerous as at least pointers to member objects/data are not always zero initialized. Change-Id: I1250e101ab73cd816694315fc9130f4d486b9feb Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move the iterator from QTypedArrayData to QListLars Knoll2020-11-174-96/+85
| | | | | | | | | | The low level implementation does not use it at all, so there's no point having the iterator in QTypedArrayData. Having it in QList removes and indirection and will lead to clearer error messages. Change-Id: I4af270c3cdb39620e5e52e835eb8fe1aa659e038 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove unused methodLars Knoll2020-11-171-22/+0
| | | | | | Change-Id: I22738a3d5f1ad3dc4e5f542f4102dfac0491a241 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up QList(iterator, iterator)Lars Knoll2020-11-172-17/+16
| | | | | | | | | | Fold the two overloads into one, and distinguish the cases using if constexpr. Do not overload QArrayOps::copyAppend(), to make it clear which one is being used. Change-Id: If6a894841aacb84ba190fb2209246f5f61034b42 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Only export the non inline methods of QArrayDataLars Knoll2020-11-171-6/+6
| | | | | | Change-Id: I4a66fd13ee3e6b4ceb3f5d58de4a44aa394b9e0e Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>