Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21107

QML preview plugin sends wrong qmldir files to target

    XMLWordPrintable

Details

    • 5e9bf26fb34f44225168bc6f03a12ef7cbb52601 (qt-creator/tqtc-plugin-qmlpreview/4.8)

    Description

      We're using Utils::FileInProjectFinder to resolve target paths back to paths on the host. This is fundamentally a heuristic, which tries to match a maximum common postfix between the target path and any files found in the project, in search paths, or in the sysroot.

      There can be many files called "qmldir" in a project, as each QML component not implicitly defined by files in a directory needs to have one of those. The QML engine speculatively asks for qmldir files in various paths when trying to resolve a component name. It will also ask for files that don't exist on the target, but we cannot determine that on the target side because we might be running without deployment or the user might have added extra files during the current preview session.

      Therefore, the path resolution heuristic in FileInProjectFinder will sometimes send wrong qmldir files for some of those requests. This is fatal for the preview, as the resulting QML components don't match what the application expects.

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes