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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.0
    • 5.4.1
    • Widgets: Itemviews
    • None
    • 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

          For Gerrit Dashboard: QTBUG-45114
          # Subject Branch Project Status CR V

          Activity

            People

              sgaist Samuel Gaist
              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