summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/declarative/creation/tst_creation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/declarative/creation/tst_creation.cpp')
-rw-r--r--tests/benchmarks/declarative/creation/tst_creation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp
index 9c0fd27..5b0004f 100644
--- a/tests/benchmarks/declarative/creation/tst_creation.cpp
+++ b/tests/benchmarks/declarative/creation/tst_creation.cpp
@@ -42,7 +42,7 @@
#include <qtest.h>
#include <QDeclarativeEngine>
#include <QDeclarativeComponent>
-#include <QDeclarativeMetaType>
+#include <private/qdeclarativemetatype_p.h>
#include <QDebug>
#include <QGraphicsScene>
#include <QGraphicsItem>
@@ -163,6 +163,8 @@ void tst_creation::objects_qmltype()
{
QFETCH(QByteArray, type);
QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 6);
+ if (!t || !t->isCreatable())
+ QSKIP("Non-creatable type", SkipSingle);
QBENCHMARK {
QObject *obj = t->create();
@@ -339,7 +341,8 @@ void tst_creation::itemtree_data_cpp()
for (int i = 0; i < 30; ++i) {
QDeclarativeItem *child = new QDeclarativeItem;
QDeclarativeGraphics_setParent_noEvent(child,item);
- item->data()->append(child);
+ QDeclarativeListReference ref(item, "data");
+ ref.append(child);
}
delete item;
}