summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qidentityproxymodel_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QIdentityProxyModel: add setHandleSourceLayoutChanges(bool)Ahmad Samir2023-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Some sub-classes have special handling of source model layout changes (abbreviated as SMLC from here on out), they relied on disconnecting the connections to the _q_*layout* slots in the private class using the SLOT macro. This isn't possible any more after recent changes (and the method were renamed to remove _q_ prefix). Sub-classes resorting to using private API is a clear sign some functionality is missing from the public API, so a cleaner solution for this issue is adding this setter which enables sub-classes to tell QIdentityProxyModel to leave handling of the SMLC to them. Thanks to David Faure for the idea/solution. [ChangeLog][QtCore][QIdentityProxyModel] Added setHandleSourceLayoutChanges(bool) method to allow sub-classes to indicate to QIdentityProxyModel that they will handle source model layout changes on their own. Also added a getter, isHandleSourceLayoutChanges(). Change-Id: I1de79dd693ce32a6e2df9a7c81dd4abdc5f00248 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QIdentityProxyModel: store connection handles in a containerAhmad Samir2023-12-151-21/+30
| | | | | | | | | | | | | | | | | | | | | Port to PMF signal/slot syntax: compile-time type checking vs. run-time string-based search. Given how many connections are made, this is both safer and more readable. Drop the _q_ prefix from method names, it was needed since Q_PRIVATE_SLOT() was used for those methods. Use QVLA since we know the size at compile time, (not a std::array like other changes because some elements in the std::initializer_list are going to be split out, so using a container with a push_back() is simpler than fiddling with indexes to use operator[], see next commit in this chain for details). This is similar to c609b8dba0ae43aeba142164684536f808aad501, so a similar performance improvement is expected. Change-Id: Ia7e7d0b1f3c1a95bc399bd06de3b5c96e845b34d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add "We mean it" warning to qidentityproxymodel_p.hMitch Curtis2021-06-141-0/+12
| | | | | | | | This was missed in b42e2d70fbda5afb462b869583b925ad5f1a5480. Pick-to: 6.2 Change-Id: Id06bd880456534293cf6c0d215f794b6ad0552ca Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move QIdentityProxyModelPrivate out into its own headerMitch Curtis2021-06-011-0/+86
qtquickcontrols2 needs to use it. Change-Id: Ic5e3105095a8fcd36a38a3ce4353db4057ada0de Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>