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

"Search & Replace" in whole project only edits current open file (and maybe some other files but not all matches)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 6.0.2, Qt Creator 7.0.0-beta2
    • None

      Hallo there,

       

      I am trying to make some refactoring in a (not so small) project and I am using the CTRL-SHIFT-F search function to change some strings in the whole project. If I only do the search, I get, like in following example 10 matches (searched for "::FromQString"):

      I want to delete this search string and I press the "Replace" button. It then prompts:

      Then I do exactly the same search for "::FromQString" with CTRL-SHIFT-F and following appears:

      So in this particular run it replaced the occurrences only in the two files:

      "AzurMain.cc" and "test_aquastring.cpp".

      This problem is also present in QtC 7.0.0 beta2. I tried to test it with that beta version but it is also present there... How can this be? This is sooo important in an IDE and it was probably there also in versions < 6.0.2. I had problems with refactoring of a function name for a very long time in the past. Same there, not all occurrences were changed and I had to compile everything and wait for the compiler to report the places that didn't get changed...

      So that is REALLY high priority in my eyes because I have search terms with more than 2000 matches. I went to one of the bigger cases with 1187 matches by foot but I will not go through that again. This is a task that takes some seconds, when "search and replace" works as it should. So I would rather change IDE than do this kind of work manually...

       

      BTW, refactoring of a function also doesn't affect the whole project. This is probably the same bug and you should test both cases.

       

      The project is a subproject-type and it has following structure:

       

      PROJECT
      
      -- SUBPROJECT1
      ----CLASS_1.h
      ----CLASS_1.cpp
      ----CLASS_2.h
      ----CLASS_2.cpp
      
      -- SUBPROJECT2
      ----CLASS_1.h
      ----CLASS_1.cpp
      ----CLASS_2.h
      ----CLASS_2.cpp 
      
      --...
      

      Thanks for any (quick) help in this one...

      I really like QtC but this one is too big and blocking for me to have to live without it...

       

       

       

       

        1. image-2022-03-02-12-11-12-671.png
          91 kB
          Anestis Papadopulos
        2. image-2022-03-02-12-19-39-096.png
          16 kB
          Anestis Papadopulos
        3. image-2022-03-02-12-21-16-358.png
          71 kB
          Anestis Papadopulos
        4. image-2022-03-02-14-41-01-885.png
          104 kB
          Anestis Papadopulos
        5. image-2022-03-02-14-43-12-029.png
          104 kB
          Anestis Papadopulos
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            anestisp Anestis Papadopulos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes