Make declarative/creation benchmark build again
authorKent Hansen <kent.hansen@nokia.com>
Mon, 19 Sep 2011 11:28:13 +0000 (13:28 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 19 Sep 2011 12:35:31 +0000 (14:35 +0200)
Change-Id: I9ecbdcfc373e95de38e432aa627f6ab93d92afe6
Reviewed-on: http://codereview.qt-project.org/5138
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
tests/benchmarks/declarative/creation/creation.pro
tests/benchmarks/declarative/creation/tst_creation.cpp

index 8241ace..4d6cafb 100644 (file)
@@ -1,7 +1,7 @@
 load(qttest_p4)
 TEMPLATE = app
 TARGET = tst_creation
-QT += declarative qtquick1
+QT += declarative qtquick1 widgets
 macx:CONFIG -= app_bundle
 
 SOURCES += tst_creation.cpp
index 6659eb5..2ccdcb4 100644 (file)
@@ -264,6 +264,7 @@ void tst_creation::itemtree_notree_cpp()
         QDeclarativeItem *item = new QDeclarativeItem;
         for (int i = 0; i < 30; ++i) {
             QDeclarativeItem *child = new QDeclarativeItem;
+            Q_UNUSED(child);
         }
         delete item;
     }
@@ -340,16 +341,16 @@ void tst_creation::itemtree_scene_cpp()
 
 void tst_creation::elements_data()
 {
-    QTest::addColumn<QByteArray>("type");
+    QTest::addColumn<QString>("type");
 
-    QList<QByteArray> types = QDeclarativeMetaType::qmlTypeNames();
-    foreach (QByteArray type, types)
-        QTest::newRow(type.constData()) << type;
+    QList<QString> types = QDeclarativeMetaType::qmlTypeNames();
+    foreach (QString type, types)
+        QTest::newRow(type.toLatin1()) << type;
 }
 
 void tst_creation::elements()
 {
-    QFETCH(QByteArray, type);
+    QFETCH(QString, type);
     QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 2, 0);
     if (!t || !t->isCreatable())
         QSKIP("Non-creatable type", SkipSingle);