Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
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
bin Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
config.tests Remove ICD plugin for bearer. 2012-01-10 07:12:41 +01:00
dist Make (dis)connectTo(From)Host virtual in QAbstractSocket. 2012-01-09 19:17:47 +01:00
doc/src Update year in Nokia copyright headers. 2012-01-10 07:12:41 +01:00
examples Update year in Nokia copyright headers. 2012-01-10 07:12:41 +01:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Update year in Nokia copyright headers. 2012-01-10 07:12:41 +01:00
qmake qmake: fix default value for C++ optimization in vcxproj files 2012-01-08 18:21:00 +01:00
src Make the roleNames a virtual accessor. 2012-01-10 11:37:28 +01:00
tests Make the roleNames a virtual accessor. 2012-01-10 11:37:28 +01:00
tools Add a new QT_NO_SSL feature macro. 2012-01-06 11:19:23 +01:00
util Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Remove QtV8 library from QtBase 2012-01-09 19:54:07 +01:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
INSTALL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
configure Remove ICD plugin for bearer. 2012-01-10 07:12:41 +01:00
configure.exe Add a new QT_NO_SSL feature macro. 2012-01-06 11:19:23 +01:00
header.BSD Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
header.FDL Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
header.LGPL Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
header.LGPL-ONLY Update copyright year in license headers. 2012-01-05 06:36:56 +01:00
qtbase.pro Ensure qmodule.pri is installed. 2011-11-23 00:12:03 +01:00
sync.profile Remove QtV8 library from QtBase 2012-01-09 19:54:07 +01:00