Clang: Shorten debug output

...by writing unsaved file content and project part arguments to
temporary dirs.

Change-Id: Ic411700cb3da756788bbb315851ff38b0100fe71
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-07-14 14:54:01 +02:00
parent a3056e8922
commit b4464d8f4b
5 changed files with 163 additions and 6 deletions

View File

@@ -30,9 +30,10 @@
#include "projectpartcontainer.h"
#include <QDebug>
#include "clangbackendipcdebugutils.h"
#include <QDataStream>
#include <QDebug>
#include <ostream>
@@ -91,10 +92,15 @@ static Utf8String quotedArguments(const Utf8StringVector &arguments)
QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
{
const Utf8String arguments = quotedArguments(container.arguments());
const Utf8String fileWithArguments = debugWriteFileForInspection(
arguments,
Utf8StringLiteral("projectpartargs-"));
debug.nospace() << "ProjectPartContainer("
<< container.projectPartId()
<< ","
<< quotedArguments(container.arguments())
<< "<" << fileWithArguments << ">"
<< ")";
return debug;