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

Indicate the name of each parameter in function calls

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • None
    • C/C++/Obj-C++ Support
    • None

    Description

       

      This is a feature request to indicate the name of each parameter in some way in function calls.

      CLion has this feature. If there is a function

      void fun(int x, int y);

      then the function call

      fun(2,3);
      

      is displayed as 

      fun(x: 2, y: 3);
      

      This is just one way to convey this information. There could be other ways as well (e.g., tooltips, though I would not find those equally convenient).

       

      I include a screenshot from CLion below:

      Notice that CLion annotates arguments in function calls in a smart way: only those arguments are annotated where a literal value is passed. Where a variable is passed, ideally the variable name gives enough hints to identify the argument.

      I often work with the igraph C library, which has lots of functions with very long argument lists. It is often difficult to identify which argument is which when reading code. CLion makes the code much more readable. I would find a similar feature in Qt Creator extremely useful.

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            szhorvat Szabolcs Horvát
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes