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

Add Refactor/"Quick Fix" to generate the boilerplate Q_PROPERTY code

XMLWordPrintable

    • 5b5ae971045adebe40209150cf9e1cac6cc62191 (qt-creator/qt-creator/master)

      There should be a QtCreator Refactor/"Quick Fix" to generate the boilerplate code for typical Q_PROPERTY usage. When right clicking on a [private] data member variable in QtCreator, we should offer 2 new refactor options:

      //ex: right-clicking on m_X
      int m_X;
      

      Option 1) Declare Q_PROPERTY + NOTIFY Signal
      results in:

         Q_PROPERTY(int x MEMBER m_X NOTIFY xChanged)
         protected:
             void xChanged(int newX);
      

      Option 2) Declare Q_PROPERTY
      results in:

        Q_PROPERTY(int x MEMBER m_X)
      

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

            bubke Marco Bubke
            d3fault d3fault
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes