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

Incorrect implementation of the "Refactor -> Rename Symbol Under Cursor"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 2.2.1
    • Editors
    • None
    • Hardware: Notebook Dell i7 (yeah) inside
      OS: Windows 7 Enterprise
      Env: Qt Windows SDK 1.1
      Qt Creator: 2.2.1
      My App: small application with 5-6 source files

    Description

      When using right click on a variable/object, in common words - user defined "entity", and selecting "Refactor -> Rename Symbol Under Cursor" it works fine. But when trying to rename the defined class name (defined in Qt), for instance in this code:

      //header file
      //....
      private:
          QVBoxLayout* m_documents_layout;
      //......
      
      //cpp file
      //...
      m_documents_layout = new QVBoxLayout(this);
      m_documents_layout->addWidget(m_documents_view);
      //....
      

      by renaming the QVBoxLayout (to me it should work fine, because I've decided to use QHBoxLayout instead), the editor/IDE renames also the QVBoxLayout declared in qboxlayout.h. E.g. it doesn't restricts itself to "refactor" only in local workspace area.
      After this the build is going fail with error like "Redefinition of class QHBoxLayout"(actually the QVBoxLayout replaced with QHBoxLayout after refactoring and there are two QHBoxLayouts )

      Attachments

        Issue Links

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

          Activity

            People

              leamelo Leandro T. C. Melo
              dehumanizer Vardan L Grigoryan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes