| 207 | } |
| 208 | |
| 209 | void testInitialSelectionTransfer() |
| 210 | { |
| 211 | QStandardItemModel serverModel; |
| 212 | FakeNetworkSelectionModel serverSelection(ServerAddress, &serverModel); |
| 213 | fillModel(&serverModel); |
| 214 | serverSelection.select(serverModel.index(3, 0), QItemSelectionModel::ClearAndSelect); |
| 215 | |
| 216 | QTest::qWait(100); |
| 217 | |
| 218 | QStandardItemModel clientModel; |
| 219 | fillModel(&clientModel); |
| 220 | FakeNetworkSelectionModel clientSelection(ClientAddress, &clientModel); |
| 221 | QSignalSpy clientSpy(&clientSelection, &FakeNetworkSelectionModel::selectionChanged); |
| 222 | QVERIFY(clientSpy.isValid()); |
| 223 | |
| 224 | clientSelection.requestSelection(); // usually called by SelectionModelClient |
| 225 | |
| 226 | QCOMPARE(clientSelection.selection().size(), 1); |
| 227 | QCOMPARE(clientSelection.selection().first().topLeft(), clientModel.index(3, 0)); |
| 228 | QCOMPARE(clientSpy.size(), 1); |
| 229 | } |
| 230 | |
| 231 | void testCurrent() |
| 232 | { |
nothing calls this directly
no test coverage detected