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

outline collapses at every keystroke

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • Qt Creator 15.0.1
    • Qt Creator 15.0.0
    • Editors
    • None
    • Linux/Wayland
    • 025efa096 (15.0)

    Description

      in a C++ file, regardless of it being header or source file, there is an outline in the right side panel. It shows the class structure, the enums and the methods etc.

      I liked using this to be able to do simple things like type enum value names that are defined somewhere at the top of the file. Lets go with this example.

      I have a C++ file, it is rather large and at the top of the file it is an enum with 3 values. Followed with a bunch of methods.
      The outline shows the enum as a collapsible tree item. To use it, you need to thus open the tree node and then you can copy the data.
      Notice that selecting the tree-node-leaf jumps the cursor as such you can not do that while typing new code.

      So, I'm somewhere in the bottom of the file and want to manually-copy one or two of the enum values by typing the names, which I read directly from the outline list. Easy.

      Unfortunately, there is a problem. Any and all outline tree nodes are collapsed at every single re-parse of the file. Which happens at every single keystroke. Or, in other words, the outline is useless to me since the actual enum value is hidden at the first key I type.

      Second scenario:

      I have a class definition header file and I'm designing an API for it.
      The issue I want to highlight here is different. When I'm tying a new method signature, there is a good chance the file won't parse.
      Type: void foo(
      without closing brace and you'll see what I mean.

      The effect is even the class itself that you are editing is collapsed in the outline tree. You only have top level items until you make the file parse again. (add the closing brace in the simple example above)

      Also in the second scenario the tree re-collapses every single keystroke.

      What I expect to happen:

      the easiest thing: if the tree did not factually change, have there be zero updates/repaints/whatever in the view.

      if there was a parsing issue, similarly do not update the tree. I'm typing, updates can wait until it parses again.

      And bonus feature, it would be nice to remember which nodes I opened so they can stay open.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-32218
        # Subject Branch Project Status CR V

        Activity

          People

            davschul David Schulz
            tomz Tom Zander
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes