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

Honor Qt's naming conventions for m_* prefix in autogenerated setters (dont use 'arg')

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 3.1.2, Qt Creator 3.2.0-beta1, Qt Creator 3.2.0-rc1, Qt Creator 3.2.0, Qt Creator 3.3.0-beta1
    • Editors
    • None

    Description

      The standard for Qt Class member variables is m_variable and the setter, getter and signal is:

      public:
        void setVariable(const MyType variable);
        MyType variable() const;
      signals:
        void variableChanged();
      protected:
        MyType    m_variable;
      

      However the current automatic code generator names variables "arg" for the setter, and eventually you get 'arg's everywhere, this forces to rewrite it as soon as it was auto-generated (makes it less magical less automatic).

      Please honor Qt's naming conventions at least when m_* prefix is used:

         void setVariable(const MyType arg); // <- BAD
         void setVariable(const MyType variable); // <- GOOD
      protected:
         MyType  m_variable;
      

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            desert Ariel Molina R.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes