[C++] Added env. var. to show file name that is being parsed.

When setting the environment variable
QTCREATOR_DUMP_FILENAME_WHILE_PARSING, the indexer will write the file
name of the file it is processing to stderr.

Change-Id: Iaed582512b87fd0584feb4e459a4094be32d5745
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-03-30 10:06:02 +02:00
parent 2ee1d10d2c
commit 31fc4c41b8
2 changed files with 12 additions and 5 deletions

View File

@@ -244,6 +244,7 @@ private:
CppFindReferences *m_findReferences;
bool m_indexerEnabled;
bool m_dumpFileNameWhileParsing;
mutable QMutex protectExtraDiagnostics;
QHash<QString, QHash<int, QList<CPlusPlus::Document::DiagnosticMessage> > > m_extraDiagnostics;
@@ -261,7 +262,7 @@ class CPPTOOLS_EXPORT CppPreprocessor: public CPlusPlus::Client
{
public:
#ifndef ICHECK_BUILD
CppPreprocessor(QPointer<CppModelManager> modelManager);
CppPreprocessor(QPointer<CppModelManager> modelManager, bool dumpFileNameWhileParsing = false);
#else
CppPreprocessor(QPointer<CPlusPlus::ParseManager> modelManager);
#endif
@@ -314,6 +315,7 @@ private:
#ifndef ICHECK_BUILD
QPointer<CppModelManager> m_modelManager;
#endif
bool m_dumpFileNameWhileParsing;
CPlusPlus::Environment env;
CPlusPlus::Preprocessor preprocess;
QStringList m_includePaths;