summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativemoduleplugin
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-18 23:17:17 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-22 23:09:16 (GMT)
commit2b098cd37d86bc7c843225412c90948affb8fef1 (patch)
treef4d21eb994ebdb8780f889cff27fb72684dbe3e4 /tests/auto/declarative/qdeclarativemoduleplugin
parent83e395ba6de068ac4ecece860cc429a4697445d0 (diff)
downloadQt-2b098cd37d86bc7c843225412c90948affb8fef1.zip
Qt-2b098cd37d86bc7c843225412c90948affb8fef1.tar.gz
Qt-2b098cd37d86bc7c843225412c90948affb8fef1.tar.bz2
Test imports with realistic paths (previously passed accidentally).
Fix failure when import path is ancestor dir of other import path.
Diffstat (limited to 'tests/auto/declarative/qdeclarativemoduleplugin')
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml (renamed from tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir (renamed from tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir)0
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp7
4 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml b/tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml
index f29ae24..f29ae24 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir
index 0a8b5d4..0a8b5d4 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
index 035cb7d..fc77225 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
@@ -2,5 +2,5 @@ TEMPLATE = lib
CONFIG += plugin
SOURCES = plugin.cpp
QT = core declarative
-DESTDIR = ../com/nokia/AutoTestQmlPluginType
+DESTDIR = ../imports/com/nokia/AutoTestQmlPluginType
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 1335c7c..26199d3 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -48,8 +48,8 @@ class tst_qdeclarativemoduleplugin : public QObject
{
Q_OBJECT
public:
- tst_qdeclarativemoduleplugin() {
- QCoreApplication::addLibraryPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("plugin"));
+ tst_qdeclarativemoduleplugin()
+ {
}
private slots:
@@ -103,9 +103,10 @@ void tst_qdeclarativemoduleplugin::importsPlugin()
{
QSKIP("Fix me", SkipAll);
QDeclarativeEngine engine;
+ engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports"));
QTest::ignoreMessage(QtWarningMsg, "plugin created");
QTest::ignoreMessage(QtWarningMsg, "import worked");
- QDeclarativeComponent component(&engine, TEST_FILE("plugin.qml"));
+ QDeclarativeComponent component(&engine, TEST_FILE("data/works.qml"));
foreach (QDeclarativeError err, component.errors())
qWarning() << err;
VERIFY_ERRORS(0);