diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-06 15:47:45 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-06 13:57:39 +0000 |
commit | 08871501d8a7fe44a67116915bce3d2430c70e29 (patch) | |
tree | 42c6115a044cb303b08d0c95c7f09b100d1f8b97 /tests/benchmarks | |
parent | b141f798d57310c60c59597aa9232f6884309d0a (diff) |
tst_objectcount: warmup with Buttons & exclude the test QQmlComponent
This ensures that singletons are excluded from the numbers.
Change-Id: I14422b7b15d57273dd11717892ebd11eba650902
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/objectcount/objectcount.pro | 3 | ||||
-rw-r--r-- | tests/benchmarks/objectcount/objectcount.qrc | 5 | ||||
-rw-r--r-- | tests/benchmarks/objectcount/qt-logo.png | bin | 21710 -> 0 bytes | |||
-rw-r--r-- | tests/benchmarks/objectcount/tst_objectcount.cpp | 11 |
4 files changed, 7 insertions, 12 deletions
diff --git a/tests/benchmarks/objectcount/objectcount.pro b/tests/benchmarks/objectcount/objectcount.pro index 801fff58..f54d72d6 100644 --- a/tests/benchmarks/objectcount/objectcount.pro +++ b/tests/benchmarks/objectcount/objectcount.pro @@ -7,6 +7,3 @@ osx:CONFIG -= app_bundle SOURCES += \ tst_objectcount.cpp - -RESOURCES += \ - objectcount.qrc diff --git a/tests/benchmarks/objectcount/objectcount.qrc b/tests/benchmarks/objectcount/objectcount.qrc deleted file mode 100644 index 3c2c8a64..00000000 --- a/tests/benchmarks/objectcount/objectcount.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource> - <file>qt-logo.png</file> -</qresource> -</RCC> diff --git a/tests/benchmarks/objectcount/qt-logo.png b/tests/benchmarks/objectcount/qt-logo.png Binary files differdeleted file mode 100644 index cf350dad..00000000 --- a/tests/benchmarks/objectcount/qt-logo.png +++ /dev/null diff --git a/tests/benchmarks/objectcount/tst_objectcount.cpp b/tests/benchmarks/objectcount/tst_objectcount.cpp index 8caea23d..2e0f8412 100644 --- a/tests/benchmarks/objectcount/tst_objectcount.cpp +++ b/tests/benchmarks/objectcount/tst_objectcount.cpp @@ -74,7 +74,7 @@ void tst_ObjectCount::init() // warmup QQmlComponent component(&engine); - component.setData("import QtQuick 2.0; import QtQuick.Controls 1.3; import QtQuick.Controls 2.0; Image { Accessible.role: Accessible.Button; source: 'qrc:/qt-logo.png' }", QUrl()); + component.setData("import QtQuick 2.0; import QtQuick.Controls 1.3 as C1; import QtQuick.Controls 2.0 as C2; Row { C1.Button {} C2.Button {} }", QUrl()); delete component.create(); } @@ -98,10 +98,11 @@ void tst_ObjectCount::testCount() QFETCH(QByteArray, v1); QFETCH(QByteArray, v2); - qt_qobjects->clear(); - if (!v1.isEmpty()) { QQmlComponent component(&engine); + + qt_qobjects->clear(); + component.setData(v1, QUrl()); QScopedPointer<QObject> object(component.create()); QVERIFY2(object.data(), qPrintable(component.errorString())); @@ -115,10 +116,12 @@ void tst_ObjectCount::testCount() printItems("V1", items); } - qt_qobjects->clear(); if (!v2.isEmpty()) { QQmlComponent component(&engine); + + qt_qobjects->clear(); + component.setData(v2, QUrl()); QScopedPointer<QObject> object(component.create()); QVERIFY2(object.data(), qPrintable(component.errorString())); |