Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-832

Intellisense is broken even for newly created projects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 2.7.0
    • 2.6.0 (rev.07)
    • General
    • None
    • Windows 10, Qt 5.15.1, VS 2019 16.7.6, addins 2.6.0 (rev 7)
    • Windows
    • 547269d3a0b89527a979766e6a7958250da512c0

    Description

      Intellisense is completely broken on my computer, even for freshly created projects, with the last version of each tool.

      Steps to reproduce :

      1) New Qt widget app project
      2) Create, Next next next finish (don't enable precompile header it is worse)
      3) The project is well created, but it has 2 intellisense errors related to the ui file

      Error (active) E0276 name followed by '::' must be a class or namespace name QtWidgetsApplication11 C:\Users\Nicolas\Source\Repos\QtWidgetsApplication3\QtWidgetsApplication11\QtWidgetsApplication11.h 14
      Error (active) E1696 cannot open source file "ui_QtWidgetsApplication11.h" QtWidgetsApplication11 C:\Users\Nicolas\Source\Repos\QtWidgetsApplication3\QtWidgetsApplication11\QtWidgetsApplication11.h 4

      Minimal steps to make these warnings disappear :

      1) Build
      2) Right-click on project : rescan solution, or unload reload project

      ---------------------------------------

      Well, now I managed to get rid of these initial warnings, lets add some widgets...

      1) Open the ui file
      2) Add a label and a button
      3) Save & close
      4) Wait, then in the corresponding cpp file, type "ui."

      => The new widgets are not listed !
      => If I type by hand the name of the widgets and use them, intellisense errors will be displayed...

      Minimal steps to make them appear :

      1) Build
      2) Right-click on project : rescan solution, or unload reload project

      ---------------------------------------

      Add a new widget class (with it ui) : same problem as (1) : the ui_newwidget.h is not detected

      ---------------------------------------

      Intellisense displays not less than 175 warnings about Qt headers (with a freshly created project).
      It would be useful to disable these warnings by default at project creation (ex C26812, C26498), and to fix the one that are important for most software projects.

      ---------------------------------------

      Please note that, while it is annoying but doable for very small projects, it can't be done in real life projects with millions of line of code where "rescan solution" can take minutes.

      I'd like my company to migrate to Qt, but if the tooling works too badly on Windows (Qt integration in Visual Studio, QtCreator not having an MSVC compatible profiler, etc.), I don't think that we will be able to make the step.

      Attachments

        1. qt-intellisense1.PNG
          qt-intellisense1.PNG
          10 kB
        2. qt-intellisense2.PNG
          qt-intellisense2.PNG
          8 kB
        3. qt-warnings.txt
          33 kB

        Activity

          People

            mecfc Miguel Costa
            kiruahxh kiruahxh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: