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

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 4.13.2
    • C/C++/Obj-C++ Support
    • None
    • Linux/X11, Windows

    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

            kandeler Christian Kandeler
            eligt Elia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes