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

C++ Quick Fixes default different to version 15

    XMLWordPrintable

Details

    • Windows
    • b84db927e (16.0)

    Description

      When using the quick fixes to generate getter/setter for a class member variable the output of QtCreator 15 was:

      member name getter method name setter method name comment
      double _d double d() const; void setD(double newD); getter has not prepend get if member is prepended with an '_'
      long l; long getL() const; void setL(long newL); getter has prepend get to avoid clash with member name: l() would not be acceptable!

      In QtC 16 the C++ Quick Fixes seem to use JavaScript to generate the getter and setter:

      member name getter method name setter method name comment
      double _d double get_d() const; void set_d(double newD); getter always prepends get, even if member is prepended with an '_'
      long l; long getL() const; void setL(long newL); same behavior as in QtC 15

       

      The new C++ Quick Fixes do not generate good getter method names.

      They always prepend get, what is different to all getter methods in Qt Classes.

      E.g., 

      QRect getters are:

      buttom() not getButtom()

      buttomLeft() not getButtomLeft()

      width() not getWidth().

      ...

      Please set a default in QtC 16 in the C++ Quick Fixes that fits the Qt getter method naming pattern.

      Attachments

        Issue Links

          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