diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-24 21:26:33 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-24 21:50:29 +0200 |
commit | 0837453ef90f5d5f569702aa1c7620648dae2c00 (patch) | |
tree | 43a35f937dfcca3f467d4deafe2800d01f0859da /tests/benchmarks | |
parent | 9ff09fb283cd130fb717769b44f54bfbb28efd8a (diff) | |
parent | 0ba6dffd96a0dda8e3938b09395075c19e46644b (diff) |
Merge remote-tracking branch 'origin/dev' into HEAD
Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
Diffstat (limited to 'tests/benchmarks')
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 |