From ac8f94a8d28403ccd3b6200a7cc88389241cd29c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@digia.com> Date: Mon, 8 Oct 2012 12:53:54 +0200 Subject: [PATCH] Test.QmlDesigner: removing declarative dependency Change-Id: Ib15120c846187bd37cf22fae88ae6ece20d2417a Reviewed-by: Marco Bubke <marco.bubke@digia.com> --- tests/auto/qml/qmldesigner/common/statichelpers.cpp | 13 ------------- tests/auto/qml/qmldesigner/coretests/coretests.pro | 1 - .../auto/qml/qmldesigner/coretests/tst_testcore.cpp | 7 +------ tests/auto/qml/qmldesigner/testview.cpp | 1 + 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/tests/auto/qml/qmldesigner/common/statichelpers.cpp b/tests/auto/qml/qmldesigner/common/statichelpers.cpp index 4b108c43319..7f393423d80 100644 --- a/tests/auto/qml/qmldesigner/common/statichelpers.cpp +++ b/tests/auto/qml/qmldesigner/common/statichelpers.cpp @@ -69,19 +69,6 @@ static QString bareTemplate("import Qt 4.6\n" "}"); static QString contentsTemplate(bareTemplate.arg("Text { id: textChild; x:10; y: 10; text: \"%1\"; %2 }")); - -void printErrors(const QList<QDeclarativeError> &errors, const QString &fileName) -{ - if (errors.isEmpty()) - return; - - qDebug() << "Error loading file \"" << fileName << "\":"; - - foreach (const QDeclarativeError &error, errors) { - qDebug() << error.line() << ":" << error.column() << ": " << error.description(); - } -} - // TODO: this need to e updated for states static bool compareProperty(const AbstractProperty &property1, const AbstractProperty &property2) { diff --git a/tests/auto/qml/qmldesigner/coretests/coretests.pro b/tests/auto/qml/qmldesigner/coretests/coretests.pro index b022bd85a04..0c15be95202 100644 --- a/tests/auto/qml/qmldesigner/coretests/coretests.pro +++ b/tests/auto/qml/qmldesigner/coretests/coretests.pro @@ -13,7 +13,6 @@ unix: QMAKE_LFLAGS += \'-Wl,-rpath,$${IDE_LIBRARY_PATH}\' \'-Wl,-rpath,$${IDE_PL QT += script \ network \ - declarative \ webkit # DEFINES+=QTCREATOR_UTILS_STATIC_LIB QML_BUILD_STATIC_LIB diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index 91d5e2d314b..8c905cf1ff2 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -63,9 +63,6 @@ #include <qmljs/qmljsinterpreter.h> #include <QPlainTextEdit> -#include <private/qdeclarativestate_p.h> -#include <private/qdeclarativemetatype_p.h> -#include <QDeclarativeItem> //TESTED_COMPONENT=src/plugins/qmldesigner/designercore @@ -331,7 +328,6 @@ void tst_TestCore::testRewriterErrors() void tst_TestCore::saveEmptyCoreModel() { - QList<QDeclarativeError> errors; QFile file(":/fx/empty.qml"); QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); @@ -366,7 +362,6 @@ void tst_TestCore::saveEmptyCoreModel() void tst_TestCore::loadAttributesInCoreModel() { - QList<QDeclarativeError> errors; QFile file(":/fx/attributes.qml"); QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); @@ -1815,7 +1810,7 @@ void tst_TestCore::testQmlModelView() QCOMPARE(node3.instanceValue("width").toInt(), 0); QCOMPARE(node3.instanceValue("x").toInt(), 20); - QVERIFY(!QDeclarativeMetaType::toQObject(node3.instanceValue("anchors.fill"))); + //QVERIFY(!QDeclarativeMetaType::toQObject(node3.instanceValue("anchors.fill"))); node3.setBindingProperty("anchors.fill", "parent"); QCOMPARE(node3.instanceValue("x").toInt(), 0); QCOMPARE(node3.instanceValue("width").toInt(), 20); diff --git a/tests/auto/qml/qmldesigner/testview.cpp b/tests/auto/qml/qmldesigner/testview.cpp index 9f91d494451..ce6860b2123 100644 --- a/tests/auto/qml/qmldesigner/testview.cpp +++ b/tests/auto/qml/qmldesigner/testview.cpp @@ -30,6 +30,7 @@ #include "testview.h" #include <QDebug> +#include <QUrl> #include <qtestcase.h> #include <abstractproperty.h> #include <bindingproperty.h> -- GitLab