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

"Apply function signature changes" generates wrongly formatted code

    XMLWordPrintable

Details

    • Linux/Wayland
    • 05ae8f2fa (15.0)

    Description

      The "Apply function signature changes" inserts parameters with hardcoded order of qualifiers (['const', 'type']) and does not mark the changed line as changed. Thus one needs to manually touch that line in order to force-format it.

      Small Analysis:
      1) "Apply function signature changes" quick fix is formatted incorrectly, or not formatted at all

      2) The line isn't marked as changed (I couldn't reproduce it)

      3) If applying "Apply function signature changes" quick fix for the function

      void foo(int const *i);
      

      the result will be incorrect:

      void foo(const int *i)
      {
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              eugeneshalygin Eugene Shalygin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes