Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-52

QMailMessageListModel::index() method returns valid QModelIndex object on invalid row/column parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 1.0.0
    • Messaging: QMF
    • None
    • dbfd714c198dcd1ba09fc8e68b24aa5af3831dff

    Description

      From Maemo:

      A bug in QMailMessageListModel class's method

      QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;

      It returns valid QModelIndex on invalid model row/column parameters. That is if you specify a non-existing model row/column values it will still return a valid QModelIndex object (with specified row, column and a pointer to Model object).

      For example: you are going through the model items and would like to mark the last row as DuiContentItem::SingleColumnBottom (in order to have bottom list corners rounded). You check if the next item index is valid by checking index.sibling(index.row() + 1, column).isValid() return value. In this case this expression will always return true.

      Patch is attached.

      Attachments

        Activity

          People

            sanders Don Sanders (closed Nokia identity) (Inactive)
            sbradley Shane Bradley (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: