aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml/creation
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-05-23 16:11:50 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-05-24 14:00:39 +0200
commit8ae479a8eac7b9ffeeba24e9e459e3e02ca20587 (patch)
treed6fdf18ddd2456835c598f40399348d247af6c97 /tests/benchmarks/qml/creation
parent1337e0d0827e86591e67a6dbaaeb3bd3f9ed733b (diff)
parent607320ca9fb2796a5f6f2578578fd314f7e8b99e (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
Diffstat (limited to 'tests/benchmarks/qml/creation')
-rw-r--r--tests/benchmarks/qml/creation/tst_creation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp
index fa94fd4d46..ca5802a8e7 100644
--- a/tests/benchmarks/qml/creation/tst_creation.cpp
+++ b/tests/benchmarks/qml/creation/tst_creation.cpp
@@ -102,6 +102,12 @@ public:
tst_creation::tst_creation()
{
qmlRegisterType<TestType>("Qt.test", 1, 0, "TestType");
+
+ // Ensure QtQuick is loaded and imported. Some benchmark like elements() rely on QQmlMetaType::qmlTypeNames() to
+ // be populated.
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick 2.0\nItem{}", QUrl());
+ QScopedPointer<QObject> obj(component.create());
}
inline QUrl TEST_FILE(const QString &filename)