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

Crash in QIconModeViewBase::itemsRect() when overriding QListView::startDrag()

    XMLWordPrintable

Details

    • All
    • 6fbcfd9164ae23b221ebce7fc3185505a8a1fb6e (qt/qtbase/dev) b14a33ff671b555b3677a012867489e174cb98e7 (qt/qtbase/6.0)

    Description

      The attached testcase crashes with Qt6 but not with Qt5 even I don't understand why. The fix is trivial but I'm not sure if we should allow to override startDrag() in QListView and if the QVector behavior in Qt5 is correct. Even valgrind does not print anything about this strange access:

       

      void killMe(const QVector<QModelIndex> &indexes)
      {
              qDebug() << indexes.capacity() << *indexes.begin();
      }
      ...
      
      killMe({})

      The original report comes from https://www.qtcentre.org/threads/71383-Qt6-StartDrag-making-crash-on-Qt6

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            chehrlic Christian Ehrlicher
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes