summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-08-04 03:18:37 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-08-04 03:34:52 (GMT)
commit588093b3e12dd5039bcc4ee545d9d9112d25394f (patch)
tree2f401dd36f44004fb06cead7846965dad3b5738e /tests
parentdbda9ae7996d090cda296074fc02842f1dd2e0f7 (diff)
downloadQt-588093b3e12dd5039bcc4ee545d9d9112d25394f.zip
Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.tar.gz
Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.tar.bz2
Improve performance by separating id and context properties
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp5
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/object_id.txt6
-rw-r--r--tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp4
3 files changed, 10 insertions, 5 deletions
diff --git a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
index 8d3c0b4..01cb54b 100644
--- a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
+++ b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp
@@ -276,11 +276,6 @@ void tst_qmlbindengine::contextPropertiesTriggerReeval()
MyExpression expr(&context, "testObj2");
QCOMPARE(expr.changed, false);
QCOMPARE(expr.value(), QVariant::fromValue((QObject *)object3));
-
- delete object3;
-
- QCOMPARE(expr.changed, true);
- QCOMPARE(expr.value(), QVariant());
}
}
diff --git a/tests/benchmarks/declarative/qmlcomponent/object_id.txt b/tests/benchmarks/declarative/qmlcomponent/object_id.txt
new file mode 100644
index 0000000..526b6ad
--- /dev/null
+++ b/tests/benchmarks/declarative/qmlcomponent/object_id.txt
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Object {
+ id: Blah
+}
+
diff --git a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp
index f032004..f0e029d 100644
--- a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp
+++ b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp
@@ -56,6 +56,7 @@ void tst_qmlcomponent::creation_data()
QTest::addColumn<QString>("file");
QTest::newRow("Object") << "object.txt";
+ QTest::newRow("Object - Id") << "object_id.txt";
QTest::newRow("MyQmlObject") << "myqmlobject.txt";
QTest::newRow("MyQmlObject: basic binding") << "myqmlobject_binding.txt";
QTest::newRow("Synthesized properties") << "synthesized_properties.txt";
@@ -70,6 +71,9 @@ void tst_qmlcomponent::creation()
QmlComponent c(&engine, file);
QVERIFY(c.isReady());
+ QObject *obj = c.create();
+ delete obj;
+
QBENCHMARK {
QObject *obj = c.create();
delete obj;