Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [solved] search and replace within selection
QtWS25 Last Chance

[solved] search and replace within selection

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 2 Posters 3.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chatumao
    wrote on 22 Oct 2013, 11:24 last edited by
    #1

    hi there,

    i try to do a search and replace on a selection of code. in the documentation it says:
    "Note: If you have selected text before selecting Find/Replace, the search is conducted within the selection."
    this is what i do. i select text, press ctrl+f, and then it searches the entire file for the highlighted code by default. changing what i'm searching for also lets creator search within the whole file. what am i doing wrong/missing here?

    thank you for your help!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Oct 2013, 13:37 last edited by
      #2

      Hi and welcome to devnet,

      Which version of Qt Creator are you using on which OS ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chatumao
        wrote on 22 Oct 2013, 13:38 last edited by
        #3

        i'm using creator 2.8.1 on windows 7.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 22 Oct 2013, 20:33 last edited by
          #4

          Strange, I am not experiencing that. Which type of search are you doing ? RegExp ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chatumao
            wrote on 22 Oct 2013, 20:53 last edited by
            #5

            No, a normal search via ctrl + f. but now its working for me, too. very strange. sorry to have wasted your time here, i honestly don't know what happened.
            thanks for the effort!

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 22 Oct 2013, 20:54 last edited by
              #6

              You're welcome !

              Since it's working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chatumao
                wrote on 23 Oct 2013, 22:58 last edited by
                #7

                for anyone after me asking what caused this: i think it's happening when you only select one line and then search and replace. selecting more than one line causes the desired behavior.

                1 Reply Last reply
                1
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 24 Oct 2013, 07:48 last edited by
                  #8

                  Right !

                  I forgot about this little detail, a single line selection works the same as a single word selection. You'll need to have at least a "new line" char to activate the "inside this line" search

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  2

                  1/8

                  22 Oct 2013, 11:24

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved