Selection events recorded from `QListView` are recorded by index and not text
Selection events from QListView
are recorded by index instead of list view widget text. This is problematic for tests where the items in the QListView
may change based on changes in the build configuration, for example, the list of readers available in the reader selection dialog.
Steps to reproduce:
- Launch ParaView
- Tools -> Record Test... Save to
tmp.xml
- Load
$PARAVIEW_BUILD/ExternalData/Testing/viscoplastic-ring.h5
. Select theTRUCHAS dataset
option. - Stop recording
- Look at
tmp.xml
It will contain events from the reader selection dialog like
<pqevent object="pqClientMainWindow/pqSelectReaderDialog/listWidget" command="setCurrent" arguments="4.0" />
<pqevent object="pqClientMainWindow/pqSelectReaderDialog/listWidget" command="setCheckState" arguments="4.0,0" />
These events should instead be recorded as
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/viscoplastic-ring.h5" />