summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-23/+25
| | | | | | | | | | | | 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>
* Document that the order of results from QAIM::match are not relevant.Stephen Kelly2012-04-041-1/+3
| | | | | | | This will allow fixing of QTBUG-10160 in Qt 5.1. Change-Id: I1ea7579cb4227f9940847c62d5a520c7cee3b0c5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix copy/paste error in QAbstractItemModel::insertRow docu.David Faure2012-03-091-3/+2
| | | | | | | This method is not virtual. Change-Id: I1c82a63af07d7e78e7a572c0dfcfb2b82122d421 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-41/+41
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove use of Q_BROKEN_DEBUG_STREAM.Stephen Kelly2012-02-221-6/+0
| | | | | | | | No supported compiler defines it, and it was not used consistently so it didn't work anyway. Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QAbstractItemModel documentationGiuseppe D'Angelo2012-02-031-0/+1
| | | | | | | | Commit 20abd88e711a2dfcbe07925f8902faa45e5110e2 refactored the supportedDragActions methods, this oneliner adds the necessary \fn. Change-Id: I373b039138e1cbfe0f28a0aa9eb3b65245f2132d Reviewed-by: David Faure <david.faure@kdab.com>
* qabstractitemmodel.cpp: Fix warnings.Friedemann Kleint2012-02-011-0/+5
| | | | | | Change-Id: I10ef89e2fab31c7f1c9ac67b2234f509fb3f28ab Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add the QAbstractItemModel::canDropMimeData method.Stephen Kelly2012-01-301-1/+18
| | | | | | | | | | | Can be used by views to indicate whether a drop is allowed (eg adequete permissions in a filesystem model). Change-Id: Iefedb5399e44c8edc5f5df1403c8d5c0da618612 Reviewed-by: Peter Penz <peter.penz19@gmail.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Document where modelReset() is emittedSimon A. Eugster2012-01-251-2/+17
| | | | | | | | | | | The resetModel() signal indicates that the model is reset. Previously there was no note that the signal is emitted also when endResetModel() is called. Task-number: QTBUG-23755 Change-Id: I6c3c1ccef580e9c1112c3af79912cffca675e140 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Deprecate QAbstractItemModel::reset().Stephen Kelly2012-01-241-7/+2
| | | | | | | | | | | | | | | | | | | It is broken in most uses because it emits modelAboutToBeReset() after actually resetting the internal data instead of before. That is, usually it is used like this: myData.clear(); reset(); Which should be beginResetModel(); myData.clear(); endResetModel(); Change-Id: I7b00a1e40c4915930944340764074efc29faaf5a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* add missing move* methods to QAbstractItemModelMark Brand2012-01-241-0/+42
| | | | | | | | | | | | | | The existence of QAbstractItemModel virtual methods moveRow, moveColumn, moveRows, and moveColumns is implied by the existence of beginMoveRows, endMoveRows, beginMoveColumns and endMoveColumns. However, these were not actually provided by QAbstractItemModel. With this change, subclasses can implement support for moving rows and columns following the same pattern as for insert* and remove*. Change-Id: Iad8b2223d4b9303abb6459c174a82ffed71a0fdf Reviewed-by: Stephen Kelly <stephen.kelly@kdab.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>
* Clarify docs that everything must be re-queried on model reset.Stephen Kelly2012-01-161-3/+6
| | | | | Change-Id: I05970302d4f52d092a7c65a45b9e5a3570b1d144 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make the supportedDragActions a virtual accessor.Stephen Kelly2012-01-101-6/+10
| | | | | | | Change-Id: I4001fcabc67e5b46465b3c9111c33247c52e5788 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Make the roleNames a virtual accessor.Stephen Kelly2012-01-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This is consistent with the rest of the API of QAbstractItemModel (which is virtual) and removes the need for code like this in the constructor (where it doesn't belong): QHash<int, QByteArray> myRoleNames = roleNames(); myRoleNames.insert(Qt::UserRole + 1, "myCustomRole"); setRoleNames(myRoleNames); in favor of MyModel::roleNames() const { QHash<int, QByteArray> myRoleNames = QAbstractItemModel::roleNames(); myRoleNames.insert(Qt::UserRole + 1, "myCustomRole"); return myRoleNames; } which is consistent with all other QAIM API (eg, flags()). This is a source compatible change. Change-Id: I7e1ce17f8dab2292c4c7b6dbd3c09ec71b5c793b Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove misleading and incorrect information from dropMimeData docs.Stephen Kelly2011-12-211-7/+8
| | | | | | | | It is not the responsibility of the view to insert data into the model after a dropMimeData call. Change-Id: Ib2dedddb3239af0e2bf722a28081c68677e6b2af Reviewed-by: David Faure <faure@kde.org>
* Move QAbstractItemModel into a separate directory.Stephen Kelly2011-12-131-0/+3454
Change-Id: Ib505520dd5b52743634befbf3f148d7f8c21ec44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>