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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.0
    • 4.6.1, 5.5.0
    • Widgets: Itemviews
    • None
    • 1382374deaa4a854aeb542e6c8f7e1841f2abb10

    Description

      Documentation for QAbstractItemModel::setItemData() states:

      Roles that are not in roles will not be modified.

      However, QStandardItemModel's reimplementation uses QStandardItem::setItemData(), which replaces the existing values with the new values:

      if (values!=newValues)

      { values=newValues; if (model) model->d_func()->itemChanged(q); }

      So the behaviour is inconsistent.

      Attachments

        Issue Links

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

          Activity

            People

              sgaist Samuel Gaist
              swongu s
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes