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.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/benchmarks/qml/creation/tst_creation.cpp b/tests/benchmarks/qml/creation/tst_creation.cpp
index 91f907ab5e..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()