aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml/creation/tst_creation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/qml/creation/tst_creation.cpp')
-rw-r--r--tests/benchmarks/qml/creation/tst_creation.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp
index 30d7ef902e..ed2e52f869 100644
--- a/tests/benchmarks/qml/creation/tst_creation.cpp
+++ b/tests/benchmarks/qml/creation/tst_creation.cpp
@@ -204,19 +204,13 @@ void tst_creation::qobject_qmltype()
}
}
-struct QQmlGraphics_Derived : public QObject
-{
- void setParent_noEvent(QObject *parent) {
- bool sce = d_ptr->sendChildEvents;
- d_ptr->sendChildEvents = false;
- setParent(parent);
- d_ptr->sendChildEvents = sce;
- }
-};
-
inline void QQmlGraphics_setParent_noEvent(QObject *object, QObject *parent)
{
- static_cast<QQmlGraphics_Derived *>(object)->setParent_noEvent(parent);
+ QObjectPrivate *d_ptr = QObjectPrivate::get(object);
+ bool sce = d_ptr->sendChildEvents;
+ d_ptr->sendChildEvents = false;
+ object->setParent(parent);
+ d_ptr->sendChildEvents = sce;
}
void tst_creation::itemtree_notree_cpp()
@@ -385,7 +379,7 @@ void tst_creation::bindings_qml()
return;
}
- QQuickItem *obj = dynamic_cast<QQuickItem *>(component.create());
+ QQuickItem *obj = qobject_cast<QQuickItem *>(component.create());
QVERIFY(obj != nullptr);
int height = 0;
@@ -407,7 +401,7 @@ void tst_creation::bindings_parent_qml()
return;
}
- QQuickItem *obj = dynamic_cast<QQuickItem *>(component.create());
+ QQuickItem *obj = qobject_cast<QQuickItem *>(component.create());
QVERIFY(obj != nullptr);
int height = 0;