summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qidentityproxymodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtCore: eradicate all Q_FOREACH loops [itemmodels]Marc Mutz2016-01-041-3/+4
| | | | | | | | Saves more than 4KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Ice3fe915622a399d1ed10e0ce364cf54b4b835fe Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* core: Add several QList::reserve() calls.Sérgio Martins2015-06-111-0/+3
| | | | | | | Reduces reallocations. Change-Id: Ib63539fb690a80245d8fe81ff8468e79ffa8e57c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QIdentityProxyModel: remove slow bounds-checking, for more performanceDavid Faure2014-10-311-3/+0
| | | | | | | | | | | | | | If we're called out of bounds, sourceModel()->index() will take care of returning an invalid model index anyway. So calling rowCount+columnCount every time index() is called can be avoided. These calls can be particularly slow when sitting on top of a stack of proxymodels. And index() itself is called very often, i.e. when a proxymodel on top of us is used by a delegate which calls data() for many different roles. Change-Id: I45ad6249ea6c6c719a28d25a03b6e5003f4e49ee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Forward the 3rd parameter of dataChangedAlbert Astals Cid2013-02-211-7/+7
| | | | | Change-Id: I94f893bf65cd150c3cb1099c91cb13882bcca79a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QIdentityProxyModel: fix sibling() reimplementationMark Brand2012-11-021-1/+1
| | | | | | | | | | | The previously missing mapFromSource() sets the proxy model in the returned index. Otherwise, the returned index refers incorrectly to the source model. Follow-up to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22. Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add implementations of QAIM::sibling in public APIs.Stephen Kelly2012-11-021-0/+9
| | | | | | Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Process and forward the layout change hint through the QIdentityProxyModel.Stephen Kelly2012-09-301-14/+38
| | | | | Change-Id: I074c75080b7e74c44fc833c207d297723e5f6e06 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-23/+23
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-1/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Make the "\internal" qdoc command stand on its own lineLaszlo Papp2012-08-151-1/+2
| | | | | | | | | | The qdoc manual currently claims that the command must stand on its own line. The change follows the consistency with the rest and how the example looks like inside the qdoc manual for this command. Change-Id: I6b653dc95cf9d84e4adf32220dace5d313678419 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Normalize signal/slots.Sergio Martins2012-07-171-52/+52
| | | | | | Change-Id: I0a0f497ece081a430437adc2959deb247defcde9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-1/+1
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Disconnect slots from the old sourcemodel in QIdentityProxyModelkb2012-03-141-40/+40
| | | | | | | | | | | | | When setting a new sourcemodel QIdentityProxyModel::setSourceModel tries to disconnect from signals belonging to the NEW model instead of from the existing sourceModel(). QIdentityProxyModel thus receives signals from both the old model(s) and the new model. This results in ASSERTS triggering in various slots, for example: "Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true);" in QIdentityProxyModelPrivate::_q_sourceDataChanged. Change-Id: Ic6f65a9ee10981d00206335f2edef78272fadc1a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Reimplement QIdentityProxyModel::headerData().Sergio Martins2012-02-031-0/+9
| | | | | | | | The one in the base class is slower due to parent<->source mappings. Change-Id: Ib0b337ef5d4b5b8cd9f6e1d7c5c19a770b53e0e8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move proxy and selection models to QtCore.Stephen Kelly2011-12-161-0/+578
Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>