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

Highlighting of disabled code

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.14.0-beta1
    • Qt Creator 4.0.3, Qt Creator 4.1.0
    • Editors
    • None
    • (Gentoo) Linux

    • 0ca9ea353c91b9715e1dc9e8533560f94f261e23 (qt-creator/qt-creator/4.14)

    Description

      Usually I have the lines that are disabled by the preprocessor highlighted with a different background color. The problem with this is that when a right margin is displayed, everything to the right has the same background color as disabled code (see attachment). Is this really intended so or is it a bug? In my opinion it's more annoying than useful because there is no such thing as disabled code after column 80. We have only disabled lines in our code.
      I've worked with several IDEs and they all work more or less the same way, they simply highlight the lines that are disabled by the preprocessor with a different background color (or even fold/hide those lines). Would this also be possible in Qt Creator?
      I've also noticed that the first line of the preprocessor statement (in the attachment the "#if 0") has the same highlighting as normal code while the last line of the preprocessor statement (the #endif) is highlighted as disabled code. Is this also intended this way? In my opinion both lines should have the same highlighting and not be mixed as it is now.
      And also, IDEs like Eclipse still syntax highlight disabled code as everything else, it's just the background color that is different. This makes it easier to look at the disabled code and change something very quickly. It would be nice if this was also the case in Qt Creator.

      Attachments

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

        Activity

          People

            davschul David Schulz
            bfrg bfrg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes