CppTools: Encode more information in log file of CppCodeModelInspector

Among others the timestamp and if provided, some extra id.

Change-Id: I017c2af197023347c88f2547e7bda8f22b3d00c4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-03-17 09:45:07 -03:00
parent b5f8309610
commit fd5de10f2f
4 changed files with 24 additions and 14 deletions

View File

@@ -406,13 +406,13 @@ QByteArray CppModelManager::internalDefinedMacros() const
}
/// This function will acquire mutexes!
void CppModelManager::dumpModelManagerConfiguration()
void CppModelManager::dumpModelManagerConfiguration(const QString &logFileId)
{
const Snapshot globalSnapshot = snapshot();
const QString globalSnapshotTitle
= QString::fromLatin1("Global/Indexing Snapshot (%1 Documents)").arg(globalSnapshot.size());
CppCodeModelInspector::Dumper dumper(globalSnapshot);
CppCodeModelInspector::Dumper dumper(globalSnapshot, logFileId);
dumper.dumpProjectInfos(projectInfos());
dumper.dumpSnapshot(globalSnapshot, globalSnapshotTitle, /*isGlobalSnapshot=*/ true);
dumper.dumpWorkingCopy(workingCopy());
@@ -742,7 +742,7 @@ QFuture<void> CppModelManager::updateProjectInfo(const ProjectInfo &newProjectIn
// If requested, dump everything we got
if (DumpProjectInfo)
dumpModelManagerConfiguration();
dumpModelManagerConfiguration(QLatin1String("updateProjectInfo"));
// Remove files from snapshot that are not reachable any more
if (filesRemoved)