summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
Commit message (Collapse)AuthorAgeFilesLines
* Make the supportedDragActions a virtual accessor.Stephen Kelly2012-01-102-8/+18
| | | | | | | 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-102-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-0513-13/+13
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change the default value of QSortFilterProxyModel::dynamicSortFilterStephen Kelly2012-01-021-3/+3
| | | | | | | | | | The value is changed to true. It is a common bug that developers expect this proxy model to reflect the source model when the source changes. That requires setDynamicSortFilter(true), so we change the default to optimize for the common case. Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* QSortFilterProxyModel: Fix warnings about unused variables.Friedemann Kleint2011-12-161-4/+4
| | | | | | | | | Introduced by 4ebceaba394e54a4f43578e46839e3057e7e802d. Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Change-Id: I81985c4121db5f6abd832f64ef412646daec6259 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move proxy and selection models to QtCore.Stephen Kelly2011-12-1613-2/+6608
| | | | | | Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move QAbstractItemModel into a separate directory.Stephen Kelly2011-12-134-0/+4050
Change-Id: Ib505520dd5b52743634befbf3f148d7f8c21ec44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>