MCPcopy Create free account
hub / github.com/KDAB/GammaRay / benchModelItemUpdated

Method benchModelItemUpdated

tests/quickinspectorbench.cpp:50–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
71private:
72 static QVector<QQuickItem *> createItems(QQuickItem *parent)

Callers

nothing calls this directly

Calls 2

setWindowMethod · 0.45
objectAddedMethod · 0.45

Tested by

no test coverage detected