Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16885

QDeclarativeEngine::addImportPath() does not work if the drive letter is in lowercase.

    XMLWordPrintable

Details

    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bealam Bea Lam (closed Nokia identity) (Inactive)
            smd Jan Arve
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes