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

interaction between beautifier 'format on save' and text editor 'clean whitespace'

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.4.1, Qt Creator 4.5.0
    • Editors
    • None

    Description

      The following options can have conflicting effects when both are enabled:

      • the 'Clean Whitespace' option in Preferences > Text Editor > Behavior
      • the 'Enable auto format on file save' option in Preferences > Beautifier > General

      In my case, the clean whitespace option appeared to have been applied last, meaning that it overwrote the formatting done by Beautifier/clang-format, which was confusing. Running Beautifier via the menu item would result in the expected formatting.

      Would be nice to indicate/warn somehow that multiple formatting hooks are configured to run on save, to help mitigate this behavior.

      Attachments

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

        Activity

          People

            davschul David Schulz
            liam.stask Liam Staskawicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes