qt5base-lts/tests/auto/corelib
Stephen Kelly c3ad8c1c06 Make the roleNames a virtual accessor.
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>
2012-01-10 11:37:28 +01:00
..
animation Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
codecs Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
concurrent Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
global Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
io Update year in Nokia copyright headers. 2012-01-10 07:12:41 +01:00
itemmodels Make the roleNames a virtual accessor. 2012-01-10 11:37:28 +01:00
kernel Reimplement QVariant to QDebug streaming. 2012-01-10 09:13:11 +01:00
plugin Add V3(md5) and V5(sha1) version for DCE in QUuid 2012-01-10 05:12:20 +01:00
statemachine Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
thread Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
tools Avoid using 'check' in QSharedPointer test. 2012-01-09 19:04:57 +01:00
xml Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
corelib.pro Move QAbstractItemModel into a separate directory. 2011-12-13 02:23:42 +01:00