aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
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
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')
-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 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)
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