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

C++ Quick Fixes preview does not fit to output in refactoring

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 16.0.0-beta2
    • C/C++/Obj-C++ Support
    • None
    • Windows

    Description

      After the change in the C++ Quick Fixes to handle name and memberName in the JavaScript due to QTCREATORBUG-32459 ,
      the previews shown by using Test input: + Test have results, that are inconsistent with the very well usable output generated within the code editor.

      Quick Fixes generated by Refactoring "Create Getter an Setter Member Functions" are good:

      class MyClassA
         {   
         public:
            double d() const;
            void setD(double newD);
            float getMyF() const;
            void setMyF(float newMyF);
            int integer() const;
            void setInteger(int newInteger);
      
         signals:
            void dChanged();
            void myFChanged();
            void integerChanged();
      
         private:
            // these three members where given by me .. all other  methods where set by Quick Fix: very cool!
            double _d;
            float myF;
            int   m_integer;
      
            Q_PROPERTY(double d READ d WRITE setD NOTIFY dChanged FINAL)
            Q_PROPERTY(float myF READ getMyF WRITE setMyF NOTIFY myFChanged FINAL)
            Q_PROPERTY(int integer READ integer WRITE setInteger NOTIFY integerChanged FINAL)
         };
      

      But if I test the three member variables

      • _d
      • myF
      • m_integer

      I get following previews in the test inside the Quick Fixes editor:

       

       

       

      For all three variables the test output on the right side of the editor is different to what the refactoring in the Code Editor produced. And: the result in the Code Editor is what you want.

      This makes it difficult to predict the output of the refactored names of getter/setters/... .

       

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              moellney Michael Möllney
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes