diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-02-09 18:21:30 +1000 |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2011-02-09 18:21:30 +1000 |
commit | 6129a16a74620916d3e8bff29a3788374ca21c94 (patch) | |
tree | 7f9960f986e822c897c6230c4a18f6b717ed7106 /tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp | |
parent | 3ebbb660d6f0c29b438f49dc8187b1b353ee1b8a (diff) | |
parent | 1759f7d688903210a142d7f93a6d173c52995d2f (diff) | |
download | qt4-tools-6129a16a74620916d3e8bff29a3788374ca21c94.tar.gz |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Conflicts:
tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
Change-Id: I8da521f05ebc266d91caa582852155b571d5cc63
Diffstat (limited to 'tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp index b30f9cff20..a4e9270e81 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp @@ -54,6 +54,8 @@ public: private slots: void importsPlugin(); + void importsPlugin2(); + void importsPlugin21(); void incorrectPluginCase(); void importPluginWithQmlFile(); }; @@ -122,6 +124,38 @@ void tst_qdeclarativemoduleplugin::importsPlugin() delete object; } +void tst_qdeclarativemoduleplugin::importsPlugin2() +{ + QDeclarativeEngine engine; + engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports")); + QTest::ignoreMessage(QtWarningMsg, "plugin2 created"); + QTest::ignoreMessage(QtWarningMsg, "import2 worked"); + QDeclarativeComponent component(&engine, TEST_FILE("data/works2.qml")); + foreach (QDeclarativeError err, component.errors()) + qWarning() << err; + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + QCOMPARE(object->property("value").toInt(),123); + delete object; +} + +void tst_qdeclarativemoduleplugin::importsPlugin21() +{ + QDeclarativeEngine engine; + engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports")); + QTest::ignoreMessage(QtWarningMsg, "plugin2.1 created"); + QTest::ignoreMessage(QtWarningMsg, "import2.1 worked"); + QDeclarativeComponent component(&engine, TEST_FILE("data/works21.qml")); + foreach (QDeclarativeError err, component.errors()) + qWarning() << err; + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + QCOMPARE(object->property("value").toInt(),123); + delete object; +} + void tst_qdeclarativemoduleplugin::incorrectPluginCase() { QDeclarativeEngine engine; |