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

[Reg 4.7 -> 4.8] Code completion for sizeof() gets in my way when typing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 4.8.0-beta2
    • Qt Creator 4.8.0-beta1
    • None
    • Creator 4.8.0-beta1 snapshot from Sep 21 2018, from rev. d7be70afd4
    • Windows
    • 5601ac29526500471a745beb03a42320a4fadd5a 890b6e2540738eaabab80b1bd4699637e0712809 (qt-creator/qt-creator/4.8)

    Description

      Probably a regression, I didn't notices this earlier.

      Steps to reproduce:

      #include <string.h>
      
      typedef struct {
        int bar;
      } Foo;
      
      int main()
      {
        Foo foo;
        memset(&foo, 0|) // type ", sizeof(foo));" at cursor
        // expected: memset(&foo, 0, sizeof(foo));
        // actual:   memset(&foo, 0, sizeof (foo));)()
        	
        return 0;
      }
      
      • Note that is will work if I accept the completion, as the cursor then jumps into the sizeof braces
      • After sizeof, an additional space is entered which I don't want and have to delete manually

      Attachments

        1. sizeof-completion.webm
          97 kB
        2. sizeof.mp4
          161 kB

        Issue Links

          Activity

            People

              kosjar Nikolai Kosjar
              aha_1980 André Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: