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

Qt Creator with clang code model prevents F2 or CTRL+click navigation to function if all parameters are not filled in

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.13.2
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      When using the clang code model, Qt Creator correctly identifies a function as belonging to a certain object, i.e. autocomplete works and the tooltip shows up with the function signature.

      The problem however is that if you don't fill in all parameters and with correct values (i.e. a "semantic issue" is detected) then it looks like the function is "marked" invalid and you cannot do anything with the symbol, such as navigating to definition (F2, CTRL + click) or "finding references".

      The expectation would be for Qt Creator to navigate to the first defined version of that function, in the same way as it pulls up the function signature in the tooltip. This is especially true if only one version of the function is present, with no overloads.

      I noticed a further issue, not only you cannot navigate to the function symbol, if the parameter types don't match you can't navigate to any symbols inside the parentheses. So, if the function requires parameter one to be a Vector2 class, and you have a Vector3(0) as the parameter, you cannot navigate to the definition of Vector3.

        Attachments

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

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            eligt Elia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes