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

Block folding/unfolding broken by coditional preprocessor blocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • Qt Creator 2.2.1
    • C/C++/Obj-C++ Support
    • None
    • Qt 4.7.4, Windows 7 x64, MinGW

    Description

      As you can see from the attached screenshots, adding an #if or #ifdef block to the code will break the code folding.

      Weird things will happen, like existing folds will be moved allowing to fold code which does not match an actual block, existing blocks stop being "fold-able" and deleting the #if/#ifdef block again will leave the folding indicators/buttons on the left side of the editor where they are until you edit the actual text blocks again (thus "forcing" the folding indicators to be updated).

      The attached screenshots show some simple code to make it more obvious.
      Complex, real life code blocks are even more affected and a small #if/#endif block can screw up the block folding in a whole file.

      This issue is somewhat related to suggestion QTCREATORBUG-4027 or QTCREATORBUG-2, but this one is more a bug report than a feature request so I opened a different issue.

      Attachments

        1. 1.jpg
          1.jpg
          45 kB
        2. 2.jpg
          2.jpg
          60 kB
        3. 3.jpg
          3.jpg
          56 kB
        4. 4.jpg
          4.jpg
          48 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kosjar Nikolai Kosjar
              hippydream Fabrizio Angius
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes