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

generate missing Q_PROPERTY members broken

    XMLWordPrintable

Details

    • 3f0cf6d6ac (qt-creator/qt-creator/7.0) 3f0cf6d6ac (qt-creator/qt-creator/master) 3f0cf6d6ac (qt-creator/tqtc-qt-creator/7.0) 3f0cf6d6ac (qt-creator/tqtc-qt-creator/master) 3f0cf6d6ac (qt-creator/tqtc-qt-creator/qds-3.1)

    Description

      if i use "generate missing Q_PROPERTY members" on this class

      class QFoo: public QObject
      {
          Q_OBJECT
      
          Q_PROPERTY( int foo READ foo WRITE setFoo NOTIFY fooChanged )
      };
      

      i end up with something like:

      class QFoo: public QObject
      {
          Q_OBJECT
          
          Q_PR int foo() const
          {
              return m_foo;
          }
          void setFoo(int newFoo)int m_foo;
          ;
          
      signals:
          void fooChanged();
          
          OPERTY( int foo READ foo WRITE setFoo NOTIFY fooChanged )
      };
      

      it seems that qtcreator inserts code at the location of the cursor and in this case splits Q_PR and OPERTY

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: