qt5base-lts/tests/auto/widgets
Marc Mutz 08f38d2214 tst_QAbstractItemView: Fix UB (invalid downcast, member call)
As reported by UBSan:

  tst_qabstractitemview.cpp:336:23: runtime error: member call on address 0x7ffe6fe96e10 which does not point to an object of type 'TestView'
   0x7ffe6fe96e10: note: object is of type 'QListView'
  tst_qabstractitemview.cpp:337:5: runtime error: member call on address 0x7ffe6fe96e10 which does not point to an object of type 'TestView'
   0x7ffe6fe96e10: note: object is of type 'QListView'
  tst_qabstractitemview.cpp:338:23: runtime error: member call on address 0x7ffe6fe96e10 which does not point to an object of type 'TestView'
   0x7ffe6fe96e10: note: object is of type 'QListView'
  [etc ...]

Fix by making the test a friend of QAbstractItemView instead.

Change-Id: I1a08977042296eb34e9dbdb5c0595662dbd2e5ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-01 16:07:40 +00:00
..
dialogs tst_QFileSystemModel: Remove Win32LongFileName(). 2016-06-08 04:09:48 +00:00
effects Purge sRGB chunks from PNGs in tests. 2016-03-29 08:39:43 +00:00
gestures Autotest: Remove blacklistings 2016-04-01 05:41:21 +00:00
graphicsview Avoid missing paints when resizing GV with QOpenGLWidget viewport 2016-05-24 19:16:46 +00:00
itemviews tst_QAbstractItemView: Fix UB (invalid downcast, member call) 2016-08-01 16:07:40 +00:00
kernel Remove tst_QWidget::immediateRepaintAfterShow(). 2016-06-04 18:47:54 +00:00
styles Enable testStyleOptionInit for all styles and fix affected styles. 2016-06-06 13:12:14 +00:00
util QCompleter::setModel(): Restore completion role 2016-07-13 13:45:44 +00:00
widgets QComboBox: fix crash on setEditable(false) called from editTextChanged() 2016-07-06 10:34:43 +00:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00