CppTools: Tests: Add "Find Errors Indexing" mode

Adding QTC_FIND_ERRORS_INDEXING=1 to the run environment will Creator
force to do some "extended indexing" in order to find bugs:

   1) The project files are parsed as if they would be opened in an
      editor. That is, parsing happens as precisely as possible, based on
      the ProjectPart information.

   2) Symbols are looked up by invoking CheckSymbols, the backend of the
      semantic highlighter.

   3) A "Task List File" (*.tasks) will be written with all diagnostic
      messages.

This special indexing mode is meant for testing purposes. E.g. it can be
run nightly on some bigger projects to find regressions.

Note that Qt Creator will quit exactly after the first time some source
files are indexed. E.g. that will happen if you open a file manually or
if you open a new unconfigured project. Therefore it's required to
configure projects as needed before invoking in this indexing mode.

Change-Id: If25b83e67d24df9e28e107cb062f21cbf3b4c643
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-08-05 11:34:52 +02:00
parent 8bf4a5b089
commit 0f3032f840
6 changed files with 174 additions and 15 deletions

View File

@@ -165,6 +165,7 @@ private slots:
void onAboutToUnloadSession();
void onProjectAdded(ProjectExplorer::Project *project);
void onAboutToRemoveProject(ProjectExplorer::Project *project);
void onSourceFilesRefreshed() const;
void onCoreAboutToClose();
private: