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

QListView::selectedIndexes() has wrong algorithm

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.5.1, 5.6.0 Beta, 5.7
    • Widgets: Itemviews
    • None
    • a3b8e355fc17783a5d4badfb9ad50247655000cd

    Description

      for (int i = 0; i < viewSelected.count();++i) {
              const QModelIndex &index = viewSelected.at(i);
              if (!isIndexHidden(index) && index.parent() == d->root && index.column() == d->column)
                  ++i;
              else
                  viewSelected.removeAt(i);
          }
      

      e.g. this algorithm can skip some hidden indexes. Because of double increment of i

      Attachments

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

        Activity

          People

            antkudr Anton Kudryavtsev
            antkudr Anton Kudryavtsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes