Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20146 Mitch's refactoring suggestions
  3. QTCREATORBUG-19814

Add refactoring option that creates a getter, setter and change signal from a member

    XMLWordPrintable

Details

    • 5b5ae971045adebe40209150cf9e1cac6cc62191

    Description

      I often find myself creating properties in C++ that will be exposed to QML. Having a refactoring option that adds the signal for me and writes the setter would save me quite a bit of time after a while:

      void Foo::setBar(int bar)
      {
          if (bar == mBar)
              return;
      
          mBar = bar;
          emit barChanged();
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              mitch_curtis Mitch Curtis
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes