diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-26 12:53:14 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-28 12:24:13 +0100 |
commit | 9044800083ccffe4d0b732f8b3b60512f32d8f8a (patch) | |
tree | cdd6d2038d53e99a5a9326be6b47a68553830480 /tests/benchmarks | |
parent | 8bf579d8d4feb13ca8651e98dd762b28483abe9e (diff) | |
parent | cc1c3d0e2be6dfea6befebdc5f25e519e3fe79b2 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
The renderers added in 5.8 had to be adapted to the changed profiling
macros from 5.6.
Conflicts:
src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
src/quick/util/qquickprofiler_p.h
tests/auto/qml/qjsengine/tst_qjsengine.cpp
tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/qml/creation/tst_creation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp index a1c09db158..9fc67ada71 100644 --- a/tests/benchmarks/qml/creation/tst_creation.cpp +++ b/tests/benchmarks/qml/creation/tst_creation.cpp @@ -221,12 +221,15 @@ inline void QQmlGraphics_setParent_noEvent(QObject *object, QObject *parent) void tst_creation::itemtree_notree_cpp() { + std::vector<QQuickItem *> kids; + kids.resize(30); QBENCHMARK { QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { QQuickItem *child = new QQuickItem; - Q_UNUSED(child); + kids[i] = child; } + qDeleteAll(kids); delete item; } } @@ -258,12 +261,13 @@ void tst_creation::itemtree_cpp() void tst_creation::itemtree_data_cpp() { + QQmlEngine engine; QBENCHMARK { QQuickItem *item = new QQuickItem; for (int i = 0; i < 30; ++i) { QQuickItem *child = new QQuickItem; QQmlGraphics_setParent_noEvent(child,item); - QQmlListReference ref(item, "data"); + QQmlListReference ref(item, "data", &engine); ref.append(child); } delete item; |