summaryrefslogtreecommitdiffstats
path: root/tests/auto/auto.pro
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2011-12-27 17:02:33 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-10 11:37:28 +0100
commitc3ad8c1c062a972b7fb75d8b51a1f80cb371d503 (patch)
tree47bd4f0b698a16a7a475c19e7c3c9acab60f0ba5 /tests/auto/auto.pro
parent1e10e4deb97885472c36f5b10a5888979f24cee0 (diff)
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>
Diffstat (limited to 'tests/auto/auto.pro')
0 files changed, 0 insertions, 0 deletions