diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-24 02:42:00 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-24 02:42:00 (GMT) |
commit | 7c76abb0dc4204043bec9b6fa315f9753a7986ae (patch) | |
tree | cee303672cfd138790645e731f2d69472564d4b7 /tests/benchmarks/declarative/creation/tst_creation.cpp | |
parent | 4066e60e859853cfe3240245ba05271e79839506 (diff) | |
download | Qt-7c76abb0dc4204043bec9b6fa315f9753a7986ae.zip Qt-7c76abb0dc4204043bec9b6fa315f9753a7986ae.tar.gz Qt-7c76abb0dc4204043bec9b6fa315f9753a7986ae.tar.bz2 |
Change class prefix to from QmlXXX to QDeclarativeXXX, QmlGraphicsXXX to QDeclarativeXXX.
Diffstat (limited to 'tests/benchmarks/declarative/creation/tst_creation.cpp')
-rw-r--r-- | tests/benchmarks/declarative/creation/tst_creation.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index b99031a..9c0fd27 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -40,13 +40,13 @@ ****************************************************************************/ #include <qtest.h> -#include <QmlEngine> -#include <QmlComponent> -#include <QmlMetaType> +#include <QDeclarativeEngine> +#include <QDeclarativeComponent> +#include <QDeclarativeMetaType> #include <QDebug> #include <QGraphicsScene> #include <QGraphicsItem> -#include <QmlGraphicsItem> +#include <QDeclarativeItem> #include <private/qobject_p.h> #ifdef Q_OS_SYMBIAN @@ -83,7 +83,7 @@ private slots: void itemtree_scene_cpp(); private: - QmlEngine engine; + QDeclarativeEngine engine; }; inline QUrl TEST_FILE(const QString &filename) @@ -101,7 +101,7 @@ void tst_creation::qobject_cpp() void tst_creation::qobject_qml() { - QmlComponent component(&engine, TEST_FILE("qobject.qml")); + QDeclarativeComponent component(&engine, TEST_FILE("qobject.qml")); QObject *obj = component.create(); delete obj; @@ -113,7 +113,7 @@ void tst_creation::qobject_qml() void tst_creation::qobject_qmltype() { - QmlType *t = QmlMetaType::qmlType("Qt/QtObject", 4, 6); + QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 6); QBENCHMARK { QObject *obj = t->create(); @@ -154,7 +154,7 @@ void tst_creation::objects_qmltype_data() { QTest::addColumn<QByteArray>("type"); - QList<QByteArray> types = QmlMetaType::qmlTypeNames(); + QList<QByteArray> types = QDeclarativeMetaType::qmlTypeNames(); foreach (QByteArray type, types) QTest::newRow(type.constData()) << type; } @@ -162,7 +162,7 @@ void tst_creation::objects_qmltype_data() void tst_creation::objects_qmltype() { QFETCH(QByteArray, type); - QmlType *t = QmlMetaType::qmlType(type, 4, 6); + QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 6); QBENCHMARK { QObject *obj = t->create(); @@ -281,7 +281,7 @@ void tst_creation::qgraphicsitem_tree14() } } -struct QmlGraphics_DerivedObject : public QObject +struct QDeclarativeGraphics_DerivedObject : public QObject { void setParent_noEvent(QObject *parent) { bool sce = d_ptr->sendChildEvents; @@ -291,17 +291,17 @@ struct QmlGraphics_DerivedObject : public QObject } }; -inline void QmlGraphics_setParent_noEvent(QObject *object, QObject *parent) +inline void QDeclarativeGraphics_setParent_noEvent(QObject *object, QObject *parent) { - static_cast<QmlGraphics_DerivedObject *>(object)->setParent_noEvent(parent); + static_cast<QDeclarativeGraphics_DerivedObject *>(object)->setParent_noEvent(parent); } void tst_creation::itemtree_notree_cpp() { QBENCHMARK { - QmlGraphicsItem *item = new QmlGraphicsItem; + QDeclarativeItem *item = new QDeclarativeItem; for (int i = 0; i < 30; ++i) { - QmlGraphicsItem *child = new QmlGraphicsItem; + QDeclarativeItem *child = new QDeclarativeItem; } delete item; } @@ -310,10 +310,10 @@ void tst_creation::itemtree_notree_cpp() void tst_creation::itemtree_objtree_cpp() { QBENCHMARK { - QmlGraphicsItem *item = new QmlGraphicsItem; + QDeclarativeItem *item = new QDeclarativeItem; for (int i = 0; i < 30; ++i) { - QmlGraphicsItem *child = new QmlGraphicsItem; - QmlGraphics_setParent_noEvent(child,item); + QDeclarativeItem *child = new QDeclarativeItem; + QDeclarativeGraphics_setParent_noEvent(child,item); } delete item; } @@ -322,10 +322,10 @@ void tst_creation::itemtree_objtree_cpp() void tst_creation::itemtree_cpp() { QBENCHMARK { - QmlGraphicsItem *item = new QmlGraphicsItem; + QDeclarativeItem *item = new QDeclarativeItem; for (int i = 0; i < 30; ++i) { - QmlGraphicsItem *child = new QmlGraphicsItem; - QmlGraphics_setParent_noEvent(child,item); + QDeclarativeItem *child = new QDeclarativeItem; + QDeclarativeGraphics_setParent_noEvent(child,item); child->setParentItem(item); } delete item; @@ -335,10 +335,10 @@ void tst_creation::itemtree_cpp() void tst_creation::itemtree_data_cpp() { QBENCHMARK { - QmlGraphicsItem *item = new QmlGraphicsItem; + QDeclarativeItem *item = new QDeclarativeItem; for (int i = 0; i < 30; ++i) { - QmlGraphicsItem *child = new QmlGraphicsItem; - QmlGraphics_setParent_noEvent(child,item); + QDeclarativeItem *child = new QDeclarativeItem; + QDeclarativeGraphics_setParent_noEvent(child,item); item->data()->append(child); } delete item; @@ -347,7 +347,7 @@ void tst_creation::itemtree_data_cpp() void tst_creation::itemtree_qml() { - QmlComponent component(&engine, TEST_FILE("item.qml")); + QDeclarativeComponent component(&engine, TEST_FILE("item.qml")); QObject *obj = component.create(); delete obj; @@ -360,13 +360,13 @@ void tst_creation::itemtree_qml() void tst_creation::itemtree_scene_cpp() { QGraphicsScene scene; - QmlGraphicsItem *root = new QmlGraphicsItem; + QDeclarativeItem *root = new QDeclarativeItem; scene.addItem(root); QBENCHMARK { - QmlGraphicsItem *item = new QmlGraphicsItem; + QDeclarativeItem *item = new QDeclarativeItem; for (int i = 0; i < 30; ++i) { - QmlGraphicsItem *child = new QmlGraphicsItem; - QmlGraphics_setParent_noEvent(child,item); + QDeclarativeItem *child = new QDeclarativeItem; + QDeclarativeGraphics_setParent_noEvent(child,item); child->setParentItem(item); } item->setParentItem(root); |