forked from qt-creator/qt-creator
Clang: Quote project part arguments for easier debugging
Now we can copy paste to the shell and make tests there more easily. Change-Id: Ic17ea23c4040583ba3af9e60ae73b242a574ab9b Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -82,12 +82,19 @@ bool operator<(const ProjectPartContainer &first, const ProjectPartContainer &se
|
|||||||
return first.projectPartId_ < second.projectPartId_;
|
return first.projectPartId_ < second.projectPartId_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Utf8String quotedArguments(const Utf8StringVector &arguments)
|
||||||
|
{
|
||||||
|
const Utf8String quote = Utf8String::fromUtf8("\"");
|
||||||
|
const Utf8String joined = arguments.join(quote + QString::fromUtf8(" ") + quote);
|
||||||
|
return quote + joined + quote;
|
||||||
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
|
QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
|
||||||
{
|
{
|
||||||
debug.nospace() << "ProjectPartContainer("
|
debug.nospace() << "ProjectPartContainer("
|
||||||
<< container.projectPartId()
|
<< container.projectPartId()
|
||||||
<< ","
|
<< ","
|
||||||
<< container.arguments()
|
<< quotedArguments(container.arguments())
|
||||||
<< ")";
|
<< ")";
|
||||||
|
|
||||||
return debug;
|
return debug;
|
||||||
|
|||||||
Reference in New Issue
Block a user