qt5base-lts/tests/auto
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
..
bic Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
compilerwarnings/data Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
corelib Make the roleNames a virtual accessor. 2012-01-10 11:37:28 +01:00
dbus Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
gui Update year in Nokia copyright headers. 2012-01-10 07:12:41 +01:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
network Remove the unused QTRY_COMPARE macro from bearer auto tests. 2012-01-10 07:12:41 +01:00
opengl Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
other Accessiblity State as bit field. 2012-01-10 07:14:34 +01:00
sql Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
testlib Update year in Nokia copyright headers. 2012-01-10 07:12:41 +01:00
tools Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
widgets Improve QDateTimeEdit autotest. 2012-01-10 05:12:15 +01:00
xml Fix memory leak in QDomDocument entity text expansion 2012-01-10 02:01:41 +01:00
auto.pro Remove QtV8 library from QtBase 2012-01-09 19:54:07 +01:00
network-settings.h Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
platformquirks.h Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
test.pl Update copyright year in license headers. 2012-01-05 06:36:56 +01:00