Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creator 13 + clang code model completer mess-up
Forum Updated to NodeBB v4.3 + New Features

Creator 13 + clang code model completer mess-up

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 5 Posters 713 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by JonB
    #1

    Creator 13.0.0 with clang code model/completion. Default settings.

    Seemingly, in some circumstances, when inserting the first statement inside a function/method I get "mess up".

    I start with an new, empty method like:

    void Class::method()
    {
    }
    

    (Happens whether or not I have put the declaration for the class member method in the .h file.)

    I now open a line and type the start of any function (declared or not):

    Screenshot 2024-09-12 153300.png

    So far, so good. Now I type the opening parenthesis, and this is what it does:

    Screenshot 2024-09-12 153414.png

    [You might want to click on that pic to enlarge it.] That is 9 sets of the left-hand-line-thing plus spaces, throwing me right across the page. Yuck!

    As and when I type the terminating ; it (thankfully) reverts to:

    Screenshot 2024-09-12 153601.png

    But it's really disconcerting!

    Can I reproduce? Yes. Can I tell you when it will happen? No! Tried elsewhere in that .cpp file (result: similar behaviour, but sometimes fewer than 9 of the "left-hand-line-thing plus spaces" inserted), in other files (sometimes similar, sometimes no extra inserts). Seemingly only happens on first statement in a function. I don't know what the pattern is, though it might not happen in an "empty" file.

    [BTW, it's not just a screen-misdraw: those extra indenting spaces are there (as a single item) in the Undo history.]

    Nobody experiencing same?

    J.HilkJ 1 Reply Last reply
    0
    • artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by
      #2

      I am having the same issue, I figured it's somehow related to autointendation setting, it's getting confused sometimes.

      For more information please re-read.

      Kind Regards,
      Artur

      JonBJ 1 Reply Last reply
      0
      • artwawA artwaw

        I am having the same issue, I figured it's somehow related to autointendation setting, it's getting confused sometimes.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @artwaw
        LOL. So I'm neither going mad nor alone in this! Absolutely I'm sure it's "related to autointendation"!

        So that I know what to expect, what Creator version are you, and what platform?

        artwawA 1 Reply Last reply
        0
        • JonBJ JonB

          @artwaw
          LOL. So I'm neither going mad nor alone in this! Absolutely I'm sure it's "related to autointendation"!

          So that I know what to expect, what Creator version are you, and what platform?

          artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by
          #4

          @JonB 14.0.1, macOS (arm) and Windows (x86).

          For more information please re-read.

          Kind Regards,
          Artur

          JoeCFDJ 1 Reply Last reply
          0
          • artwawA artwaw

            @JonB 14.0.1, macOS (arm) and Windows (x86).

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #5

            @artwaw Same issue with 14.0.1 on Ubuntu 22.04. Reloading the project helps sometimes.

            1 Reply Last reply
            0
            • Axel SpoerlA Offline
              Axel SpoerlA Offline
              Axel Spoerl
              Moderators
              wrote on last edited by
              #6

              Can reproduce it too.
              It's a bug, clearly.

              Software Engineer
              The Qt Company, Oslo

              1 Reply Last reply
              0
              • JonBJ JonB

                Creator 13.0.0 with clang code model/completion. Default settings.

                Seemingly, in some circumstances, when inserting the first statement inside a function/method I get "mess up".

                I start with an new, empty method like:

                void Class::method()
                {
                }
                

                (Happens whether or not I have put the declaration for the class member method in the .h file.)

                I now open a line and type the start of any function (declared or not):

                Screenshot 2024-09-12 153300.png

                So far, so good. Now I type the opening parenthesis, and this is what it does:

                Screenshot 2024-09-12 153414.png

                [You might want to click on that pic to enlarge it.] That is 9 sets of the left-hand-line-thing plus spaces, throwing me right across the page. Yuck!

                As and when I type the terminating ; it (thankfully) reverts to:

                Screenshot 2024-09-12 153601.png

                But it's really disconcerting!

                Can I reproduce? Yes. Can I tell you when it will happen? No! Tried elsewhere in that .cpp file (result: similar behaviour, but sometimes fewer than 9 of the "left-hand-line-thing plus spaces" inserted), in other files (sometimes similar, sometimes no extra inserts). Seemingly only happens on first statement in a function. I don't know what the pattern is, though it might not happen in an "empty" file.

                [BTW, it's not just a screen-misdraw: those extra indenting spaces are there (as a single item) in the Undo history.]

                Nobody experiencing same?

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @JonB I also have this with QtC14, less frequently but it does happen.

                Have you ever tried ordering arguments or initlizerlists vertically ? A nightmare. It just moves it one line lower, with the whitespaces added to place it at roughly the same horizontal place as before.

                Then you manually move it to the left below the first argument/entry, to where you want it then it stays there until it doesn't, every once in a while a new element/argument added will move everything back to the right.


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                1 Reply Last reply
                0
                • JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by JonB
                  #8

                  @All of you,
                  Now that I have raised this you are all coming out of the woodwork with your tales of similar woe :) So has anyone reported this as Qt bug?? Does anyone have a small reproducer, perhaps for Creator 14?

                  1 Reply Last reply
                  0
                  • artwawA Offline
                    artwawA Offline
                    artwaw
                    wrote on last edited by
                    #9

                    Sureway to reproduce is @J-Hilk 's. But I can try to procure something later on today.

                    For more information please re-read.

                    Kind Regards,
                    Artur

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved