Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.2
-
None
Description
In my unit test I connnect a QML SignalSpy to a QAbstractItemModel::dataChanged() signal.
According to the Qt documentation this signal has 3 arguments:
void | dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int> &roles = QList<int>()) |
In my application the third argument "roles" should contain exactly one entry (a custom role with value 256). I need to verify this.
But SignalSpy reports only 2 arguments of the received signal: topLeft and topRight (which are both correct in my unit test).
console.log(spy.signalArguments[0].length) tells "2" and
console.log(spy.signalArguments[0][2]) tells "undefined".
Expected behavior:
SignalSpy stores ALL arguments of the connected signal in its signalArguments list.
In my case spy.signalArguments[i].length should be 3 for all received dataChanged() signals and spy.signalArguments[i][2] is a list of int which may be empty.{}