Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Creator: Configure autocomplete for initializer lists



  • There's a new autocomplete behavior in 4.8.0 that really annoys me. When I code initializer lists for constructors, my preferred code style looks like this:

    MyClass::MyClass()
        : m_Member1(value1),
          m_Member2(value2),
          m_Member3(value3)
    

    Previously, I could quickly type that list down. Type first line with some help from autocomplete, hit <Return>, auto-indent positions me correctly so I could immediately start the second line.

    What happens now it that the first comma triggers an autocomplete for filling out the next member variable. So if I hit <Return>, the initializer list is continued in the same line:

    MyClass::MyClass()
        : m_Member1(value1),m_Member2(value2),m_Member3(value3)
    

    I have looked in the options to find a way to either force line breaks for initializer lists, or disable autocomplete for this, but have been unsuccessful.

    Any hints?


Log in to reply