Clang: Add progress bars for creating PCHs and indexing

Task-number: QTCREATORBUG-21112
Change-Id: Ie0c00a58f479a2fe7cbc7322490808509733ff0f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-09-27 17:52:44 +02:00
parent ffc070a3f2
commit 391cfab5d7
60 changed files with 865 additions and 49 deletions

View File

@@ -1000,6 +1000,24 @@ std::ostream &operator<<(std::ostream &out, const SymbolIndexerTask &task)
return out << "(" << task.filePathId << ", " << task.projectPartId << ")";
}
const char* progressTypeToString(ClangBackEnd::ProgressType type)
{
switch (type) {
case ProgressType::Invalid: return "Invalid";
case ProgressType::PrecompiledHeader: return "PrecompiledHeader";
case ProgressType::Indexing: return "Indexing";
}
return nullptr;
}
std::ostream &operator<<(std::ostream &out, const ProgressMessage &message)
{
return out << "(" << progressTypeToString(message.progressType) << ", "
<< message.progress << ", "
<< message.total << ")";
}
void PrintTo(const FilePath &filePath, ::std::ostream *os)
{
*os << filePath;