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

Q_PROPERTY refactor uses wrong case

    XMLWordPrintable

Details

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

    Description

      I have been enjoying the use of the Q_PROPERTY() code completion and refactoring for quite a while, but ran into an issue with 4.9.0. 

       

      When I attempt to generate a Q_PROPERTY() in 4.9.0 it auto completes the Q_PROPERTY() with the proper cases based on the initial property name specified:

      Q_PROPERTY(bool testPropName READ testPropName WRITE setTestPropName NOTIFY testPropNameChanged)

       

      However, then when I right click and issue a "Refactor - Generate Missing Q_PROPERTY Members" ... it results in this:

      bool testPropName() const 
      { 
          return m_testPropName; 
      }
      
      void settestPropName(bool testPropName) 
      { 
          if (m_testPropName == testPropName) 
              return; 
      
          m_testPropName = testPropName;       
          emit testPropNameChanged(m_testPropName); 
      }
      
      void testPropNameChanged(bool testPropName);
      
      bool m_testPropName;
      

       

       You can see that "setTestPropName" somehow gets generated as "settestPropName". This worked as expected before updating, so don't think it's something with my build.

      Attachments

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

        Activity

          People

            bubke Marco Bubke
            eccsimmons G Simm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes