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

Renaming symbols should check for existence

    XMLWordPrintable

Details

    Description

      When renaming a symbol under cursor Creator seems not to check if the new name is used already. This can lead to bad errors afterwards.

      What I mean in detail:

      • create a simple C++ project
      • add some global variables or class variables with different types OR/AND functions with different types of return values and parameter lists
      • rename the different variables/functions step by step using the 'Rename symbol under cursor' feature to one of them that has already been used (or rename all to a complete new one) - but always use the same name for the variables or functions

      Current behaviour:

      • Creator won't refuse the renaming
      • if you try to compile it later - you'll get the issues (conflicting declarations, XYZ has a previous declaration, call of overloaded XYZ() is abigous,...)

      Suggested behaviour:

      • Creator should check if the wanted new name is already in use
      • if already in use Creator should bring up a warning or maybe even completely refuse to rename to this name

      I know renaming depends normally on senseful name choices and the developer is the one to blame if this ends up in a mess. But especially inside bigger projects this would be helpful

      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
              cstenger Christian Stenger
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes