aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-04-27 08:47:35 +0200
committerLiang Qi <liang.qi@qt.io>2016-04-27 08:47:35 +0200
commitda374438be8f34f746f359aa39ae6c59fd1c4854 (patch)
tree2f3e2a2b93b39dfb825339c98580f23e824fad0e /tests/benchmarks/qml
parent1be53f4e143d417d60cd1f9a292193dab59b5b20 (diff)
parent2e6f7f362e62c3285e7d395aca607502c8e8160e (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
Diffstat (limited to 'tests/benchmarks/qml')
-rw-r--r--tests/benchmarks/qml/creation/tst_creation.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp
index 224732913c..e126cdae7e 100644
--- a/tests/benchmarks/qml/creation/tst_creation.cpp
+++ b/tests/benchmarks/qml/creation/tst_creation.cpp
@@ -68,6 +68,8 @@ private slots:
void itemtests_qml_data();
void itemtests_qml();
+ void anchors_heightChange();
+
private:
QQmlEngine engine;
};
@@ -373,6 +375,24 @@ void tst_creation::itemtests_qml()
QBENCHMARK { delete component.create(); }
}
+void tst_creation::anchors_heightChange()
+{
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick 2.0\nItem { Item { anchors.bottom: parent.bottom } }", QUrl());
+
+ QObject *obj = component.create();
+ auto item = qobject_cast<QQuickItem *>(obj);
+ Q_ASSERT(item);
+ int height = 1;
+
+ QBENCHMARK {
+ item->setHeight(height);
+ height += 1;
+ }
+
+ delete obj;
+}
+
QTEST_MAIN(tst_creation)
#include "tst_creation.moc"