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

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P3: Somewhat important 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

      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!)

        1. code-model-warning.png
          206 kB
          André Hartmann
        2. creator-completion-suggests-longest-first.png
          103 kB
          André Hartmann
        3. image-2018-10-13-18-14-55-463.png
          78 kB
          André Hartmann
        4. nullptr_t.png
          134 kB
          André Hartmann
        5. nullptr_t.png
          163 kB
          André Hartmann
        6. Qt Creator.png
          54 kB
          Daniel Nyström
        7. unique-ptr-completion.png
          102 kB
          André Hartmann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes