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

Indentation of moved comments do not respect C++ editor rules

    XMLWordPrintable

Details

    • Windows
    • e3c1179ab (12.0)

    Description

      The refactoring method: "Move function documentation to ..." does not respect my indenting scheme defined for C++ in QtCreator.

      E.g.

      #pragma once
      
      class ClassA
         {
         public:
            /**
             * @brief ClassA
             * @param val
             */
            ClassA(double val);
         }; 

      Using the refacoring to move the function documentation to the definition ends up in

      #include "classa.h"
      
      /**
             * @brief ClassA
             * @param val
             */
      ClassA::ClassA(double val)
         {
         }
      

      So, the indentation of the first line '/**' is correct, but the following commenting lines are not indented correctly.

       

      If I would have generated the comments in the definition file, the output for

      #include "classa.h"
      
      /**<Pressing Enter here>
      ClassA::ClassA(double val)
         {
         } 

      would have been: 

      #include "classa.h"
      /**
       * @brief ClassA::ClassA
       * @param val
       */
      ClassA::ClassA(double val)
         {
         } 

      The opposite direction from declaration to definition also seems to only respect for the first line of the function documentation the given C++ indentation.

      Please find attached the simple project and my code style file.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            moellney Michael Möllney
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes