Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Autocompletion doesn't work when using precompiled headers
napajejenunedk0 last edited by
As far as I have searched throughout the existing Qt forum threads, someone has already complained about this problem:
The bug report states that the bug has not been fixed yet, but the comments read that the Qt Creator's plugin named Qt4ProjectManager has been fixed to provide autocompletion for project that have precompiled headers enabled.
The Qt documentation that targets precompiled headers: http://doc-snapshot.qt-project.org/4.8/qmake-precompiledheaders.html makes obvious that there is no need to include the precompiled header at the top of all compilation units (cpp, c, mm, etc files) - the cpp files in the sample project do not include this precompiled header file.
In the current situation, it should not be correct to include the header file that represents the precompiled header at the top of all compilation units (cpp, c, mm, etc files) since the project builds without the need for including the precompiled header.
What is the best way to fix the problem - include the precompiled header file on top of all compilation units?
alexisdm last edited by
I don't think that's really a bug that need to be fixed, because when you disable the precompiled headers, the compilation should still be working.
You shouldn't rely on the precompiled header being included automatically to your compilation units but rather include the headers that are strictly needed for a regular compilation.