Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.1
-
None
-
33512bc223be373975426ffcc6f8fa783a7582c9
Description
If I register an import path with a lower-case driver letter like this:
engine->addImportPath("c:/dev/qt-components/imports");
then QDeclarativeImportsPrivate::resolvedUri() might not resolve that correctly because \a dir_arg
might have a capital drive letter (which is correct, since that's what canonicalPath() will ensure).
Due to that the following condition fails:
if (dir.startsWith(path)) {
The result is that resolvedUri might return a uri like this: C:.dev.qt-components.imports.Qt.labs.components.meego,
and ultimately QDeclarativeImportDatabase::importPlugin() will complain:
"Internal error: Plugin imported previously with different uri"
It should canonicalize all filepaths before they are stored in the QDeclarativeImportDatabase.
The attached patch is a suggested fix for the problem.