When a qmldir contains multiple definitions with the same name and
version numbers, the error message should indicate that the problem is
localized to that qmldir file.
Change-Id: I02cd4862c9ead2fd7ed1c75d0fa6949ab3eda6f6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
(cit2->minorVersion == cit->minorVersion)) {
// This entry clashes with a predecessor
QQmlError error;
- error.setDescription(QQmlImportDatabase::tr("\"%1\" version %2.%3 is already defined in module \"%4\"")
+ error.setDescription(QQmlImportDatabase::tr("\"%1\" version %2.%3 is defined more than once in module \"%4\"")
.arg(cit->typeName).arg(cit->majorVersion).arg(cit->minorVersion).arg(uri));
errors->prepend(error);
return false;
(sit2->minorVersion == sit->minorVersion)) {
// This entry clashes with a predecessor
QQmlError error;
- error.setDescription(QQmlImportDatabase::tr("\"%1\" version %2.%3 is already defined in module \"%4\"")
+ error.setDescription(QQmlImportDatabase::tr("\"%1\" version %2.%3 is defined more than once in module \"%4\"")
.arg(sit->nameSpace).arg(sit->majorVersion).arg(sit->minorVersion).arg(uri));
errors->prepend(error);
return false;
<< "import com.nokia.installedtest1 1.0\n"
"Test {}"
<< ""
- << "\"Test\" version 1.0 is already defined in module \"com.nokia.installedtest1\"";
+ << "\"Test\" version 1.0 is defined more than once in module \"com.nokia.installedtest1\"";
QTest::newRow("installed import version JS clash")
<< "import com.nokia.installedtest2 1.0\n"
"Test {}"
<< ""
- << "\"Test\" version 1.0 is already defined in module \"com.nokia.installedtest2\"";
+ << "\"Test\" version 1.0 is defined more than once in module \"com.nokia.installedtest2\"";
}
void tst_qqmllanguage::importsInstalled()