| 48 | } |
| 49 | |
| 50 | void benchModelItemUpdated() |
| 51 | { |
| 52 | QQuickView view; |
| 53 | auto root = view.contentItem(); |
| 54 | QuickItemModel model; |
| 55 | model.setWindow(&view); |
| 56 | const auto items = createItems(root); |
| 57 | |
| 58 | for (auto item : items) { |
| 59 | model.objectAdded(item); |
| 60 | } |
| 61 | |
| 62 | QBENCHMARK_ONCE |
| 63 | { |
| 64 | for (auto item : items) { |
| 65 | // trigger item update |
| 66 | item->setX(item->x() + 1); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | private: |
| 72 | static QVector<QQuickItem *> createItems(QQuickItem *parent) |
nothing calls this directly
no test coverage detected