From 0c9e55886ae3095e998c98e9cc2074dbc5c09c72 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 19 Sep 2011 13:28:13 +0200 Subject: Make declarative/creation benchmark build again Change-Id: I9ecbdcfc373e95de38e432aa627f6ab93d92afe6 Reviewed-on: http://codereview.qt-project.org/5138 Reviewed-by: Qt Sanity Bot Reviewed-by: Kent Hansen --- tests/benchmarks/declarative/creation/creation.pro | 2 +- tests/benchmarks/declarative/creation/tst_creation.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/benchmarks') diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/declarative/creation/creation.pro index 8241ace5a6..4d6cafba49 100644 --- a/tests/benchmarks/declarative/creation/creation.pro +++ b/tests/benchmarks/declarative/creation/creation.pro @@ -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 diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 6659eb5989..2ccdcb43bd 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -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("type"); + QTest::addColumn("type"); - QList types = QDeclarativeMetaType::qmlTypeNames(); - foreach (QByteArray type, types) - QTest::newRow(type.constData()) << type; + QList 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); -- cgit v1.2.3