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

Incorrect default autocompletion suggestion for headers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • Qt Creator 7.0.0
    • Qt Creator 4.10.0, Qt Creator 5.0.2
    • C/C++/Obj-C++ Support
    • None
    • Kubuntu 19.04 x86_64.
    • Linux/X11

    Description

      Try typing the following line and pay attention to the autocompletion suggestions for possible header names:

      #include <cstdint>
      

      In my case, as I progressively type `cstdint`, QtCreator changes the list of suggested headers, reducing it down to two options, in that order: cstdint, check_stdint.h. But for the whole time of typing "check_stdint.h" stays selected by default. Early on, "check_stdint.h" is in the beginning of the list of suggestions, but in the end, when "cstdint" is typed completely it becomes second, after "cstdint" in the list, but still selected.

      I understand that "check_stdint.h" probably comes from the initial "c" and "stdint" as a possible expansion of an acronym. However, given there is an exact match "cstdint" in the list, I expect it to be the first suggestion and selected by default, with other possibilities like acronym expansions coming next. As it is now, the suggestion list is next to useless as I have to type "cstdint" completely and conciously make sure I don't hit Enter early to not autocomplete it as "check_stdint.h".

      Note that "check_stdint.h" is present in "/usr/include" and provided by the package "check" in Ubuntu, which is installed on my system.

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            lastique Andrey Semashev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: