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

Always sort autocompleted results with fewest words in the name on top

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 4.13.0-beta1
    • Qt Creator 2.4.0, Qt Creator 4.7.0-beta2, Qt Creator 4.10.0-beta2
    • None
    • Ubuntu

    Description

      Now when autocompleting it shows the result alphabetically, which is fine. But it also sorts the result with most letters on top, which doesn't make sense if you're looking for a e.g. class with a short name.

      For example autocompleting QNetworkReply you could just press Ctrl+Space Q+N+R. But this will suggest QNetworkReplyPrivate at top!

      It would be way better if the shorter (QNetworkReply) was shown first on top and then QNetworkReplyPrivate as a second option, since the natural way to complete the *Private class would be to just add another 'P' while completing; Ctrl+Space Q+N+R+P.

      This is actually pretty annoying since it's so common! There are many classes which also have it's *Private counterpart and every time one likes to complete such classes, och will either have to press the down-arrow before pressing Enter or remove the "Private" part from the name which often accidently becomes the choosen one.

      (EDIT: Seems like the sort order is actually pretty random, but it still has to sort with the fewest words on top every time!)

      Attachments

        1. code-model-warning.png
          code-model-warning.png
          206 kB
        2. creator-completion-suggests-longest-first.png
          creator-completion-suggests-longest-first.png
          103 kB
        3. image-2018-10-13-18-14-55-463.png
          image-2018-10-13-18-14-55-463.png
          78 kB
        4. nullptr_t.png
          nullptr_t.png
          134 kB
        5. nullptr_t.png
          nullptr_t.png
          163 kB
        6. Qt Creator.png
          Qt Creator.png
          54 kB
        7. unique-ptr-completion.png
          unique-ptr-completion.png
          102 kB

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              speakman Daniel Nyström
              Votes:
              5 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes