diff options
author | Ulf Hermann <[email protected]> | 2023-09-13 15:05:12 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2023-09-15 09:01:59 +0200 |
commit | 1f5b7d843d5d091b98c068f2bff2fc63957b8134 (patch) | |
tree | 5424cc4e243c017100010d297c8f20cf2e0e1842 /tests/benchmarks | |
parent | 5dadee1186429e61b7bb8d27120b0399f0d16655 (diff) |
QmlDom: Add const-correctness
We almost never want non-const DomItems anywhere. There is exactly one
exception: From a MutableDomItem we need to poke into the internals of
the respective DomItem and const_cast them. However, MutableDomItem is
to be handled with care anyway.
Change-Id: I826f0669c049462beec9ad71dccb39c5191a1d3f
Reviewed-by: Sami Shalayel <[email protected]>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/qml/qmldom/tst_qmldomconstruction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/benchmarks/qml/qmldom/tst_qmldomconstruction.cpp b/tests/benchmarks/qml/qmldom/tst_qmldomconstruction.cpp index 2c713281ee..3c95b77784 100644 --- a/tests/benchmarks/qml/qmldom/tst_qmldomconstruction.cpp +++ b/tests/benchmarks/qml/qmldom/tst_qmldomconstruction.cpp @@ -61,7 +61,7 @@ void tst_qmldomconstruction::domConstructionTime() env.loadFile( FileToLoad::fromFileSystem(env.ownerAs<DomEnvironment>(), fileName, withScope), - [&tFile](Path, DomItem &, DomItem &newIt) { tFile = newIt.fileObject(); }, + [&tFile](Path, const DomItem &, const DomItem &newIt) { tFile = newIt.fileObject(); }, LoadOption::DefaultLoad); env.loadPendingDependencies(); } |