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

ClangCodeModel's completion offers function twice

    XMLWordPrintable

Details

    Description

      1. Have the ClangCodeModel enabled.
      2. Define a class like this:
        class Test{
            void fun(int a);
            void fun(int a, int b);
        //    void fun();
        };
        
      3. Have an object of that class, start typing the function's name and trigger code completion:
            Test t;
            t.f
        

        The function's name will be completed including the opening brace.

      4. After the other function declarations, add a function of the same name to your class which does not take a parameter, e.g. just uncomment the line in the example above.
      5. Repeat step 3.
        The function will not be completed, but you'll see a popup offering you the function twice.

      I don't think it makes sense to show the function twice because only the name would be completed anyway. Even worse, if the function without parameters is declared above the others, the function's name will be completed immediately.

      Found by Squish test tst_CSUP06.

      Attachments

        1. funwithclang.png
          4 kB
          Robert Löhning
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kosjar Nikolai Kosjar
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes