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

Function parameter tooltips stay present when they are no longer relevant

    XMLWordPrintable

Details

    • Linux/X11
    • ba83b852b63a0085fb221fbc755348fd4bff6906 (qt-creator/qt-creator/4.15)

    Description

      When typing a function or constructor call, QtCreator displays tooltips with the function signature, including the parameters as you type. That tooltip stays present even if you complete typing the call or navigate away from the call site (e.g. when you're only adjusting the existing code, converting it into a function call).

      For example:

      #include <string>
      
      void test()
      {
          std::string("abcd", 4);
      }
      

      If you try typing the code above, QtCreator will display a tooltip as you type a comma between `std::string` constructor parameters. That tooltip will stay present all the way until the end of the function and can only be removed by pressing Esc.

      Another example:

      #include <string>
      
      void test()
      {
          "abcd";
      }
      

      Try converting the code above to the previous code sample. You would start by typing `std::string(` before the literal, and then navigate past the literal and type `, 4)`. The tooltip appears as you type the opening parenthesis and stays present all the way to the end. Furthermore, since the tooltip is present, pressing Up and Down arrows will switch between the suggested constructor signatures and prevent you from navigating the code.

      The tooltip should be removed if:

      • The user types the closing parethesis,
      • The user navigates away from the call site, e.g. by moving the cursor before the opening parenthesis or past the closing one (even if that parethesis already existed). This also includes user pressing Home, End, Page Up, Page Down.
      • The user pastes code from clipboard. Ideally, the code could be parsed to see if the call is complete as a result of pasting, but simply disabling the tooltip unconditionally would be fine as well.

      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
              lastique Andrey Semashev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes