aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-05-19 13:04:54 +0200
committerLiang Qi <liang.qi@qt.io>2016-05-19 20:41:34 +0200
commit63ec33e79cf86c4312c58bea12a2aab400890c70 (patch)
tree5c9b5cd51276ea0a3ca42567666a09e70efa11cc /tests/benchmarks/qml
parentb9e4a4df577959579b2322fb6077bde82d9ffce3 (diff)
parentafc84775efdc6e13e2e210bb94e115b378d90134 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
Diffstat (limited to 'tests/benchmarks/qml')
-rw-r--r--tests/benchmarks/qml/creation/tst_creation.cpp6
-rw-r--r--tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro2
-rw-r--r--tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp2
-rw-r--r--tests/benchmarks/qml/qml.pro1
4 files changed, 10 insertions, 1 deletions
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp
index 7b00eabc28..b47bc14a3e 100644
--- a/tests/benchmarks/qml/creation/tst_creation.cpp
+++ b/tests/benchmarks/qml/creation/tst_creation.cpp
@@ -96,6 +96,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)
diff --git a/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro b/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro
index 3bedc0ea18..67f9d3b395 100644
--- a/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro
+++ b/tests/benchmarks/qml/librarymetrics_performance/librarymetrics_performance.pro
@@ -7,3 +7,5 @@ macx:CONFIG -= app_bundle
CONFIG += release
SOURCES += tst_librarymetrics_performance.cpp
+
+RESOURCES += data
diff --git a/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp b/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp
index f76372932b..5513dcb9a7 100644
--- a/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp
+++ b/tests/benchmarks/qml/librarymetrics_performance/tst_librarymetrics_performance.cpp
@@ -114,7 +114,7 @@ tst_librarymetrics_performance::~tst_librarymetrics_performance()
static QUrl testFileUrl(const char * filename)
{
- return QUrl::fromLocalFile(QString(QLatin1String(filename)));
+ return QUrl(QLatin1String("qrc:///") + QLatin1String(filename));
}
void tst_librarymetrics_performance::metrics_data()
diff --git a/tests/benchmarks/qml/qml.pro b/tests/benchmarks/qml/qml.pro
index 7969866673..d3ce69c713 100644
--- a/tests/benchmarks/qml/qml.pro
+++ b/tests/benchmarks/qml/qml.pro
@@ -8,6 +8,7 @@ SUBDIRS += \
qqmlcomponent \
qqmlimage \
qqmlmetaproperty \
+ librarymetrics_performance \
# script \ ### FIXME: doesn't build
js