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

Refactoring 'add definition' uses wrong file if file with same name (different path) exists in the project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 2.4.0
    • Editors
    • None

    Description

      When adding a method definition in the .h file,
      the right-click menu 'refactor' has the option 'add definition in filename'

      This fails when there are multiple files in the project with the same filename.
      Refactor uses the wrong .cpp file.
      The F4 hotkey works correctly.

      The issue occurs whether the other (wrong) file is already open or not.

      When doing it the other way around, it works correctly.
      Adding a definition in the .cpp first, then selecting
      'refactor' - 'add public declaration' uses the correct .h file.

      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
              brecht Brecht Kuppens
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes