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

qmlls should know about implicit imports of nested QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 6.8
    • 6.8.0 Beta1
    • QML: Tooling
    • Qt 6.8 Beta1
      QtCreator 14.0.0. Beta1
    • Android, iOS/tvOS/watchOS, macOS
    • b1ff6073a (dev), 2f4a57773 (6.8)

    Description

      this is a follow up of https://bugreports.qt.io/browse/QTBUG-126504

      got issues with  ekkeTestNested project, attached to QTBUG-126504

      tested withQt 6.8 Beta1 and QtC 14.0.0 Beta1, where QML Language Server is used

      Main.qml import Ekke.Apps.Main:

      Main.qml:-1: warning: Failed to import Ekke.Apps.Main. Are your import paths set up properly?

      QML_SINGLETON MyApp in Main.qml getting 'unqualified access'

      -

      HomePage

      pages/HomePage.qml:34: warning: LabelTitle was not found. Did you add all import paths?

      pages/HomePage.qml:34: warning: 'LabelTitle' is used but it is not resolved

      same for FloatingActionButton, AdminDialog

      explicit import doesnt help

      -

      AdminDialog

      with explicit import:

      popups/AdminDialog.qml:-1: warning: Failed to import Ekke.Apps.Main. Are your import paths set up properly?

      LabelTitle and LabelSubheading now not found

      QML_ELEMENT SettingsData not recognized:

      popups/AdminDialog.qml:25: warning: SettingsData was not found. Did you add all import paths?

      QML_ELEMENT not recognized and QML_SINGLETON DataManager 'unqualified access'

      -

      probably the issues with QML_SINGLETONs 'unqualified access' and QML_ELEMENTs not recognized are gone with https://codereview.qt-project.org/c/qt/qtdeclarative/+/570271

      Would be great if import paths - errors will go away and qmlls will know about nested QML dirs and implicit imports.

      will test again immediately with 6.8 Beta2

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          50 kB
        2. screenshot-2.png
          screenshot-2.png
          82 kB
        3. explicite_works.png
          explicite_works.png
          282 kB
        4. implicite_fails.png
          implicite_fails.png
          316 kB

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              ekkescorner Ekkehard
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes