Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45114

Behaviour of QStandardItemModel::setItemData() is inconsistent with QAbstractItemModel::setItemData()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.4.1
    • Fix Version/s: 5.11.0
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Commits:
      1382374deaa4a854aeb542e6c8f7e1841f2abb10

      Description

      The documentation of QStandardItemModel::setItemData() links to the documentation of QAbstractItemModel::setItemData().

      But the behavior of the QStandardItemModel::setItemData() is different. QStandardItemModel::setItemData() removes all roles data which is not set in the QMap parameter of setItemData(). The implementation of QAbstractItemModel::setItemData() changes only the roles and leave all other roles untouched.

      The same behavior was reported at QTBUG-10872 but described for QStandardItem instead of QStandardItemModel, and for an very old version of Qt.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              sgaist Samuel Gaist
              Reporter:
              sahadum Thomas Mock
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes