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

Autoindentation fails on namespace below preprocessor macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • Qt Creator 4.3.1, Qt Creator 4.4.0-rc1, Qt Creator 4.4.0
    • C/C++/Obj-C++ Support
    • None
    • Windows 7 64bit
    • 2524e2adb (master)

    Description

      I am creating a new C++ class through the qt creator wizard. As i have specified the class name in the "namespace::classname" format, the class is contained in the namespace upon finishing the wizard. If i put a simple macro name above the line, which has the namespace definition, the automatic indentation of the file shifts everything in the namespace one level to the right side. If the macro is removed, the auto indentation restores the previous indentation. The attached file is in this exact condition and removing/inserting "MY_MACRO" should demonstrate this behavior.

      I have discovered this bug, while writing a custom JSON wizard. Our template file needs a specific preprocessor macro before and after the namespace. The wizard runs the auto indentation on the generated files, which leaves them messed up.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            mariohenze Mario Henze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes