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

qmlls: completion and navigation for C++ code doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.10
    • 6.10.0
    • QML: Tooling
    • None

      After changing my CMakeLists.txt Qml-Modules to use DEPENDENCIES TARGET target1 TARGET target2 ... instead of referencing the module URIs, cmake now popuplates .qmlls.ini with the importPath so that qmlls finally starts to be somewhat usable, meaning it no longer generates warnings about import paths not found and all the follow-up problems caused by that. This is great!

      However, neither completion (e.g. property names) nor code navigation (F2) for c++ components seem to work.

      For example, trying to navigate to the C++ Header of SomeComponent defined in someheader.h fails. Checking the Qt Creator logs I can see messages like this:

      10:22:03.598 qtc.languageclient.messages: StdIOClient send data:
      10:22:03.598 qtc.languageclient.messages: {"id":"{bc922e95-afa4-4ef3-a2ca-9de26a4593e6}","jsonrpc":"2.0","method":"textDocument/definition","params":{"position":{"character":11,"line":29},"textDocument":{"uri":"file:///.../MyComponent.qml"}}}
      10:22:03.600 qtc.languageclient.messages: StdIOClient std err:
      
      10:22:03.600 qtc.languageclient.messages: Could not find file "somecppheader.h" in the dom!
      
      10:22:03.600 qtc.languageclient.messages: StdIOClient std out:
      

      somecppheader.h is part of a proper Qml-Module and does have QML_ELEMENT annotations and qmllint is altogether happily type checking.

      Am I still missing something?

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

            sami.shalayel Sami Shalayel
            njeisecke_qtc Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes