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

Code completion not working on function arguments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 8.0.0-rc1
    • Qt Creator 7.0.0-beta2
    • C/C++/Obj-C++ Support
    • None
    • MacBook Pro (M1), macOS 12.1, Apple clangd version 13.0.0 (clang-1300.0.29.30)
    • macOS
    • 8130d895c8 (qt-creator/qt-creator/8.0) 8130d895c8 (qt-creator/qt-creator/master) 8130d895c8 (qt-creator/tqtc-qt-creator/8.0)

    Description

      When typing a function call, code completion does not appear for arguments until the closing brace and the semicolon are present and the function declaration tooltip is not present and there are the right number of arguments to match the declaration. Only then is it possible to go back and get code completion for the arguments.

      I have attached a video showing an example.

      In summary (using the example code from the video)

      • Typed auto result = object.aMethod(ado
        (latest thing typed: ado)
        code completion fails because the function statement is incomplete without the closing brace.
      • Typed auto result = object.aMethod(ado)
        (latest thing typed: ado)
        code completion fails because the function statement is incomplete without the semicolon.
      • Typed auto result = object.aMethod(ado);
        (latest thing typed: ado)
        code completion fails because this function has 2 arguments and so the function statement does not match an actual function.
      • Typed auto result = object.aMethod(ado,);
        (latest thing typed: ado)
        code completion succeeds but only if the function declaration tooltip is not visible.
      • Typed auto result = object.aMethod(,ani);
        (latest thing typed: ani)
        code completion succeeds but only if the function declaration tooltip is not visible.

      Possibly related to https://bugreports.qt.io/browse/QTCREATORBUG-26959?

      Attachments

        Issue Links

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

          Activity

            People

              davschul David Schulz
              paulmasri Paul
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes