This reverts commit 7aa2411693.
It breaks the code model updates completely. So reverting this change
until we have the right thing.
Reviewed-by: Roberto Raggi
Add state logic to CppCodeModelManagerInterface, making it aware whether
an indexer is running, protect the update methods from another
invocation while running. Add changed signals to IVersionControl and
VCSManager and wire them to the update methods. Add a menu action for
manually updating.
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: con <qtc-committer@nokia.com>
Ensure the code model receives file names with clean paths ('/')
and fix paths in the relevant places of the code model. Pass on clean
paths from Cpp reference find and display them correctly in the search
window tooltip.
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Should not be necessary when nothing changed in the project info. This
also fixes a problem where include file scanning happened twice after
saving a pro file.
Reviewed-by: Roberto Raggi
In particular macros that are only checked for definition or are
expanded during the evaluation of an #if or #elif directive are now also
added to the list available through Document::macroUses().
The names of undefined macros that are interesting (because they're used
in an #ifdef or a defined(...)) are now available through
Document::undefinedMacroUses().
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Some macros are defined not by cl.exe purely, but are pretty standard.
We add those manually anyway. Also, remove compiler-specific macro
definitions from the model manager. They should be provided by the tool
chains only.
No empty entries should be added to the completion list, but it seems
like this is what is happening. Maybe this warning will give some more
information about the problem.
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
sessionUnloaded was sometimes emitted when the session manager was in
an unsafe state (between delete m_file and m_file = new ...) leading
to crashes when slots connected to the signal accessed the sessionmanager
again. This patch moves the signal emission before delete m_file.
Reviewed-by: dt