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

invisibleRootItem()->appendRows(items) failed whem items is empty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.0
    • 5.9.3
    • Widgets: Itemviews
    • None

    Description

      bool QStandardItemPrivate::insertRows(int row, const QList<QStandardItem*> &items)
      {
          Q_Q(QStandardItem);
          if ((row < 0) || (row > rowCount()))
              return false;
          int count = items.count();
          if (model)
              model->d_func()->rowsAboutToBeInserted(q, row, row + count - 1);
      

      If 'count' is 0 and 'row' is 0, than 'row + count - 1' will -1.
      In this situation QAbstractItemModel::beginInsertRows failed on

      Q_ASSERT(last >= first);
      

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            skol sergii koltsiuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes