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

Tabs/spaces indentation settings conflict

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.1.0-beta1
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Kubuntu 16.04, x86_64.

      Description

      QtCreator has two places where the user has to select the indentation mode: tabs or spaces. One place is in the Text Editor/Behavior tab and the other is in C++/Code Style settings. When these two settings are out of sync it is unclear what QtCreator will do (in my case, when the code style was using spaces and the text editor was using tabs - tabs were used) and in 50% cases it will do not what the user intended.

      Besides the confusion, the two places make it unnecessarily complicated to change from one mode to the other e.g. when switching between projects with different coding policies. It's easy to forget to change the setting in one place and then suddenly discover that the code is mangled with incorrect indents all over it.

      I suggest leaving indentation settings in only one place with an easy way of switching between the modes.

        Attachments

        1. form_max_size_decor.cpp
          7 kB
        2. max_size_decorator.hpp
          19 kB
        3. qtcreator_indent_cxx.png
          qtcreator_indent_cxx.png
          125 kB
        4. qtcreator_indent_text_edit.png
          qtcreator_indent_text_edit.png
          148 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              lastique Andrey Semashev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes