diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp index f541f8f1..8c1cd6af 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp @@ -167,15 +167,19 @@ void tst_qdeclarativemoduleplugin::incorrectPluginCase() QList<QDeclarativeError> errors = component.errors(); QCOMPARE(errors.count(), 1); + QString expectedError = QLatin1String("module \"org.qtproject.WrongCase\" plugin \"PluGin\" not found"); + #if defined(Q_OS_MAC) || defined(Q_OS_WIN32) + bool caseSensitive = true; #if defined(Q_OS_MAC) + caseSensitive = pathconf(QDir::currentPath().toLatin1().constData(), _PC_CASE_SENSITIVE); QString libname = "libPluGin.dylib"; #elif defined(Q_OS_WIN32) + caseSensitive = false; QString libname = "PluGin.dll"; #endif - QString expectedError = QLatin1String("plugin cannot be loaded for module \"com.nokia.WrongCase\": File name case mismatch for \"") + QFileInfo(__FILE__).absoluteDir().filePath("imports/com/nokia/WrongCase/" + libname) + QLatin1String("\""); -#else - QString expectedError = QLatin1String("module \"com.nokia.WrongCase\" plugin \"PluGin\" not found"); + if (!caseSensitive) + expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + QDir(importsDirectory()).filePath("org/qtproject/WrongCase/" + libname) + QLatin1String("\""); #endif QCOMPARE(errors.at(0).description(), expectedError); @@ -212,7 +216,7 @@ void tst_qdeclarativemoduleplugin::remoteImportWithQuotedUrl() QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData("import \"http://127.0.0.1:14450/com/nokia/PureQmlModule\" \nComponentA { width: 300; ComponentB{} }", QUrl()); + component.setData("import \"http://127.0.0.1:14450/org/qtproject/PureQmlModule\" \nComponentA { width: 300; ComponentB{} }", QUrl()); QTRY_COMPARE(component.status(), QDeclarativeComponent::Ready); QObject *object = component.create(); @@ -234,7 +238,7 @@ void tst_qdeclarativemoduleplugin::remoteImportWithUnquotedUri() QDeclarativeEngine engine; engine.addImportPath(importsDirectory()); QDeclarativeComponent component(&engine); - component.setData("import com.nokia.PureQmlModule 1.0 \nComponentA { width: 300; ComponentB{} }", QUrl()); + component.setData("import org.qtproject.PureQmlModule 1.0 \nComponentA { width: 300; ComponentB{} }", QUrl()); QTRY_COMPARE(component.status(), QDeclarativeComponent::Ready); |